A currently shelved game project inspired by those flash games where you need to get a car out of a parking lot. Except with farm animals, of course! And the player’s also occupying a tile within the game as a herding dog instead of manipulating the game from outside.
The game is set in a 3D environment, so that required me to create custom code to rotate the camera and zoom the view in and out.
Tiles and entities are loaded dynamically from JSON files and placed into the level with a spiral falling transition. A reverse transition happens when the level is completed or recalled.
I have also implemented moving linked groups of animals away from the player when there is free space, and moving the tractor towards the winning space when it’s free to do so, which completes the level.
Aside from the gameplay, I have also implemented dynamic settings modules. I pre-created several modules based on the type of input (checkbox, slider, dropdown…), and only needed to drag a given module into the settings and give it a name that was equal to a config setting in the files (additionally allowed values if I needed it). The system then automatically gave it a name and default value, and connected it via signals to change the linked config value when the player interacted with it.
Dynamic settings module loading is honestly still insanely cool. I love that idea and will be stealing some of the implementation for my other game projects. It’s so easy!
I should have paid more attention to exactly which data I wanted to handle and how. As an example, when implementing an undo function, I realised I had no data of which direction any element was facing, as it was determined at random during level start (except for the tractor), and each direction change happened outside of the classes. For some reason, I wasn’t loading the JSON data into custom classes, which made a lot of things harder.