Batch 28
Batch 28
SNAKE GAME
1
PROJECT
Click to edit Master title style
2 2
PROJECT OUTLINE
Click to edit Master title style
❖ ABSTRACT
❖ OBJECTIVE
❖ INTRODUCTION
❖ GAME ARCHITECTURE
❖ MODULES
❖ IMPLEMENTATION
❖ SAMPLE OUTPUT
❖ CONCLUSION
❖ FUTURE SCOPE
❖ REFERENCES
3
Click to edit Master title style 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
Vs Code for writing the programs.
4 4
OBJECTIVE
Click to edit Master title style
The objective of this python project is to build a snake game project.
In this python project, the player has to move a snake so it touches the fruit.
If the snake touches itself or the border of the game then the game will over.
To move the snake, use ‘up arrow’ for up, ‘down arrow’ for down, ‘left arrow’ for left and ‘right arrow’ for right.
The aim of the game is to collect the dots (food) and avoid the obstacles (crosses borders).
The score also increases. There is no concept of lives. Once you hit an obstacle, that’s it, game over.
5 5
INTRODUCTION
Click to edit Master title style
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.
6 6
Click to edit Master title style
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 is not 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.
7 7
GAME ARCHITECTURE
Click to edit Master title style
The Game Architecture is the simplified graphical view of the game.
It shows how the components work and the basic view of the game at action.
Simply it gives an overview of the game functionality and it makes the game easy to understand.
8 8
Click to edit Master title style
9 9
MODULES
Click to edit Master title style
PyGame:-
• Pygame is a cross-platform set of python modules designed for writing video games. It includes
computer graphics and sound libraries designed to be used with the Python Programming language.
• To install the library, you can use pip installer from the command line:
pip install pygame
import pygame
1010
Click to edit Master title style
IMPLEMENTATION
STEPS:-
• Installing Pygame.
• Create the screen.
• Create the Snake.
• Moving the Snake.
• Game over when snake hits the boundaries.
• Adding the Food.
• Increasing the length of the snake.
• Displaying the score 1111
SAMPLE
Click to edit Master title style OUTPUT
12
CONCLUSION
Click to edit Master title style
The project in python programming 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 be 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.
1313
Click to edit Master
FUTURE title style
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:
We can add more options like Top scores and Player Profile.
1414
Click to edit Master title style
REFERENCE
• https://www.edureka.co/blog/snake-game-with-pygame/
• https://pypi.org/project/pygame/
• https://www.educba.com/python-pygame/
• https://www.w3schools.com/python/module_random.asp
• https://www.programiz.com/python-programming/time
• https://data-flair.training/blogs/snake-game-python-program/
• https://www.youtube.com/watch?v=rFFVyNn9_8A
• http://www.c-sharpcorner.com/UploadFile/udeshikah/snake-game-applicat
ion-in-C-Sharp/
• http://www.dreamincode.net/forums/topic/243537-control-issue-with-snak
e-game-in-c%23/
• http://csharp.net-informations.com/communications/csharp-chat-client.ht
m
1515
Click to edit Master title style
Thank You!!
16