Added a job for attacking targets this week. Also considering some refactoring to the components system to make it easier to separate state and behaviour.

#gamedev #kingdomarchitect #ScreenshotSaturday #devlog

Experimented with adding animations today. Thinking about setting it up as a state machine, but still wondering on how to trigger the transitions and change from one animation to another and handling directional sprites. It's nice seeing it come to life.

#kingdomarchitect #ScreenshotSaturday #gamedev #devlog

For the devlog this week there is an update to keyboard navigation. Focus can now be moved between focus nodes and each view can hold multiple nodes, like the action bar.

#gamedev #ScreenshotSaturday #kingdomarchitect #devlog

This week's features includes visibility. Things like buildings and characters will show adjacent items for a certain distance. Discovered but not visible tiles is hidden in a fog.

#ScreenshotSaturday #gamedev #devlog #kingdomarchitect

This week I integrated the sprite tinting I made last week with the health and sprite drawing component for mobs. This causes them to now flash when taking damage ⚔️.

#gamedev #devlog #ScreenshotSaturday #kingdomarchitect

Not a big update for my game this week, but still a rabbit hole! Wanted the ability for items to flash when taking damage. Both knights, buildings and resources. I want the flash to be possible during animations so I didn't want to generate white variants for all frames for all sprites. The solution I ended up with is drawing the sprite to an OffscreenCanvas, using globalCompositeOperation and drawing the content back to the main canvas.
#ScreenshotSaturday #gamedev #devlog #kingdomarchitect