Definitely not fast for me, actually it lags a lot and I have to press keys well in advance to steer the snake into the food. Or is it so fast that I'm seeing only one frame every few hundreds and it moves almost one full screen between each position I can see?
In 1998 Assembly programmers who typically participated in Demo competitions did a series of size coding challenges. The first one was a Snake game (Nibbles), all in a DOS environment. The winning entry was 48 bytes long.
There were also some creative attempts that took less than 48 bytes and got disqualified. One of those encode the entire game in a series of empty folders using the folder names.
Edit: the original Hugo size coding competitions were created by Claus-Dieter Volko (Alias: Adok).
the winning 48-byte entry isn't really snake (nibbles), as the length of the snake grows with every move, rather than with every bit of food consumed. looks more like tron.
I would enjoy these posts more if they actually documented how the game implementation works, rather than just dumping an assembly file for the reader to figure out.
Also, I don't find “fits into a QR code” all that impressive. QR codes can contain kilobytes of data (see: COVID certificates), which is considered a lot in the demo scene (e.g. Google "256B demo" to see some really impressive examples). I bet you could implement a fully graphical Snake clone in less than 1024 bytes.
24 comments
[ 2.4 ms ] story [ 67.0 ms ] threadhttps://hugi.scene.org/compo/compoold.htm#compo1
There were also some creative attempts that took less than 48 bytes and got disqualified. One of those encode the entire game in a series of empty folders using the folder names.
Edit: the original Hugo size coding competitions were created by Claus-Dieter Volko (Alias: Adok).
Edit: Typos
I had also never seen a source code example for running an HTML embedded DOSBOX, so that was pretty interesting too.
Also, I don't find “fits into a QR code” all that impressive. QR codes can contain kilobytes of data (see: COVID certificates), which is considered a lot in the demo scene (e.g. Google "256B demo" to see some really impressive examples). I bet you could implement a fully graphical Snake clone in less than 1024 bytes.
Pressing opposite direction kills you
Inputs aren't buffered so fast inputs are either dropped or kill you
Sometimes the snake just randomly grows??
Not a very good implementation
is this the right file?
oh i guess with `dosbox -c 'cycles 1' .` it's playable actuallyi suspect it will still eventually hang tho
I'm on Intel Mac, btw.