devlog week 2 - enemy interaction


This week I worked on adding interaction with enemies. The main interactions the player has with enemies is that enemies will attack and kill the player, and the player will attack and kill enemies. I created a stats system containing hp and block, when an entity's hp is depleted they are destroyed, leading to victory (if player killed all enemies) or defeat (if enemies killed player), I applied this stats system to both player and enemies.


The next step was to add cards that deal damage. The simplest cards are a card that only attacks a target, and a card that only blocks. Choosing values for how much these cards should attack and block is somewhat arbitrary at this point, and they are subject to change later, I wanted to go with something that would be easy to divide but still relatively small, which would make balancing other cards easier and easier to play respectively, so I chose to make them hit and block for 6 each.


I created some code that can describe an action, each card executes a certain number of actions in sequence, for example the above attack and block cards would have a single action each, Attack(6) or Block(6). The advantages of this are two-fold: it lets me save time on creating new cards, and it lets me auto generate card descriptions that will always be correct.


Now there's one thing missing, which was how do you choose an enemy to target? Some games in the genre opt for click and dragging cards onto targets, some for pre-selecting targets and then clicking cards to play them. I want to allow both methods since they don't compete, but for now I implemented pre-selection since it is easier.


target selection on enemies, using a small cat as a placeholder :3

After that it was all ready to test card playing


yes, I also improved the draw and play animations since play testers mentioned some confusion in what was happening on screen.

In the above gif, you can see that when an enemy runs out of health, they are destroyed. However there is no feedback to tell you when this will happen. The next step was to add a display to show hit points. some games have a maxhp, I see no purpose to having that in sinister reasons, so I won't. This also means no health bars, hp is as simple as an icon and a number.

health icon and number display (and the unused block icon next to it)

Up next will be giving enemies actions, allowing them to fight back.

Leave a comment

Log in with itch.io to leave a comment.