When learning C++ I decided to remake my Platformer that used Dark Basic. The previous version had issues with its frame rate and the physics was implemented in a way that forced it to update each frame, meaning that frame drops would slow down the game itself too. For a game where precision matters and a timer is tracking your best completions, frame drops and slowdowns are unacceptable.

To remedy this, I decided to look into proper game loop logic and found several articles on fixed, partial-fixed and variable time step loops. I decided to use fixed as it was the most similar to my previous physics implementation and because I wanted to add replays into the game. While it is great to be able to say you had a good time on a level, to be able to see that good time and all the tricks used to get it, would be an amazing addition.

I transferred the physics over to the new implementation and re-created the aesthetic and game logic within C++ utilising Object Oriented patterns instead of Imperative method calls.

Now the platformer runs at much higher framerates and can save and load replays of levels too.