Development blog

Separating units

Apr 18, 2021

This past month I focused on enemy units and player death.

Now the battle ends gracefully when all enemy units are defeated, and the enemies have a unit phase similar to the player’s, where each enemy unit in that group can attack or take some other action. Right now all they can do is attack player units next to them.

Player units now die when their hit points reach zero, and the group gets separated. Right now if the middle unit dies, the last unit is split from the family and the parent unit moves and fights alone. The details of this will likely change as I continue working on it!

Battle icons

Mar 11, 2021

I worked on a few things since the last update!

On the UI side, I worked on icons that display above the units: an icon that indicates which player unit’s turn it is, and an attack icon that shows what units can be attacked. I also hid grid tiles that weren’t in range during the player’s move phase to remove some of the clutter.

For combat, the player can no longer attack enemies that aren’t in range. I also added camera rotation to the cutscene system, so when the player attacks an enemy unit, the camera will rotate a small amount to make it a little more cinematic!

Hit points

Feb 2, 2021

I added hit points to the player and enemy units and a health bar! The health bar shows up near the bottom of the screen when the cursor is over a unit, and displays that unit’s hit points of course.

Battle cursor

Jan 31, 2021

Since the last post, I added a cursor that’s visible during combat! The cursor bounces when it gets moved to a new tile and even hovers over a unit’s head when the tile is occupied.

Also when moving the cursor, the camera no longer jumps around and instead moves way smoother!

Hurt animation

Jan 25, 2021

I worked on cutscenes in combat some more! Now units face the appropriate direction when attacking or being attacked. The camera also zooms in and the enemy plays a simple hurt sprite animation and gets knocked back during the fight cutscene.

Battle cutscenes

Jan 17, 2021

Since the last post I’ve been working on being able to attack an enemy unit with a player unit!

I added rudimentary support for cutscenes in combat and set up the fight command to play a cutscene. Now when the player selects an enemy unit to fight, the gameplay pauses and the cutscene system plays a (work-in-progress) visual effect showing the unit was hurt, then the player unit’s turn is ended. Hopefully the battle cutscenes will be more interesting to look at in the future.

Relative direction

Dec 19, 2020

Moving the cursor and player are now relative to the camera direction.

Also, the camera follows the cursor in battle!