Coding the Nokia Snake Game!
- e-BLITZINE KMV
- Nov 14, 2023
- 2 min read
Updated: Nov 26, 2023
While conversing with my mom she tells me things about the time when I was a child, it takes me aback sometimes because it is just so hard to imagine that at some point all my parents could communicate through, while my dad used to be at work, was a pager. The oldest phone I remember using was my mother’s flip phone and then the classic BlackBerry before we got an actual touchscreen smartphone when I was in tenth grade. My father, too, had an old Nokia until I was in seventh grade. It all reminds me that there was, in fact, an era when iPhones and Android smartphones did not dominate the mobile phone business.
One of my most cherished childhood memories is the phones with buttons, looking back it makes me so nostalgic and I will probably go to lengths just to type a message out on BlackBerry again or play Diamond Rush on my tuition teacher’s keypad phone again. Talking about classic games, we cannot leave out Snake.
Snake was one of the first games on mobile phones. It was first released in 1997. Contrary to what everyone believes, Snake wasn’t first introduced in the Nokia 3310 but rather the Nokia 6110. When the Nokia 3310 was launched in 2000, it rapidly grew popular in that pre-smartphone era, and hence, people associate Snake with the Nokia 3310.

Source: Flickr
(https://www.flickr.com/photos/64917630@N00/8185657641)
Taneli Armanto, the man behind Snake, worked at Nokia for 15 years after he left university where he was pursuing computer science and mathematics at the undergraduate level. He was interested in game development and programming, back when he was a teenager he joined an IT group to learn a bit of programming and his interest soon grew.
Back then, coding was way too different; the code was handwritten line-by-line, so many functions we know of today were not heard of, and everything was mostly done manually. The displays were small, just 48 x 84 black and white pixels, and the memory of phones was limited especially for games when there were other prioritized functions for the phones. Snake was programmed in C language.
Applesoft II was released by Microsoft in 1978, over 45 years ago. Before that Integer BASIC was launched for Apple II, one of the first colored-display microcomputers, but it lacked floating-point math. Applesoft II was made public at the West Coast Computer Faire in April 1977 had overcome a lot of shortcomings of Apple BASIC.
I came across this video on a YouTube channel, The Coding Train, and decided to try this out! Here are the results.

I used this Applesoft BASIC in Javascript emulator to simulate the code. The series of ‘S’ forms the snake and the ‘0’ represents the food. You can play this using A, S, W and D keys following the standard directions in games. Although the position of food is still not completely arbitrary and the game does not contain all the necessary checks or exception handling yet, it was fun and fascinating to watch, learn and put down.
Coding 40 years ago surely was cumbersome but even something as simple as a snake game from the 90s inspires marvel at human creativity and creation.
.png)



Comments