Patching Episode 1

 

Wow, this again?


Remember this? How in episode 1 (Entropy), Sonic would bounce backwards every time he hit wall collision? Remember how the stairs puzzle was absolutely busted? Remember how many times this was bug reported only for me to never go back and fix it?

Well stop remembering that already, jeez!!! It’s now fixed in the latest build on SAGE booth, it only took five years for me to get to it, big deal! Get over it! :)

Sonic’s run no longer bounces him back and the stairs should be 90% more stable, like in episode 3.

Why did it take me so long anyways?

Well, only two years ago, after episode 4, did I figure out a neat trick which makes this way easier. Rather than try to use git tagged source code to try to rebuild an approximation of an episode I want, I instead figured out how to decompose a Love2D game distribution that’s out in the wild—the one you are playing now—which means ensuring I am taking an old build and only changing exactly what I intend to change and nothing more, is a lot easier.

For those who don’t know, a Love2D windows distribution is built by putting all your scripts and assets into a zip file, renaming its extension to “.love”, and then doing a binary concatenation with my intended version of “love.exe”, which is 0.10.2, 64-bit.

So to go from SonicRPG.exe back to source code I can tweak, I need to cut the first “love.exe” worth of bytes off of my SonicRPG.exe file. I then need to rename the file “.zip” and decompress what’s inside and bingo! I am tweaking the exact build of Sonic RPG released out into the wild, god knows how many years ago!

Before this trick, having to try to walk back from source into a release build was tricky, mostly the fault of me being very imprecise with my use of source control… if I were much more careful and precise with my commits and tagging—especially when doing SAGE hotfix builds—I could much more easily have confidence in what I was updating purely from GitHub source. But alas, I am not that organized, I am ADHD, and it’s just not my strong suit to be super disciplined in my practices even if doing so would be highly beneficial to me lol.

So all that said, this game distribution decomposition technique made it radically easier for me to go back and update a released episode without losing my mind and dipping into a slurry of unintentional bug regressions (though I ofc did run into that a bit just by switching Sonic’s run to a variation from ep 3).

Learn from my mistakes and use GitHub commits and version tagging as precisely as you can, especially as you do hot fixes during SAGE! (The most exhausting time to be precise, granted, but that’s when it counts most later!)


Comments

Popular Posts