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 Bros. 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.

7 thoughts on “Super Mario In Sed, Sort Of

      1. No idea what you’re talking about other than being sarcastically pedantic, but if you were you should argue it’s not Mario but a rectangle.

        But Eddie is correct – the gif is a clone of the NES ‘Super Mario Bros’ with the famous world 1-1 level layout.

        It is NOT recognizably Super Mario World – which has a vastly different layout. You may as well call it Mega Man or Yoshi’s Island at this point.

        You’d have to be very sheltered, not used the internet or at least HaD, or wet behind the ears to not know this.

    1. It is. I made a typo no big deal. Corrected. I’ve actually been playing the old NES and SNES version of all the Mario series lately. Not sure why I had ‘World’ stuck in my head at the time, might possibly have something to do with the shear number of hours playing it on the GB when it first came out.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.