SNAKE GAME..
PRESENTED BY:
FATIMA LATIF
ZAINA SHAMEEM
1
CONTENTS
• Introduction Of Project
• History Of Snake Game
• Requirements
• Objective
• Entity Relationship (ER) Diagram
• Features & About The Project?
• Computer Graphics
• Testing
• Future Scope Of The Program
• References
2
INTRODUCTION
 The game called "Snake" or "Snake Game" typically involve the
player controlling a line or snake, there is no official version of the
game, so gameplay varies. The most common version of the game
involves the snake or line eating items which make it longer, with the
objective being to avoid running into a border or the snake itself for
as long as possible.
 The player loses when the snake either runs into a border or its own
body. Because of this, the game becomes more difficult as it goes on,
due to the growth of the snake.
 Nokia has installed the "Snake Game" on many of its phones. The
game is also available on several websites, including YouTube, which
allows viewers to play the game while a video loads
3
HISTORY OF SNAKE
GAME
• The Snake has appeared in many different
forms over the decades, but it's first
appearance took place in the mid 1970s
and was called Blockade. It was the creation
of Gremlin Industries, who specialized in
coin-operated arcade machines. In 1984,
they closed their doors, never to open
again. But their game still lives on.
• By 1997, it had found its way into people's
pockets, onto their Nokia phones and
created the craze of mobile gaming among
teenagers. The Nokia 6110 was Nokia's
first phone with Snake, and they continued
to manufacture new models with the game
installed throughout the next decade.
4
REQUIREMENTS
SOFTWARE REQUIREMENTS
Operating System Operating System
Operating System Application Software Turbo C++ 2.0
Language C(computer Graphics)
5
OBJECTIVE
 This Project in C language of Snake Game is a simple
console application with very simple 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.
 It isn't the world's greatest game, but it does give you an
idea of what you can achieve with a relatively simple C
program, and perhaps the basis by which to extend the
principles and create more interesting
games of your own. 6
ER DIAGRAM
Press any key to
start
Enter
name
Play
game
Quit
Do you want to
continue?
Sto
p
Start
Enter the main menu of snake
game
7
FEATURES & ABOUT
THE PROJECT?
 This snake game is just similar to games which are
found under mobile games section. It uses the
concept of graphics to display the menu items and
all objects on a single screen.
 An instruction has been given on the top right side
of the menu where users must go through the
instruction to play this game.
 Players will be able to check their result after games
get over.
 The score section will display the total score of the
player, game level and maze which has been used.
 The object snake position has been set random, so
whenever player will start the game, the snake will
appear at random location every time.
 The snake object will always appear in green color.
 The number keys “d,a,w,s" has been set within the
program to move the snake to right, left, top and
bottom respectively.
8
COMPUTER GRAPHICS
 Computer Graphics is one of the most powerful
and interesting aspect of computers.
 There are many things we can do in graphics apart
from drawing figures of various shapes.
 All video games, animation, multimedia
predominantly works using computer graphics.
GRAPHICS IN C
 There is a large number of functions in C which are
used for putting pixel on a graphic screen to form
lines, shapes and patterns.
 The Default output mode of C language programs
is "Text" mode
 We have to switch to "Graphic" mode before
drawing any graphical shape like line,
rectangle, circle etc.
9
• First of all, we must include the "graphics.h" header file
in our source
• Program GCC compiler doesn't provides inbuilt facility to
run graphics.h library.
• So you are not able to run graphics in C language.
• The initgraph function is used to switch the output from
text mode to graphics mode.
• The initgraph function takes three arguments:
• intigraph(&graphics_driver,&
graphics_mode,Path_to_driver);
Graphics mode must be closed at the end
• closegraph();
10
TESTING &
SCREENSHOTS
• Testing is the major control measure used during
software development. Its basic function is to detect
errors in the software. During requirement analysis
and design, the output is a document that is usually
textual and no executable. After the coding phase,
computer programs are available that can be executed
for testing purpose. This implies that testing not only,
has to uncover errors introduced during coding, but
also errors introduced during previous phase. Thus the
goal of testing is to uncover the requirements, design
and coding errors in the programs. So after testing the
11
MAIN MENU
12
PLAYING
13
FUTURE SCOPE OF
THE PROJECT…
 Our project will be able to implement in
future after making some changes and
modifications as we make our project at a
very low level. So, the modifications that
can be done in our project are:
 It can be made with good graphics.
 We can add more options like Top scores
and Player Profile
 We can add multiplayer option
14
[1] https://www.youtube.com/watch?v=rFFVyNn9_8A
[2] https://www.coursehero.com/file/95289066/Snake-gamepdf/
[3] Nossal, N., Iida, H.: Game refinement theory and its application
to score limit games. In:
2014 IEEE Games Media Entertainment (GEM), pp. 1–3. IEEE (2014)
[4 ]https://www.cs.bham.ac.uk
[5] Johnson, W. (1990). The snake game. New York, Knopf.
[6] https://www.scribd.com/doc/59555708/Snake-Game-In-C
[7] Ehlis, T.: Application of genetic programming to the “snake
game”. Gamedev. Net 175
(2000)
REFERENCES
15
THANK YOU…
16

