The transition to the new architecture is slowly but steadily happening. Somewhere in the next couple of months it should be finished and then a new rounds of functionalities and updates will hopefully come close by thanks to the improvements, right now the management of lava has improved significantly and it no longer slows down your movements.
As discussed previously, I am implementing an ECS architecture, this has changed quite dramatically the game architecture from this:
To this (not everything is shown here):
The graphic above is more complex because it is a lot more detailed, for now, but you may already be able to notice that there is a lot less coupling between objects. For example there is a difference between Grid Objects and Turn Actors. Actors never reference Grid Objects, in fact, they don’t know where they are on the grid! Their parent system, Turn Manager, interfaces with Grid Manager only if necessary, for example to enable path finding, but these functionalities are few and all put together inside the same update routine. This makes it easy to debug things and make the game (i.e. the systems) behave exactly as I want to. No more asynchronous waiting that depend on a lot of if clauses, thanks to the easy to follow code paths.
Of course there are challenges. Right now I am unsure where to put the “Game Mechanics”: are they a Service or a System? (by the way, notice the use of locator pattern for services, there is a bit of boiler plate, but it really is nicer than singletons). What about the “Level Generator” stuff? It should probably be a service, but it is very tempting to have it as a component, in such way I can just implement various generators by loading different components…
What would you do?
By the way, you may have noticed a change in the style of the architectural drawings, that is because I am now experimenting with draw.io. Inkscape is a great tool, but I am finding that draw.io meshes more easily into my workflow thanks to its integration with Google Drive and, while maybe not on par with other dedicated graphic suites, it does a pretty good job and comes with a lot of instruments to make technical drawings a breeze. You may want to take a look at it.
Thanks for reading.