Log 3


──────────────┤ View On GitHub ├──────────────

Lightning Scrolls

Added lightning scrolls this week. View the source here. Implementation is essentially what's in the tutorials. 

Fire Scrolls

I struggled with this due to the design of my system. Decided the engine class was becoming much to big and started the migration to use the State pattern for switching the engine states based on Commands issued within the game. This helps to also solve the problem where picking up an item uses a game turn, which with the previous design would have been much harder to accomplish. I've started adding a World class that holds all the information regarding entities, maps, and so on. The Engines single responsibility moving forward will be to switch states depending on the CommandResults it gets back. Each state then is responsible for that state in the game. I now have InGame, Exit, EndTurn, Reset, PickTileAOE, View UI Window states. On entry to each state I can then create the input handler for that state and on exit run an necessary clean up. Each state then has an on update where it's running it's game loop behaviour. The branch is currently a mess as I work through this migration but it should eventually clean up the entire engine class and keep each games state in a nice clean file.

That's it for this week. Happy developing!

Get Yet Another Roguelike tutorial with C++ and Libtcod

Leave a comment

Log in with itch.io to leave a comment.