Probably the biggest game mechanic in Roag is the turn-based system. The aim was to have a system where the game state would only update after the player has made a move, which is what I’ve slowly implemented since my last post which covered the Procedural Generation system. Each move made by the player updates the game state once; moving all mobs by one tile, progressing through the day and so on. The achieved effect:

The mob (green blob) moves only when the player (not green blob) makes a move. A manager script updates all entities in the game at the same time using a coroutine:

Entities in the game can subscribe to the update event, and move or interact using the parsed values:

The system I implemented ensures that all entities update simultaneously.

I also implemented the A* pathfinding algorithm. So far the player can click to move. I used Quill18’s Base-Building Game tutorial and Sebastian Lague’s A* tutorial as reference.

I plan on adding a second tile map to the game which will act as the “cave system”. I’ll need to make some changes to the current setup, but if I do a good job of it, it’ll be easy to implement more tile maps in the future.

It’s been some time since my first blog post, but I have been making progress all the while. I considered making these Devlogs weekly, but I figured it would put too much pressure on me to implement new features, possibly burning me out, or worse, writing half-assed code. I’m starting my third year of university in three weeks. Maybe then I’ll be able to set in a better routine. Until then, have a good one.