Snake game with c++ and the tools are codeblocks(IDE) and windows operating system(optional)

faisal232606 18 views 18 slides Sep 04, 2024
Slide 1
Slide 1 of 18
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18

About This Presentation

Snake game with C++


Slide Content

Snake Game Presented by Faisal Ahmed 16CSE006 Department of Computer Science and Engineering BSMRSTU Supervised by Faruk Hossen Assistant Professor, Department of Computer Science and Engineering BSMRSTU

Contents: Introduction of project History of Snake Game Objective R equirements C++ Libraries Used Functiona l Requirements Algorithm Flowchart

Introduction: The game called "Snake" or "Snake Game" typically involve the player controlling a line or snake. The game involves the snake or line eating items which make it longer, and to avoid running into a border or the snake itself. This Project in C language of Snake Game is a simple console application,you have to use the up, down, right or left arrows to move the snake. Every time the snake eats the food, its length will by increased by one element along with the score.

History of Snake Game: The snake game’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 1997, it found its way in 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 throughout the next decade.

Objective This Project in C++ language of Snake Game is a simple console application. 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. 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.

requirements Software Requirements: Operating system: Windows or Linux or MacOs C++ compiler Hardware requirements: 4Gb Ram Processor: i3 and above

C++ Libraries used: iostream windows.h conio.h fstream

Functional requirements: The snake must appear to move around the screen The snake must turn in response to user input The snake will increase in length if it eats food The snake will die if it runs to the walls The snake never stops moving

algorithm Step1:Draw the playing area with bounding rectangle, set the counter to zero and display | Step2: Draw the snake in a starting position . Step3: Draw the food in a starting location. Step4: On user input, change snake direction. Step5: Move the snake one move Step6: If the snake is over food, eat it, increase the score, grow, move the food. Step7: else if the snake is over in a wall or snake hits himsef , die. Step8: Go back to step 4 Step9: Until the snake die

I nitial game K ey protection and delay for moving M oving N ode increment Food generated Y es Meet food No Game over Y es No Flowchart start end

Results: Home Page

Main Menu

Playing: 1. Snake Moving

2. Size and score increasing after eating

Exit

Limitations The existing system only provides a text-based interface, which is not as user-friendly as Graphical user Interface. Since the system is implemented in Manual, the response is very slow. The transactions are executed in off-line mode, hence on-line data capture and modification is not possible.[2]

Future work of the project It can be made with good graphics. We can add more options like Top scores and Player Profile We can add multiplayer option

THANK YOU
Tags