How I Changed Enemy Behaviors - Roguelike Devlog

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 พ.ย. 2024

ความคิดเห็น • 18

  • @ericisconfused
    @ericisconfused ปีที่แล้ว +13

    I think if you want to improve your behavior code, you'll want to make each behavior its own class or component inheriting from an abstract base. That way you refactor out all those conditionals... polymorphism!

    • @Greedable
      @Greedable  ปีที่แล้ว +4

      interesting, ill have to try doing that thanks

  • @DoctorGester
    @DoctorGester ปีที่แล้ว +1

    I think a much simpler answer regarding the repeated behavior code is just math. Separating all of those branches into different classes is just moving out spaghetti into different files and you'll in fact most likely end up worse off. Instead, you could try abstracting over space itself, for example you could take the player relative position and invert relative x/y in such a way that the player always ends up in the same "quadrant" relative to the enemy (i.e. player can only be ever to the top/right of the enemy). Then solve your logic for that quadrant only (i.e. if player is to the top, y+1, to the right x+1 and whatever is for top-right). Then translate the solution back into the actual quadrant for the player, again mirroring the coordinates, just backwards. This of course assumes there won't be enemies which for example only ever move in one direction, although you could include that rather easily too.

  • @eyitsgallery
    @eyitsgallery ปีที่แล้ว

    Loving the style of this game.
    Can’t wait till it’s fully complete!

  • @newtforgegames
    @newtforgegames ปีที่แล้ว

    Loving your devlogs and the quality of the editing!

  • @zeustechdev
    @zeustechdev ปีที่แล้ว

    Is turning on really great. Adding different movements to enemies gives it a lot of replayability.
    You also have to keep in mind what makes the game fun? for example in strategy games,
    like this chess game, you have to create something for players to be hooked on. And not
    only one goal(kill enemies), you could have a chest for example that gives a reward to the
    player, but the monster could also get it.
    Giving a bit of variety to the whole movement aspect
    Also:
    The grid above the character with the number is a bit confusing as a player would have
    thought that was a life bar or something like that.
    The grid icon is pretty great, but I guess adding a movement icon(like a foot) or something
    would make it better(IDK just my take on it).
    The game looks great, I'm not into game dev anymore( since I became a fullstack developer)
    but I like to support all indie developers like yourself. You have a good game, and good art.
    Keep it up and for sure more subscriptions will come!

  • @IDENTICYEA
    @IDENTICYEA ปีที่แล้ว +2

    Love the progress keep it going !

  • @soulessnic1158
    @soulessnic1158 ปีที่แล้ว

    Great video! Enemy AI's seem quite complicated

  • @gdev7611
    @gdev7611 ปีที่แล้ว

    I know it's too early to tell but this reminds me of Crypt of the NecroDancer and a little bit of Patch Quest. It looks promising tho! New subscriber here :)

    • @Greedable
      @Greedable  ปีที่แล้ว

      Yes I actually made kind of the same comparison in devlog 0

  • @Dardasha_Studios
    @Dardasha_Studios ปีที่แล้ว

    This video has piqued my interest. A multifarious way of thinking. Salam!!

  • @deevus
    @deevus ปีที่แล้ว

    I wonder if you could simplify this a lot by using a raycast to get the angle from the enemy to the player, then snap the value to the nearest tile direction.

  • @gabrielbear5268
    @gabrielbear5268 ปีที่แล้ว

    Oh fuck I've never come across this video before and realised the art style and the concept for the game I'm making is almost exactly the same ;( Guess I'll think of something different...

  • @ringo2715
    @ringo2715 ปีที่แล้ว

    I really like the icons above the enemy. Seeing how many moves they will make and what kind of movement they can make will allow for some tactical positioning.
    Do those blue tiles represent special conditions?

    • @ringo2715
      @ringo2715 ปีที่แล้ว

      Also, I enjoy the fact that you showed your code. The switch statements look better.

  • @01-aether66
    @01-aether66 ปีที่แล้ว

    If u would like something unique make the tiles isometric. Think it would look better?

  • @lil_devil__
    @lil_devil__ ปีที่แล้ว

    first