Unity 2D - RPG Tutorial 2024 - Part 06 Interfaces

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии • 36

  • @lmarcelino555
    @lmarcelino555 9 месяцев назад +1

    I spent the day watching your videos and I have to say great job. I am not a programmer or developer but I can follow along nicely. Thank you!

  • @anjubatus
    @anjubatus Год назад +3

    I'm following this tutorial series, just wanted to tell you this has been really helpful and easy to understand! thank you for making this!

  • @sku11_duggery2
    @sku11_duggery2 7 месяцев назад +2

    I've been following this series, and the mic upgrade is huge. Thanks for that

    • @irfantochu9041
      @irfantochu9041 3 месяца назад

      bro i follow finished but not work dont show You will walk to this NPC

  • @damdakos
    @damdakos 2 года назад +4

    Very good video. Thanks for that. The mic is much better! Look forward for the next tutorial.

    • @epicgdev
      @epicgdev  2 года назад

      Tha k you @gamedakos ! This makes me so happy

  • @epicgdev
    @epicgdev  2 года назад +3

    How was this video? Thanks for all the support! Join my discord community discord.gg/tVx4waqCPT

  • @joris8622
    @joris8622 Год назад

    Great video. Very understandable with all the theory!

    • @epicgdev
      @epicgdev  Год назад

      Glad you enjoyed it!

  • @GameDevByChill
    @GameDevByChill Год назад +1

    i'm happy to see that you are basing this off of things learned from Game Dev Experiments! Excellent coding foundation as he follows good practices. It would have been nice to see you update what he did years ago with more modern concepts though... Input system comes to mind immediately and its very simple to convert to.

    • @epicgdev
      @epicgdev  Год назад

      Yes! Gave dev experiments is my inspiration! I wanted to do my own take for people that don’t have strong coding experience

    • @eduardoz7665
      @eduardoz7665 10 месяцев назад

      Hi @jimchilluffo433 I am new to unity. What other modern concepts do you recommend using / what resource do you use to learn about modern concepts (youtube channels etc) ? Thanks

    • @GameDevByChill
      @GameDevByChill 10 месяцев назад

      @@eduardoz7665 git-amend has some pretty good pattern explanations as does One Wheel Studio. Other than that, you just need to start small... like re-make an old atari or nintendo game. (NES and Atari 2600) old simple stuff...

  • @Qilemonade
    @Qilemonade 2 года назад +1

    I love your video
    Thanks alot 👍🏽

    • @epicgdev
      @epicgdev  2 года назад

      Thank you very much! @softchipz , this makes my day!

  • @projectawake
    @projectawake 9 месяцев назад

    I l-love this video so much! thank you teacher!

  • @simongunther8414
    @simongunther8414 Год назад

    love the videos

  • @sonnyjordan332
    @sonnyjordan332 Год назад +4

    1-) Can you tell us how you set up the colliders for the lamps and the house? If we use the Tilemap Collider 2D, then the boundaries for the collision are automatically set and are not editable. The collision boundaries for the lamps and the house both fully cover the respective objects and so the character can't walk behind them.
    2-) I couldn't figure out the solution to the Tilemap Collider 2D so I removed it and all the other objects and only placed a lamp in the Foreground sorting layer with the SolidObjects layer. Gave it a Box Collider 2D, edited the collision boundary to place it at the bottom of the lamp so that the player could walk behind the lamp. However, when the character goes behind the lamp, the character still appears infront of it. What's the problem here?

    • @lorale8095
      @lorale8095 Год назад

      yes have same problem

    • @sonnyjordan332
      @sonnyjordan332 Год назад

      @@lorale8095 Search for "Unity sorting layers"

  • @GameDevByChill
    @GameDevByChill Год назад

    I changed things up a bit and have this as a base to work with... No ChallengerController but an extended NPCController called HostileNPCController
    public class NPCController : MonoBehaviour, Interactable
    {
    public virtual void Interact()
    {
    throw new System.NotImplementedException();
    }
    }
    public class HostileNPCController : NPCController
    {
    public override void Interact()
    {
    //base.Interact(); May not want to use base interact also
    }
    }
    Cheers!

  • @MichaeldeGans
    @MichaeldeGans 3 месяца назад

    That sneaky little Britney Spears reference... toxic!

  • @imw8721
    @imw8721 Год назад

    great work! illustrate how interface work clear than my java book😂I found learning something is also about the intention and motivation.

  • @irfantochu9041
    @irfantochu9041 3 месяца назад

    i follow finished but not work dont show You will walk to this NPC can help?

  • @tomoyaokazaki2138
    @tomoyaokazaki2138 8 месяцев назад

    Very nice video! But not sure why you made one sprite's RigidBody Kinematic and the other's as Static. They both seem to prevent them from falling. What's the difference?

  • @kenanbajric1776
    @kenanbajric1776 9 месяцев назад

    This tutorials are really god for understanding of some fundamental programming concepts. Also I have one question. Could we create parent class that will have this Rigid2D physics and then extend that class to create Player, NPC, Challenger, Merchant etc? That parent class could also implement other identical behaviour that all child classes would have.

  • @alexanderreiner7694
    @alexanderreiner7694 Год назад

    For some reason Z is not working for me so I used ,,I“ to Interact and it works? Is that normal?

  • @shadows_99
    @shadows_99 Год назад +1

    It's Very good. Thanks for everything i'm from iran also your fan , pls don't stop recording the video and fix the voice quality😍🥰

  • @AryanSingh-cw6ce
    @AryanSingh-cw6ce 2 года назад +1

    Hi, I a, using new input system and box collider for interaction and i got a problem with interact function . Help
    last line of code
    code
    using System.Collections;
    using System.Collections.Generic;
    using Unity.VisualScripting;
    using UnityEngine;
    using UnityEngine.InputSystem;
    public class PlayerMovement : MonoBehaviour
    {
    [SerializeField] bool canMove = true;
    [SerializeField] int movementSpeed = 10;
    Vector2 onMoveVector;
    Rigidbody2D myRigidbody;
    Animator animator;
    BoxCollider2D myBoxCollider;
    float movX, movY=0;
    private void Awake()
    {
    myRigidbody = GetComponent();
    animator = GetComponent();
    myBoxCollider = GetComponent();
    }
    private void Update()
    {
    Movement();
    }
    private void OnMove(InputValue value)
    {
    onMoveVector = value.Get();
    }
    void OnInteraction(InputValue value)
    {
    if (value.isPressed)
    {
    Interact();
    }
    }
    private void Movement()
    {

    if (canMove)
    { movX = onMoveVector.x;
    movY = onMoveVector.y;
    if (onMoveVector.x != 0)
    {
    animator.SetBool("isRunning", true);
    myRigidbody.velocity = new Vector2(onMoveVector.x * movementSpeed, 0);
    AnimatorMovement();
    }
    else if (onMoveVector.x == 0)
    {
    animator.SetBool("isRunning",true);
    myRigidbody.velocity = new Vector2(0, onMoveVector.y * movementSpeed);
    if (onMoveVector.y != 0)
    {
    AnimatorMovement();
    }
    }
    }
    if (myRigidbody.velocity.magnitude == 0)
    {
    animator.SetBool("isRunning", false);
    }
    }
    void AnimatorMovement()
    {
    animator.SetFloat("idleX", movX);
    animator.SetFloat("idleY", movY);
    }
    void Interact()
    {
    if (myBoxCollider.IsTouchingLayers(LayerMask.GetMask("interactable")))
    {
    myBoxCollider.GetComponent()?.Interact();
    }
    }
    }

    • @epicgdev
      @epicgdev  2 года назад

      Hello! What is the error that you are getting?

    • @AryanSingh-cw6ce
      @AryanSingh-cw6ce 2 года назад

      @@epicgdev Solved it

    • @epicgdev
      @epicgdev  2 года назад

      @@AryanSingh-cw6ce so happy to hear this!!! Good Job!!

    • @epicgdev
      @epicgdev  2 года назад

      you can join my discord community to ask for help

    • @epicgdev
      @epicgdev  2 года назад

      @@AryanSingh-cw6ce discord.gg/tVx4waqCPT