Super Mario In sed, Sort Of

Super Mario In sed, Sort Of

We definitely needed to reach for a sed reference guide for this one, but looking at the animated GIF of the script running, it is recognizably Super Mario World, albeit with minimal gameplay beyond jumping obstacles and avoiding or destroying koopas et al. Creator [Ivan Chebykin] is for certain a master of the dark arts.


Digging in a bit deeper, it’s not strictly speaking 100% sed. A wrapper shell script is required to interface to the shell and grab the keyboard input to pass along. This is simply because sed is a stream processor, and as such it requires text to be fed into it, and it produces a text output. It has no way of reading the terminal input directly, hence the wrapper script. However, all the game logic and ‘graphics’ rendering is pure sed, so that’s perfectly reasonable.


Such programming demos are a great way to hone the finer points of various tools we use every day, whilst not being serious enough to matter if we fail. Pushing the boundaries of what can be done with these basic nuts and bolts we take for granted, is for us the very essence of software hacking, and bravo we say.


Reckon you could top this? Show us! In the meantime, here’s a guide to hacking the recently released Game and Watch, and then doing the decent thing and running DOOM on it. Finally, sed is notoriously tricky to work with, so to help here’s a graphical debugger to make things a little clearer.



Support the originator by clicking the read the rest link below.