KEMBAR78
project on snake game in c language | PPT
Under the guidance of :- Presented By:-
Name : Aparna Soni Name : Ashutosh kumar
Designation: Asst. Professor Roll. No: 3032213012
CSE department Branch and Sem: CSE &8th
Department of Computer Science & Engineering
Chhatrapati Shivaji Institute of Technology, Durg
SNAKE GAME
Presentation
on
Contents
• Introduction of project
• History of Snake Game
• Requirements
• Objective
• ER Diagram
• Features & About the project?
• Computer Graphics
• Testing
• Future scope of the program
• References
04/20/17
SNAKE GAME
2
Introduction
04/20/17SNAKE GAME3
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
 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.
History of Snake Game
04/20/17TITLE OF PROJECT4
Requirements
04/20/175
SOFTWARE REQUIREMENTS:
Operating system :- WINDOWS
Application software :- TURBO C++ 2.0
Language :- C(Computer Graphics)
HARDWARE REQUIREMENTS
Hard Disk :- 32 GB
RAM :- 128 MB
Processor :- Any Pentium version
SNAKE GAME
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.
04/20/17TITLE OF PROJECT6 SNAKE GAME
04/20/17TITLE OF PROJECT7
enter the main menu of snake
game
Press
any key
to start
Enter name Play game quit
Do you want
to continue?
START
STOP
SNAKE GAME
ER Diagram
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 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
04/20/17TITLE OF PROJECT8 SNAKE GAME
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.
04/20/17TITLE OF PROJECT9 SNAKE GAME
❏ 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
❏ Graphics mode must be closed at the end
04/20/17TITLE OF PROJECT10
intigraph(&graphics_driver,&graphics_mode,Path _to_driver);
closegraph();
SNAKE GAME
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 outputs of my project are as follows:
04/20/17TITLE OF PROJECT11 SNAKE GAME
04/20/17TITLE OF PROJECT12
Main menu
Playing
04/20/17TITLE OF PROJECT13
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:
1.It can be made with good graphics.
2.We can add more options like Top scores and Player Profile
3. We can add multiplayer option
04/20/17TITLE OF PROJECT14
References
https://en.wikipedia.org/wiki
https://www.youtube.com
https://www.cs.bham.ac.uk
Books
a. Let us C by Yashwant Kanetkar
b. Programming with C by E Balagurusamy
c. Graphics under C by Yashwant Kanetkar
04/20/1715 SNAKE GAME
Thank You

project on snake game in c language

  • 1.
    Under the guidanceof :- Presented By:- Name : Aparna Soni Name : Ashutosh kumar Designation: Asst. Professor Roll. No: 3032213012 CSE department Branch and Sem: CSE &8th Department of Computer Science & Engineering Chhatrapati Shivaji Institute of Technology, Durg SNAKE GAME Presentation on
  • 2.
    Contents • Introduction ofproject • History of Snake Game • Requirements • Objective • ER Diagram • Features & About the project? • Computer Graphics • Testing • Future scope of the program • References 04/20/17 SNAKE GAME 2
  • 3.
    Introduction 04/20/17SNAKE GAME3 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
  • 4.
     The Snakehas 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. History of Snake Game 04/20/17TITLE OF PROJECT4
  • 5.
    Requirements 04/20/175 SOFTWARE REQUIREMENTS: Operating system:- WINDOWS Application software :- TURBO C++ 2.0 Language :- C(Computer Graphics) HARDWARE REQUIREMENTS Hard Disk :- 32 GB RAM :- 128 MB Processor :- Any Pentium version SNAKE GAME
  • 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. 04/20/17TITLE OF PROJECT6 SNAKE GAME
  • 7.
    04/20/17TITLE OF PROJECT7 enterthe main menu of snake game Press any key to start Enter name Play game quit Do you want to continue? START STOP SNAKE GAME ER Diagram
  • 8.
    Features & Aboutthe 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 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 04/20/17TITLE OF PROJECT8 SNAKE GAME
  • 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. 04/20/17TITLE OF PROJECT9 SNAKE GAME
  • 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 ❏ Graphics mode must be closed at the end 04/20/17TITLE OF PROJECT10 intigraph(&graphics_driver,&graphics_mode,Path _to_driver); closegraph(); SNAKE GAME
  • 11.
    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 outputs of my project are as follows: 04/20/17TITLE OF PROJECT11 SNAKE GAME
  • 12.
  • 13.
  • 14.
    FUTURE SCOPE OFTHE 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: 1.It can be made with good graphics. 2.We can add more options like Top scores and Player Profile 3. We can add multiplayer option 04/20/17TITLE OF PROJECT14
  • 15.
    References https://en.wikipedia.org/wiki https://www.youtube.com https://www.cs.bham.ac.uk Books a. Let usC by Yashwant Kanetkar b. Programming with C by E Balagurusamy c. Graphics under C by Yashwant Kanetkar 04/20/1715 SNAKE GAME
  • 16.