Have you ever thought about what your favorite games of the 90s might look like if the joystick buttons had a “Zoom out” button? As an avid amateur (and assisting speedrunner ) of Sonic the Hedgehog games and their modern hacks, I was once interested in this topic. Details under the cut.
My interest in this topic has grown from this video: ')
The game I was used to looked like this was very unusual, and I wondered how the author of this video did it. Then I found the following video report on his channel.
No, no, you were not mistaken: the video was really completely created by hand, frame by frame the author positioned the small picture in the right place large. Of course, this is masochism, but this masochism inspires respect and admiration for the author’s iron patience.
And then I wondered: is there any point in all this work? Indeed, in the course of the game, the toy itself always “knows” the coordinates of the visible part of the map. A Taser emulator allows you to easily access any memory cell and write a script that performs certain routine actions. Brilliant! It is enough just to take a screenshot of each frame of the gameplay, read the coordinates of the “camera” from memory, then, acquiring a level map, cut out the necessary fragments from it, insert our screenshots into them, and put together a finished video!
I chose lua-gd for working with images, since I already know the gd library quite well (I worked with it from PHP and C). Unfortunately, my first attempt to install lua-gd on Wednesday the emulator was not successful: from time to time there were annoying drops.
AnS friend friend came to the rescue (by the way, our compatriot). He found that the crash only happens with the latest versions of Gens, while one of the older versions works reliably. Therefore, as a workaround, it was decided to simply replace Gens.
The case moved from a dead point - the first code was written on Lua , level maps were found. Unfortunately, not all levels of classic Sonic games have normal maps, and only romhhacker experts have the means to create maps. The only exception is the game Sonic 3 and Knuckles, for which there is a program Sonic Extractor, which allows you to easily create maps yourself, and also to determine which objects will be displayed on these cards, and which ones will not. Special thanks are also given to the experienced TASer and romhaker marzojr, who suggested how to “hide” the information block containing the time, the number of rings assembled and the like.
As a conclusion - the video created using this method, as well as the original of this passage.