Megafuzz Dev Blog

Nerdy rants on programming and game design

Moving Around

Reworking A 5 Year Old Mess

As mentioned in the first blogpostRonn For Your Life is a project I started back in 2011, worked on it for a few months, and then put it on hold for personal reasons. So when I picked it back up a few months ago, the codebase was more than 5 years old. I've developed a lot as a coder and a game designer since then; things I didn't even think about back then are now glaringly obvious to me, and needed a complete rework. Back then I just coded away until stuff worked, then proceeded to the next task.
Today I do things different; make the simplest things you will be doing 90% of the time feel good on their own before doing anything else. Just moving around should feel good even with nothing else in the game; if such a fundamental part of it doesn't feel good, the very foundation is built to fail.

Just moving around did not feel good. In fact it felt horrible. I had slapped together some very basic movement and collision that was sketchy at best, and buggy at worst. Basic platforming was too hard and frustrating, because the collision system required jumps to be pixel perfect to register; and bumping the game up from 30 FPS (my standard back then) to 60 FPS just made the collisions run twice as fast, demanding even more machine-like precision from the player.
You might be one or two pixels from the ground (thereby technically not allowed to jump), but at 60 FPS you won't register the difference, making it look and feel like the game's fault. I analysed the problem and concluded that I needed to introduce 3 steps, which I will discuss below.