GameDev Diary: Rewriting My Game and Learning About Godot

Andrew Lukes
3 min readSep 12, 2023

--

Continuing the tedious work of transferring my game to a new engine

Welcome! I have spent the last week working hard on rewriting my project into Godot. I have to admit that it was very difficult as I struggled with trivial tasks like instancing an object or adding a simple animation, but with every passing day, my work speed rapidly increased. Let's cover my progress so far.

Photo by charlesdeluvio on Unsplash

Battleground

This is the main node of the game loop. It contains all the UI, living units, projectiles, and structures. I am trying to funnel all of the information between these components through this node, in order to simplify the design.

Scenes

I have recreated both the Starting and Game over screen alongside a loading screen, though accounting for the scale of my game and the power of Godot, I do not think I will need to use the loading screen often. Further along the way, I plan to add back the settings screen, but it isn't a vital part of my videogame so I am focusing on more important mechanics.

Unit Classes

I have added back all of them even with their information bars. Thanks to Godot, they look much higher resolution than in pygame. In the future, I want to display the health as a proper health bar and add icons for the rest of the unit statistics

Projectiles

I have decided to create a projectile constructor. Using it I have created a bullet projectile and cannonball projectile for musketeers and canons respectively. The difference between them as in the previous version is that canon balls have a piercing ability. Godot also allows me to easily visually differentiate them by using sprite nodes.

Movement

I had to simplify it back to rendering a simple circle where a unit can move in the given turn. It is simple but easy to implement so it doesn't break down as often as in my pygame version of the code.

Conclusion

I have made significant progress in learning Godot. It will allow me to create a more visually pleasing game with more depth. However, I am still learning and have to face issues like almost corrupting my entire project only by moving a random folder up one level in the path tree. I hope the journey will be easier after this point.

Check out the previous article here

Check out the next article here

--

--

Andrew Lukes

Introducing Andrew Lukes: a Prague web dev & language enthusiast who shares his ideas on Medium. You can visit andrewebdev.online to see some of my projects