Nokia’s Snake – A Mobile Snake Game That Still Is Remembered Today

Snake Game

The evolution of graphics, internet access and phone storage helped the mobile gaming industry today offer people a completely new arcade especially when it comes to mobile gaming on smartphones. 

Temple Run, Flappy Bird, PUBG, FortNite, Candy Crush, Need For Speed and many other popular games of today are making strides. Yet, they all owe it to one animated reptile that slithered around a two inch screen for years.

That very reptile belonged to a game known as Snake. Being a simple yet addictive game, Snake game was launched in 1997, in its mobile phone avatar with the Nokia 6110. For those who do not remember, the Nokia 6110 was a blue candy bar-shaped cellular phone having a single antenna.

The snake game was based on the simple idea of an elongating reptile that moved faster on the screen, depending on how much dots (food) it consumed. But it died whenever it collided into itself.

What was Snake’s launch known for?

Snake is considered to have started a new era in mobile gaming despite being the game in c language. This industry is estimated to top USD$ 100 Billion in terms of revenue this very year. Yet, it was actually the second version of the much indebted name that became a household name.

The gameSnake II was launched in 2000 with Nokia’s 3310, and it became an obsession for the whole generation. The name was no longer just a name and the snake game with language C was no longer a line too. Rather it took on the proper form of a snake. There were also bonuses too and the screen was cyclical. This allowed one to go through the screen’s bottom and come back out from the top.

In not just America, but also across the world (especially in India), a lot of children were hooked and were eagerly competing for the highest score whether they were relaxing, pretending to study, sitting in the park or sitting at an eatery. The snake game proved to be a hit in India particularly.

This would result in them draining the phone’s battery and thus earning the wrath of both teachers, siblings, parents and other elders, as collateral damage. Nevertheless, it was worth a lot for them, and still is.

How far reaching is Snake as a legendary game?

A 23 year old graduate of philosophy from India recalls that he has been playing video games for the past 15 years. He has been playing snake game since he was a toddler. He also stated he’d play it regularly on his mother’s Nokia phone whenever he would be coming back with her from school. 

According to him, Snake challenged the most primal part of people. They observed it growing and moving, with each thing it ate. Those who played it could not help but keep it going. Despite the snake game with Language C used in development, it garnered a really monumental audience around the world.

A 27-year old mobile game developer based in Hyderabad, India, recalls how they spent time with their cousins vying for turns on an individual phone. According to them, if they had to think about it then there was no need to fight at all over such a simple game. Yet it was like that because that is how the spirit was created by the game.

They further stated that Snake Game created the craving for just one more game, a mentality that fed into addiction in a lot of people. 

What made the game interesting?

It is true that whatever made the gamesnake interesting was that as the snake grew in size, its speed and difficulty in manoeuvering it across the screen increased. This is probably the reason why the game became quite addictive and at one point, it was embedded in almost 350 million Nokia phones worldwide.

There is also a sort of science behind the levels of difficulty in the game. This was done in a way that no one was ever discouraged from playing the gamesnake.

The game’s creator, Tanli Armanto, of Finland, revealed that he added a delay of ‘a few milliseconds’ deliberately right before the snake crashes. Why? He wanted to give players some extra time to change their tactics when playing the game. 

Also, he developed the Snake game with language C, the best programming language of its time. It was also the language suited for developing software for mobile phones at that time.

There were not many delays at the hardest level though and the buzzing sound that signaled the game being over is one that most millennials can still recall with a grin. Those millennials acquired their first cell phone when they entered university in the early 2000s. They even developed an addiction for the game in C, which they adore the most, even today.

What are the origins of the Snake Game?

The game’s concept began with the 1976 arcade game named Blockade. Developed by a British company Gremlin Interactive (which went bust in 1984), Blockade was designed as a two-player game where each player would guide their own snakes, leaving a solid line behind them. 

This very line worked as a Blockade. The player who lasted longer than the other was hence the winner. The concept was indeed simple, but it helped spawn and launch other games from competitors, especially Nibbler, Rattler Race and Worm.

What about Tetris’ supposed launch on Nokia 6110?

As a matter of fact, Tetris was to be launched with Nokia 6110. As per Tanli Armanto, he implemented and tested the game. Yet, he explained that the Tetris Company wanted a share out of each handset Nokia sold. The company was hence not agreeable to base any sort of payments on exact figures of cell phone sets it sold.

He eventually decided to bring in something different, something that would be in line with the specifications of Nokia 6110. Developing a Game in C was the right decision. The phone had a small screen and with only a few keys to control the game with less programming memory space available; the gamesnake was thus created.

In 2005, Armanto won a special reward from the Mobile Entertainment Forum. This was for his contribution towards helping the mobile entertainment industry grow at a nice pace.

What more to understand about the success of Snake?

The game underwent a complete overhaul, which was like a species evolving. Snake Xenzia was released in 2005 which had a red and white color scheme. Snake EX featured a reptile that could open its mouth whenever it ate food, thanks to improved graphics. 

Along came Snake 3D after 2005. Its leading character resembled the Jungle book character Kaa and its background was a lush green lawn with shrubs and fruit instead of the old green screen with black dots.

Yet, experts argue that the quality of the game went down when Nokia’s old mobile operating system Symbian became defunct. Its collaboration with Microsoft was sadly the kiss of death. The typical snake game in C is a legend despite Nokia’s downfall.

The coding outline (programming basis) of the Snake Game

Here is the outline boundary of the program for Snake using C language and draw ():

// C program to build the outline

// boundary using Boundary()

#include <stdio.h>

#include <stdlib.h>

 

//Game Variables

int i, j, Length = 28;

int width = 28, game_over, Score;

 

// Function to draw a boundary

void Boundary()

{

 

for (i = 0; i < Length; i++) {

     for (j = 0; j < width; j++) {

         if (i==0 || i==width – 1 || j == 0

             || j == Length – 1) {

                printf(“*”);

         }

         else {

                printf(” “);

         }

     }

        printf(“\n”);

}

}

 

//  Driver Function

int main()

