Snakes, snakes, yet more snakes!

April 10th is the deadline to participate in the Retro Snake Game Jam, a retro programming challenge organized by the Retro Programmers Inside group in collaboration with Phaze101 and hosted on the itch.io platform. The goal of the challenge is to create a game with a little snake, that might either be the protagonist or the opponent to avoid or defeat. Games for 8/16-bit computers and consoles based on the CPUs belonging to the Z80, 6502, and Motorola 68K families are allowed.

baSnake

So I decided to submit baSnake, originally programmed 6 years ago in BASIC for the ZX Spectrum for another game jam on itch.io and later enhanced to take advantage of some features of the ZX Spectrum Next. To participate, I had to prepare a specific version containing the message “Participated in the Retro Programmers Inside (RPI) and Phaze101 Game Jam“, as required by the rules of the Retro Snake Game Jam. This version, along with the previous ones, is available on baSnake’s itch.io page.

baSnake gameplay video (ZX Spectrum Next)

YAS

baSnake was not the only project in which I dealt with pixelated snakes. In 2015, while tinkering with CHIP-OTTO, my CHIP-8 interpreter for ZX Spectrum, and WEB-OTTO, the web browser counterpart, I created a Snake clone specifically for this platform, called – unsurprisingly – YAS – Yet Another Snake. Although written in completely different languages, baSnake inherits from YAS the feature which allows to select the scenario in which to play.

Recently, I was pleased to learn that YAS has been included in the official distribution of EMMA02, a multi-platform emulator capable of running the CHIP-8 interpreter originally developed for the Cosmac computers.

YAS running in the ZX Spectrum Next version of CHIP-OTTO, my CHIP-8 interpreter

ZNAKE

But that’s not all: to get to my first implementation of a Snake-style game, we need to go back even further in time, to be precise, to 2005. In that year, I created ZNAKE, my first complete (albeit minimal) video game project for a retrocomputer.

ZNAKE is, in fact, a simple Snake-style game for the Sinclair ZX Spectrum. The goal of the game is to guide the snake so that it can eat the apples that appear on the screen, avoiding hitting the walls or the snake itself. For each apple eaten, the player earns points, but the snake’s body lengthens, making the game more difficult.

ZNAKE loading screen (RealSpectrum emulator, Windows XP)
ZNAKE loading screen (RealSpectrum emulator, Windows XP)

ZNAKE is the result of my desire to create a game, albeit simple, for the ZX Spectrum computer, which I am particularly fond of. For some time, I already used the wonderful Z88DK before, but I had never gone beyond some simple tests until one day, in 2005, inspired by a tutorial (unfortunately, I have lost the reference, we are talking about too many years ago) on the X window system, I decided to implement the snake as a linked list. Playing with malloc and putchar, I implemented ZNAKE almost entirely in C, using a bit of assembly. Finally, I even transferred ZNAKE to tape, so that it could be played on the real Spectrum as well as on emulators.

Later, thanks to the Qaop emulator, I also created a Dashboard widget (now you would call it an “app”) for MacOSX and a version for some Linux desktops.

Therefore, ZNAKE can be considered even more a retro project, as it was developed for a retro computer almost 20 years ago; the iBook G4 that I used at the time is now a retro computer itself! However, by playing ZNAKE, you can already get an idea of what baSnake’s style would be.

After this dive into the past, I thought that, after adding the aforementioned message, ZNAKE could also participate in the Retro Snake Game Jam. The original program turned out to be no more compatible with recent versions of z88dk, so I had to make some modifications, taking the opportunity to improve the code, by replacing some parts written by me with equivalent functions provided by z88dk libraries. The result is therefore, as usual, available for download or to play via web browser (thanks to the JSSpeccy3 emulator) on the dedicated page on the itch.io platform.

ZNAKE gameplay video

So, I think that 3 implementations of Snake are more than enough! Although, a BASIC 10 Liner version, maybe… 🙂

Leggi in Italiano

Leave a comment

Your email address will not be published. Required fields are marked *