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!
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.
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!
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 :)
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.
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...
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?
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!
interesting, ill have to try doing that thanks
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.
Loving the style of this game.
Can’t wait till it’s fully complete!
Loving your devlogs and the quality of the editing!
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!
Love the progress keep it going !
Great video! Enemy AI's seem quite complicated
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 :)
Yes I actually made kind of the same comparison in devlog 0
This video has piqued my interest. A multifarious way of thinking. Salam!!
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.
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...
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?
Also, I enjoy the fact that you showed your code. The switch statements look better.
If u would like something unique make the tiles isometric. Think it would look better?
first