Refactoring on the Core Loop! Better Code Coming Soon!


Hello there!

Since the past week I've been working on porting Moon Cheeser to Godot 3.1, besides some deprecated signals and some other minor compatibility breaks everything went fine so far.

After the porting I decided to refactor everything to provide better, reusable code for us. Currently the following systems are refactored

Physics

The physics were rewritten to provide more modular approaches, for instance with the Gravity node we can tell any KinematicBody2D to move_and_slide towards a given direction. In the first iteration I put this node in the Astromouse's SceneTree, but now it is on the Moon, and it just tell the Astromouse to move towards the Moon's center.

Dragging

With the refactored physics the comets and stars are way simpler now, and to change their flying direction now we can just attach a DragArea, a new node, which calculates a dragging, signalizing its direction, using this we can tell comets and stars to change their direction to be the same as the DragArea signal

Spawning

The core loop consists of jumping, throwing comets on the Moon and getting the cheeses spawned, So to close the core loop I refactored the spawning system, it is now very flexible and reusable. The cheeses' spawner in particular can pop cheeses in any direction within its Spread angle, so explosions (cheeseplosions :P) are way easier to create. For an impact cheeseplosion I can set a spread of 20 degrees, and for a super nova cheeseplosion I can set it to 180 degrees, which will throw cheeses in all 360 directions.

Result

With that we have the main aspects of the core loop working properly, well game is not fully functional again, but the systems are way more maintainable!


That's it, thank you so much for supporting the project. Keep Developing and until the next time!

Get Moon Cheeser

Buy Now$2.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.