Graphic snakes - from VCV 3D plot to Windows batch programming

From the Saphire Frolic Tricorder Tin announcement post - discussing how the Tricorder 3-D plot is generated: (I didn’t want to hijack the announcement - this absolutely belongs in the lounge)

Your description of the graphing mechanism reminds me of another life when I implemented the Snake video game using nothing but Windows batch programming (commonly but mistakenly referred to as DOS).

The snake was very nearly as you describe, except the game snake would grow by one segment each time it ate some food. And of course it would die if it ran into itself or a wall.

Here is a video capture from an early version of the game prior to figuring out how to erase and write to individual character positions. Instead I was clearing the screen and then redrawing each frame in its entirety. The clear screen caused lots of flicker, accentuated by the video capture process that manages to catch frames when the screen is black.

The music is me on flute with my buddy Dan on kick drum turned on its side and played with a mallet. It has nothing to do with the game, but the video needed a sound track.

It was quite a challenge to create a real time video game within a purely text based console window and an absolutely crippled scripting language. But figuring out how to do the “impossible” was the whole point and great fun for a while. It is kind of crazy all the things we managed to accomplish with nothing but batch.

A few of us spent many hours reverse engineering totally undocumented behavior of Windows batch, without any code to look at - just lots of probing test scripts.

I’m still the top batch-file topic contributor on StackOverflow, though I rarely contribute any more. So if you ever need to solve a Windows batch programming problem - I’m your man! (crickets… :upside_down_face:)


I used to play that game in the 70’s. In like 2005 I made a multi user version in java. Kept the office busy for an hour.

1 Like

IIRC there was a whole Snake game’s source provided with QBasic that was part of the later MS-DOS bundles

1 Like

Respect! I used to do quite a bit of cmd script writing in DOS and Windows as well, but nowhere near to your archaic depths. The language is simply too … how can I put it, ugly, yes, that’s the word :slight_smile: I have also been known to do much crazier things with Unix shell scripting which is less ugly. Once wrote a 3000+ lines script which was a complete installation/configuration/un-installation program for a complex system involving setup of Oracle databases, Webshere environment etc. I learned a lot about when to STOP using shell scripts and move to a proper language instead :slight_smile: