omkar MAD
omkar MAD
ABSTRACT
Snake game is a simple console application without graphics. In this project, you can
play the popular “Snake Game” just like you played it elsewhere. You have to use the
up, down, right or left arrows to move the snake. Foods are provided at the several co-
ordinates of the screen for the snake to eat.
Every time the snake eats the food, its length will by increased by one element along
with the score. I have used Python as Programming language for writing the code for
the project and VsCode for writing the programs. Operating system used Windows 10.
INTRODUCTION
Playing games is fun and exciting it gives us relief from stress and unwind from our
stressful works. Many of us spend our vacant time or others that use most of their time
in playing and exploring new games. Today, with the rapid development of technology
we have, games that are rising up together with it. Nowadays with the technology we
have many games that are developing for computer most specifically for windows.
With the high technology equipped with these computers, computer games become
robust and attract many people to buy or have this gadget for them to experience
what’s inside it which makes it a trend for the new generation of gadget.
Snake game is a computer action game; whose goal is to control a snake to move and
collect food in a map. It has been around since the earliest days of home computing
and has re-emerged in recent years on mobile phones.
It isn’t the world’s greatest game, but it does give you an idea of what you can achieve
with a simple python program, and perhaps the basis
By which to extend the principles and create more interesting games on your own.
To move the snake, use ‘up arrow’ for up, ‘down arrow’ for down, ‘left arrow’ for left
and ‘right arrow’ for right. Press ‘q’ to exit the game at any time, press ‘c’ to continue
the game.
The aim of the game is to collect the dots (food) and avoid the obstacles (crosses
borders). As you collect the food, the snake gets longer. The score also increases.
There is no concept of lives. Once you hit an obstacle, that’s it, game over.
LITERATURE SURVEY
The history of the Snake game goes back to the 1970's, the concept originated in the
1976 arcade game Blockade, and its simplicity has led to many implementations.
However, it was the 1980'swhen the game took on the look that we will be using. It
was sold under numerous names and many platforms but probably gained widespread
recognition when it was shipped as standard on Nokia mobile phones in the late 1990's.
The first published Nokia, for monochrome phones. It was programmed in 1997 by
Taneli Armanto of Nokia and introduced on the Nokia 6110.The game involves
controlling a single block or snakehead by turning only left or right by ninety degrees
until you manage to eat an block. When you get the block, the Snake grows an extra
block or body segment. If, or rather when, he snake bumps into the edge of the screen
or accidentally eats himself the game is over. The more blocks the snake eats the
higher the score.
SYSTEM DESIGN
To create a Snake game that allows users to control the movement of a snake on a
screen, to get points for eating food and avoiding running into the walls or the growing
tail of the snake itself. In this problem, we want to write a game where a graphical
representa tion of a snake moves across the screen.
When it encounters a piece of food, the snake grows longer and we gain a point. If it
hits the wall we die. To write this program we are going to need:
Our system is going to involve working with both hardware and software, and so we
will need to understand what we have available in hardware that can assist us. If we
build our software so that the snake is controlled by directional arrows on the
keyboard.
Now that understand how our hardware will work in the design of our system, let’s
move on to starting the design of our software system.
SYSTEM REQUIREMENTS
HARDWARE REQUIREMENTS
FUNCTIONAL REQUIREMENTS
Here are the requirements (functional requirements) for how the snake moves.
NON-FUNCTIONAL REQUIREMENTS
I. Robustness :
Robustness is nothing but its ability that it can tolerate the affects of system
functional body. And it can also be defined as its systems ability that it can
withstand to change without transforming its initial stable configuration
II. Reliability:
The system is trustworthy and it is consistently good in performance. It can also
be stated as the system performs the function without any failure under certain
conditions and specified period of time.
III. Availability:
The system is available 24*7. Availability and Reliability are directly
proportional as reliability increase availability also increases. The user can have
access to the system all the time.
IV. Reusability:
The system can be used any number of times by the specific user. and the
reusability is consistent, adaptable and stable.
V. Effectiveness:
The algorithm is capable of producing desired result or it has the ability to
provide better results.
WORKING ALGORITHM
Let's look at how a program to run the whole game might look:
1. Draw the playing area with bounding rectangle, set the counter to zero and
display it.
6. If the snake is over food, eat it, increase the score, grow, move the food,
8. Go back to 4.
SAMPLE OUTPUT
CONCLUSION
Foods are provided at the several co-ordinates of the screen for the snake to eat. Every
time the snake eats the food, its length will increased by one element along with the
score.
It isn’t the world’s greatest game, but it does give you an idea of what you can achieve
with a relatively simple python programming, and perhaps the basis by which to
extend the principles and create more interesting games on your own.
FUTURE SCOPE
In this project, I have used simple application, this project will be able to implement in
future after making some changes and modifications as I made this project at low level.
The modifications that can be done in this project are:
2. We can add more options like Top scores and Player Profile.
REFERENCES
17