Snake_game presentation-1.pptx in whitho to

  • 1.
    SNAKE GAME.. PRESENTED BY: FATIMALATIF ZAINA SHAMEEM 1
  • 2.
    CONTENTS • Introduction OfProject • History Of Snake Game • Requirements • Objective • Entity Relationship (ER) Diagram • Features & About The Project? • Computer Graphics • Testing • Future Scope Of The Program • References 2
  • 3.
    INTRODUCTION  The gamecalled "Snake" or "Snake Game" typically involve the player controlling a line or snake, there is no official version of the game, so gameplay varies. The most common version of the game involves the snake or line eating items which make it longer, with the objective being to avoid running into a border or the snake itself for as long as possible.  The player loses when the snake either runs into a border or its own body. Because of this, the game becomes more difficult as it goes on, due to the growth of the snake.  Nokia has installed the "Snake Game" on many of its phones. The game is also available on several websites, including YouTube, which allows viewers to play the game while a video loads 3
  • 4.
    HISTORY OF SNAKE GAME •The Snake has appeared in many different forms over the decades, but it's first appearance took place in the mid 1970s and was called Blockade. It was the creation of Gremlin Industries, who specialized in coin-operated arcade machines. In 1984, they closed their doors, never to open again. But their game still lives on. • By 1997, it had found its way into people's pockets, onto their Nokia phones and created the craze of mobile gaming among teenagers. The Nokia 6110 was Nokia's first phone with Snake, and they continued to manufacture new models with the game installed throughout the next decade. 4
  • 5.
    REQUIREMENTS SOFTWARE REQUIREMENTS Operating SystemOperating System Operating System Application Software Turbo C++ 2.0 Language C(computer Graphics) 5
  • 6.
    OBJECTIVE  This Projectin C language of Snake Game is a simple console application with very simple 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.  It isn't the world's greatest game, but it does give you an idea of what you can achieve with a relatively simple C program, and perhaps the basis by which to extend the principles and create more interesting games of your own. 6
  • 7.
    ER DIAGRAM Press anykey to start Enter name Play game Quit Do you want to continue? Sto p Start Enter the main menu of snake game 7
  • 8.
    FEATURES & ABOUT THEPROJECT?  This snake game is just similar to games which are found under mobile games section. It uses the concept of graphics to display the menu items and all objects on a single screen.  An instruction has been given on the top right side of the menu where users must go through the instruction to play this game.  Players will be able to check their result after games get over.  The score section will display the total score of the player, game level and maze which has been used.  The object snake position has been set random, so whenever player will start the game, the snake will appear at random location every time.  The snake object will always appear in green color.  The number keys “d,a,w,s" has been set within the program to move the snake to right, left, top and bottom respectively. 8
  • 9.
    COMPUTER GRAPHICS  ComputerGraphics is one of the most powerful and interesting aspect of computers.  There are many things we can do in graphics apart from drawing figures of various shapes.  All video games, animation, multimedia predominantly works using computer graphics. GRAPHICS IN C  There is a large number of functions in C which are used for putting pixel on a graphic screen to form lines, shapes and patterns.  The Default output mode of C language programs is "Text" mode  We have to switch to "Graphic" mode before drawing any graphical shape like line, rectangle, circle etc. 9
  • 10.
    • First ofall, we must include the "graphics.h" header file in our source • Program GCC compiler doesn't provides inbuilt facility to run graphics.h library. • So you are not able to run graphics in C language. • The initgraph function is used to switch the output from text mode to graphics mode. • The initgraph function takes three arguments: • intigraph(&graphics_driver,& graphics_mode,Path_to_driver); Graphics mode must be closed at the end • closegraph(); 10
  • 11.
    TESTING & SCREENSHOTS • Testingis the major control measure used during software development. Its basic function is to detect errors in the software. During requirement analysis and design, the output is a document that is usually textual and no executable. After the coding phase, computer programs are available that can be executed for testing purpose. This implies that testing not only, has to uncover errors introduced during coding, but also errors introduced during previous phase. Thus the goal of testing is to uncover the requirements, design and coding errors in the programs. So after testing the 11
  • 12.
  • 13.
  • 14.
    FUTURE SCOPE OF THEPROJECT…  Our project will be able to implement in future after making some changes and modifications as we make our project at a very low level. So, the modifications that can be done in our project are:  It can be made with good graphics.  We can add more options like Top scores and Player Profile  We can add multiplayer option 14
  • 15.
    [1] https://www.youtube.com/watch?v=rFFVyNn9_8A [2] https://www.coursehero.com/file/95289066/Snake-gamepdf/ [3]Nossal, N., Iida, H.: Game refinement theory and its application to score limit games. In: 2014 IEEE Games Media Entertainment (GEM), pp. 1–3. IEEE (2014) [4 ]https://www.cs.bham.ac.uk [5] Johnson, W. (1990). The snake game. New York, Knopf. [6] https://www.scribd.com/doc/59555708/Snake-Game-In-C [7] Ehlis, T.: Application of genetic programming to the “snake game”. Gamedev. Net 175 (2000) REFERENCES 15
  • 16.