1
TABLE OF CONTENTS
1. Acknowledgement…………………………………………………………..3
2.Introduction…………………………………………………………………….4
3. Technologies…………………………………………………………………….5
4.Functionality…………………………………………………………………….8
5. Future scope of Project…………………………………………………….17
2
ACKNOWLEDGEMENT
I would like to express my special thanks of gratitude to my
teacher Mr.......... who gave me the golden opportunity to do
this wonderful project of snake game .who gave me
guidelines for this project .I am really thankful to them.
3
INTRODUCTION
The Project is a game written in java based on the game
called ‘snake’ which has been around since the earliest days
of home computing and has re-emerged in recent years on
mobile phones.
This Project aims to bring fun and simplicityof snake
game .In that project it calculate score and time.
Snake is the common name for a video game concept
where the player maneuvers a line which grows in length,
with the line itself being a primary obstacle. The concept
originatedin the 1976 arcade game Blockade, and the ease of
implementingSnake has led to hundreds of versions (some
of which have the word snake or worm in the title) for many
platforms. After a variant was preloaded on Nokia mobile
phones in 1998, there was a resurgence of interest in the
snake concept as it found a larger audience.
It is not the world’sgreatest game, but it does give you an
idea of what you can achieve with a relativelysimple java
swing program,and perhaps the basis by which to extend
4
the principles and create more interesting games of your
own.
The snake moves to the Right, timer is set to some amount
of time, and if you manage to press Up or Down arrow and
then very fast Left (when the timer hasn't gone off), the
snake will move backwards and finally eat himself. Most of
the games doesn't allow you to change from Right to Left
(or Up to Down etc.) in one step, but this is allowed. I
prevent players from doing that by implementing
temporary direction, that reads the current direction at the
begining of a time period (or refresh rate - it is the same
here).
This game has been built using Java which is platform
independent and applet based hence lightweight.
The snake game is simple game.In this game the snake is
eating some foods and get its size larger in step by step and
getting some score
This is small game .In this if the player has to change the
direction of the snake for getting food for snake.
5
TECHNOLOGIES
JAVA LANGUAGE:-
Java is a popular general-purpose
programming languageand computing platform. It is
fast ,reliable&secure. Java is designed for the distributed
environment of the internet.
Java makes an effort to eliminateerror prone
situationsby emphasizing
mainly on compile time error checking and runtime
checking.
JAVA:-
Java is a simple ,distributed object oriented
programming languagewhich provides the security ,high
performance,robustness.
Java is a portable and Architectural neutral language
which can be interpreted.
Java is multithreadedand dynamic language.
6
SWING:-
Swing API is a set of extensibleGUI componentsto
ease the developer’s
Life to create JAVA based front end/GUI Applications. It is
build on top of AWT API and acts as a replacement of AWT
API, since it has almost every control corresponding to
AWT controls. Swing component followsa
Model-view-Controllerarchitecture.
Swing provided a rich set of advanced controlslike
tree, Tabbedpane, slider,colorpicker, and table
controls.Swingbased GUI application look and feel can
be changed at run-time ,based on availablevalues.
JRE:-
The Java Runtime Environment(JRE)is a set of software
toolsfor development of java applications.Itcombines the
JAVA Virtual Machine(JVM),Platformcore classes and
supporting libraries. JRE is part of the JAVA Development
Kit (JDK),but can be downloadedseparately.
The Java Virtual Machine
At the heart of Java's network-orientationis the Java virtual
machine, which supports all three prongs of Java's
7
network-orientedarchitecture: platform independence,
security, and network-mobility.
A Java virtual machine's main job is to load class files and
execute the bytecodes they contain. As you can see in Figure
1-3, the Java virtual machine containsa class loader, which
loads class files from both the program and the Java API.
Only those class files from the Java API that are actually
needed by a running program are loaded into the virtual
machine. The bytecodes are executed in an execution
engine.
Goals in creationof Java
There were five primary goals in the creation of the Java
language
1. It should be "simple, object oriented".
2. It should be "robust and secure".
3. It should be "architecture neutral and portable".
4. It should execute with "high performance".
5. It should be "interpreted, threaded, and dynamic".
System Specifications:-
Software Specifications:-
* Operating System Windows10
*Coding language- JAVA
8
Hardware Specifications:-
*System:-Intel core i3
*RAM:4GB
FUNCTIONALITY
STARTING PAGE
In that page I will show how will start the game .Press the start
button then the game will begin.
9
SPEED DOWN
Before you started the game you will set the speed by speed down
button it will reduce the speed.
10
SPEED UP
If you want speed maximum then you will set before game start
with the help of speed up button.
11
PAUSE &LEFT TURN
Now ,the game begin in that blue square is a food which will eat by
Snake .snake will move left turn by left arrow key for eating that
food.
After I will show you how we pause in between the game .we pause
the game by pause button.
12
DOWN TURN
Now I will show snake turn down by down arrow key.
13
RIGHT TURN
Now ,here will show snake will turn right this is possible by right
arrow key.
14
UP TURN
Now , here will show snake turn up that will possible with up
arrow key.
15
SCORING&ENDING
Here the game will end and score is 8.It’s score will show on
top .The game will ending by snake touch with black border
surface.
16
FUTURE SCOPE OF THE PROJECT
Our project will be able to implement in future after making
some changes and modification as make our project at a
very low level . So the modification that can be done in our
project are:-
* add player profile
*add multiplayer option

Snake project report

  • 1.
    1 TABLE OF CONTENTS 1.Acknowledgement…………………………………………………………..3 2.Introduction…………………………………………………………………….4 3. Technologies…………………………………………………………………….5 4.Functionality…………………………………………………………………….8 5. Future scope of Project…………………………………………………….17
  • 2.
    2 ACKNOWLEDGEMENT I would liketo express my special thanks of gratitude to my teacher Mr.......... who gave me the golden opportunity to do this wonderful project of snake game .who gave me guidelines for this project .I am really thankful to them.
  • 3.
    3 INTRODUCTION The Project isa game written in java based on the game called ‘snake’ which has been around since the earliest days of home computing and has re-emerged in recent years on mobile phones. This Project aims to bring fun and simplicityof snake game .In that project it calculate score and time. Snake is the common name for a video game concept where the player maneuvers a line which grows in length, with the line itself being a primary obstacle. The concept originatedin the 1976 arcade game Blockade, and the ease of implementingSnake has led to hundreds of versions (some of which have the word snake or worm in the title) for many platforms. After a variant was preloaded on Nokia mobile phones in 1998, there was a resurgence of interest in the snake concept as it found a larger audience. It is not the world’sgreatest game, but it does give you an idea of what you can achieve with a relativelysimple java swing program,and perhaps the basis by which to extend
  • 4.
    4 the principles andcreate more interesting games of your own. The snake moves to the Right, timer is set to some amount of time, and if you manage to press Up or Down arrow and then very fast Left (when the timer hasn't gone off), the snake will move backwards and finally eat himself. Most of the games doesn't allow you to change from Right to Left (or Up to Down etc.) in one step, but this is allowed. I prevent players from doing that by implementing temporary direction, that reads the current direction at the begining of a time period (or refresh rate - it is the same here). This game has been built using Java which is platform independent and applet based hence lightweight. The snake game is simple game.In this game the snake is eating some foods and get its size larger in step by step and getting some score This is small game .In this if the player has to change the direction of the snake for getting food for snake.
  • 5.
    5 TECHNOLOGIES JAVA LANGUAGE:- Java isa popular general-purpose programming languageand computing platform. It is fast ,reliable&secure. Java is designed for the distributed environment of the internet. Java makes an effort to eliminateerror prone situationsby emphasizing mainly on compile time error checking and runtime checking. JAVA:- Java is a simple ,distributed object oriented programming languagewhich provides the security ,high performance,robustness. Java is a portable and Architectural neutral language which can be interpreted. Java is multithreadedand dynamic language.
  • 6.
    6 SWING:- Swing API isa set of extensibleGUI componentsto ease the developer’s Life to create JAVA based front end/GUI Applications. It is build on top of AWT API and acts as a replacement of AWT API, since it has almost every control corresponding to AWT controls. Swing component followsa Model-view-Controllerarchitecture. Swing provided a rich set of advanced controlslike tree, Tabbedpane, slider,colorpicker, and table controls.Swingbased GUI application look and feel can be changed at run-time ,based on availablevalues. JRE:- The Java Runtime Environment(JRE)is a set of software toolsfor development of java applications.Itcombines the JAVA Virtual Machine(JVM),Platformcore classes and supporting libraries. JRE is part of the JAVA Development Kit (JDK),but can be downloadedseparately. The Java Virtual Machine At the heart of Java's network-orientationis the Java virtual machine, which supports all three prongs of Java's
  • 7.
    7 network-orientedarchitecture: platform independence, security,and network-mobility. A Java virtual machine's main job is to load class files and execute the bytecodes they contain. As you can see in Figure 1-3, the Java virtual machine containsa class loader, which loads class files from both the program and the Java API. Only those class files from the Java API that are actually needed by a running program are loaded into the virtual machine. The bytecodes are executed in an execution engine. Goals in creationof Java There were five primary goals in the creation of the Java language 1. It should be "simple, object oriented". 2. It should be "robust and secure". 3. It should be "architecture neutral and portable". 4. It should execute with "high performance". 5. It should be "interpreted, threaded, and dynamic". System Specifications:- Software Specifications:- * Operating System Windows10 *Coding language- JAVA
  • 8.
    8 Hardware Specifications:- *System:-Intel corei3 *RAM:4GB FUNCTIONALITY STARTING PAGE In that page I will show how will start the game .Press the start button then the game will begin.
  • 9.
    9 SPEED DOWN Before youstarted the game you will set the speed by speed down button it will reduce the speed.
  • 10.
    10 SPEED UP If youwant speed maximum then you will set before game start with the help of speed up button.
  • 11.
    11 PAUSE &LEFT TURN Now,the game begin in that blue square is a food which will eat by Snake .snake will move left turn by left arrow key for eating that food. After I will show you how we pause in between the game .we pause the game by pause button.
  • 12.
    12 DOWN TURN Now Iwill show snake turn down by down arrow key.
  • 13.
    13 RIGHT TURN Now ,herewill show snake will turn right this is possible by right arrow key.
  • 14.
    14 UP TURN Now ,here will show snake turn up that will possible with up arrow key.
  • 15.
    15 SCORING&ENDING Here the gamewill end and score is 8.It’s score will show on top .The game will ending by snake touch with black border surface.
  • 16.
    16 FUTURE SCOPE OFTHE PROJECT Our project will be able to implement in future after making some changes and modification as make our project at a very low level . So the modification that can be done in our project are:- * add player profile *add multiplayer option