Back to work

After a good while I am back at working with a complete development environment. Of course one of the first thing I did is getting “reacquainted” with the codebase.


It is good to see that I can remember more or less everything and that trying to be spend a bit of time to keep the sources organized has been useful. However there is still some tiding to do.

In particular I am now working a bit with animations and stuff, and I am finding that the code for animation is a bit too tied with the game logic.

I suppose this is to be expected in this kind of game: when everything has his own turn it is important to avoid confusion to the player and make sure that certain animations are completed before certain events. Other times you want everything happening simultaneously, for example all enemy movements can, and should, happen together to not waste game time (or you can go creative with cinematic and dramatic cut-scenes like in the recent X-Com reboots).

Having just studied ECS systems and seeing this kind of strict coupling in my code, it seems to me that some refactoring is in order. This would be the second big refactoring since the start of the project and it will probably take some time to get done, but I am quite willing to make the effort.

Refactoring is in general a good practice, one that every coder should be familiar with, but I also happen to like it. It may seem strange, since you may see it as a more or less necessary waste of time, but I see it as a way to improve and grow (both your code and yourself) while still aiming to be efficient. It is like starting a new project, but with most of the hassle already taken care of.

And if you are a developer, especially an indie one, you know how much we like starting new projects!

Thanks for reading.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s