{

Boundary(); // Function Call

 

return 0;

//  Driver Function

int main()

{

Boundary(); // Function Call

 

return 0;

}

setup(): This function is used for writing code so it can generate the dots (food) within the boundary limits  using the rand() function.

The rand()%20 function is used because the size of the boundary is length = 20 and width = 20 so the food dots are generated within the boundary limits.

 

void setup()

{

       game_over=0;

       int x=Length/2;

       int y=width/2;

      

       state1:

                  int foodx=rand()%20;

                  if(foodx==0)

                  goto state1;

       state2:

                  int food_y=rand()%20;

                  if(food_y==0)

                  goto state2;

       Score=0;

}

Input(): In this function, the programmer writes the code to take the input from the keyboard (U, H, J, K, Q keys).

void input()

{

       if(kbhit())

       {

                  switch(getch())

                  {

                            case ‘a’:

                                      flag=1;

                                      break;

                            case ‘s’:

                                      flag=2;

                                      break;

                            case ‘d’:

                                      flag=3;

                                      break;

                            case ‘w’:

                                      flag=4;

                                      break;

                            case ‘x’:

                                      game_over=1;

                                      break;

                  }

       }

}

 

Algorithm(): Here, write all the logic for this program like for the movement of the snake, for increasing the score, when the snake will touch the boundary the game will be over, to exit the game and the random generation of the food once the snake will eat the food.

 

void Algorithm()

 

{

       sleep(0.01);

       switch(flag)

       {

                  case 1:

                            y–;

                            break;

                  case 2:

                            x++;

                            break;

                  case 3:

                            y++;

                            break;

                  case 4:

                            x–;

                            break;

                  default:

                            break;

       }

      

       if(x<0 || x>Length || y<0 || y>width)

         game_over=1;

       if(x==foodx && y==food_y)

       {

                  state3:

                            foodx=rand()%20;

                            if(foodx==0)

                            goto state3;

                  state4:

                            food_y=rand()%20;

                            if(food_y==0)

                            goto state4;

                             

                  Score+=10;

       }

}

 

sleep(): This function in C is a function that delays the program execution for the given number of seconds. In this code sleep() is used to slow down the movement of the snake so it will be easy for the user to play.

main(): From the main() function the execution of the program starts. It calls all the functions.

 

 

 

void main()

{

       sleep();

       while(!game_over)

       {

                  Boundary();

                  input();

                  Algorithm();

       }

}

 

 

Complete C program to build the snake game is below:

 

// C program to build the complete

// snake game

#include <conio.h>

#include <stdio.h>

#include <stdlib.h>

#include <unistd.h>

 

int i, j, Length = 28, width = 28;

int game_over, Score;

int X Y, foodx, food_y, flag;

 

// Function to generate the food

// within the boundary

void setup()

{

game_over = 0;

 

// Stores Length and width

X = Length / 2;

Y = width / 2;

state1:

foodx = rand() % 20;

if (foodx == 0)

     goto state1;

state2:

food_y = rand() % 20;

if (food_y == 0)

     goto state2;

    

Score = 0;

}

 

// Function to make the boundaries

void Boundary()

{

    system(“cls”);

for (k = 0; k < Length; k++) {

     for (j = 0; j < width; j++) {

         if (k == 0 || k == width – 1

             || j == 0

             || j == Length – 1) {

                printf(“*”);

         }

         else {

             if (k==X && k==Y)

                    printf(“0”);

                else if (k == foodx

                         && j == food_y)

                    printf(“#”);

                else

                    printf(” “);

         }

     }

        printf(“\n”);

}

 

// Print the score after the ending of game.

    printf(“Score = %d”, Score);

    printf(“\n”);

    printf(“Press Q to end the game”);

}

 

// Function to take the input

void input()

{

if (kbhit()) {

    switch (getch()) {

     case ‘h’:

         flag = 1;

         break;

     case ‘j’:

         flag = 2;

         break;

     case ‘k’:

         flag = 3;

         break;

     case ‘u’:

         flag = 4;

         break;

     case ‘q’:

            game_over = 1;

         break;

     }

}

}

 

// Function for the logic behind

// each and every movement of the snake

void Algorithm()

{

sleep(0.01);

switch (flag) {

case 1:

     Y–;

     break;

    case 2:

     X++;

     break;

case 3:

     Y++;

     break;

case 4:

     X–;

     break;

default:

     break;

}

 

// If the game is over

if (Y < 0 || Y > width || X < 0 || X> Length)

     game_over = 1;

 

// If snake reaches the food

// then update the score

if ((X == foodx) && (Y == food_y)) {

state3:

     foodx = rand() % 20;

     if (foodx == 0)

         goto state3;

 

// After eating the above food

// generate new food

state4:

     food_y = rand() % 20;

     if (food_y == 0)

         goto state4;

        

     Score += 10;

}

}

 

// Driver Code

void main()

 // Generate boundary

setup();

 

// Until the game is over

while (!game_over) {

 

     // Function Call

     Boundary();

     input();

        Algorithm();

}

}

 

What now for Snake that Symbian does not exist?

Microsoft Corporation rebooted the game on its console Xbox One in February 2021. Though not the same game as it used to be, the new Classic Snake Adventures is a 4K update. It has numerous levels on a map with a snake that can bend and change its size during gameplay. 

Microsoft is well aware of the cult following Snake has. It has described this version as a state of the art game paying huge tribute and respect to the old Snake. Snake game with Language C will always remain a legend that will be respected, remembered and adored in the years to come.

Leave a Reply

Your email address will not be published.