Hajee Mohammad Danesh Science & Technology University, Dinajpur
On
Snake Game Using JAVA
Course Code : CSE 262
Course Title : Object Oriented Programming Sessional
 Submitted By
 Name : Kamrul Islam
 Student ID : 1702146
 Session : 2017
 Level : 2 Semester : II

Department of Electronics & Communication Engineering ,HSTU


Objective of The Project :
 To make game using java code.
 General Objective :
 i) To know the use of JFrame,Random numbers
,Timer in JAVA.
 Specific Objective:
 i) To execute and play snake game using JAVA code.
Inspiration of the Project:
In my childhood I used to play snakegame using featured phone . At that
time I was curious about how the game can make using JAVA programming
language . It inspire me to do the project.
Description of the Project :
After running the code of the project there will come a windows and
there will be snake and a cherry fruit . The snake can be controlled
using up , down , right ,left button . If the snake can be able to eat the
cherry fruit the score will be increase by 10 each time as will as the
length of the snake . The game will be over if the snake touch the
boundary and bite its own body .
Advantages :
i) The game will make one’s leisure time
enjoyable .
ii) The game will help to take decision .
iii) It will increase one’s attention to any task.
Functionalities :
i) Score Showing
ii) Playing time in the game
iii) Length of the snake
Technical Functions :
 i) Addition of score .

 ii) Increment of time .
 iii) Random number .

 iii)Graphical tool and Frame.
Technical Tools Used :
 i) Netbeans IDE.

 ii) Microsoft Office & PowerPoint
Project Internal Structure :
Algorithm of the Project :
i) Open Netbeans IDE
ii) Make two class one is main and other is
render class
iii) Do code and use necessary tools accordingly what you need .
iv) Check the code properly.
v) Run the project .
vii) Control the snake using button.
viii) If the game is over use white space bar to play again
Output of The Project :
Here comes the output display
frame of the project . Here
in the picture we can see the yellow
color snake and the red color cherry .
In the Jframe there is a title Snake
and in the panel of the black
Background there can be seen score,
time , length of the snake .
Limitation of the Project :
 i) The game is in just 2D.
ii) There no level of game upgrade case in this game .
iii) Using png file of snake and cherry will make the game more attractive.
Summary of The Project :
 The project has been made using JFrame , Timer , JPanel,
Dimension , graphics, random tool . The Project is made
for the mind refreshment and make one’s feel enjoy in the
loneliness leisure time .
484478584-Presentation-on-Snake-game-pptx.pptx

484478584-Presentation-on-Snake-game-pptx.pptx

  • 1.
    Hajee Mohammad DaneshScience & Technology University, Dinajpur On Snake Game Using JAVA
  • 2.
    Course Code :CSE 262 Course Title : Object Oriented Programming Sessional  Submitted By  Name : Kamrul Islam  Student ID : 1702146  Session : 2017  Level : 2 Semester : II  Department of Electronics & Communication Engineering ,HSTU  
  • 3.
    Objective of TheProject :  To make game using java code.  General Objective :  i) To know the use of JFrame,Random numbers ,Timer in JAVA.  Specific Objective:  i) To execute and play snake game using JAVA code.
  • 4.
    Inspiration of theProject: In my childhood I used to play snakegame using featured phone . At that time I was curious about how the game can make using JAVA programming language . It inspire me to do the project. Description of the Project : After running the code of the project there will come a windows and there will be snake and a cherry fruit . The snake can be controlled using up , down , right ,left button . If the snake can be able to eat the cherry fruit the score will be increase by 10 each time as will as the length of the snake . The game will be over if the snake touch the boundary and bite its own body .
  • 5.
    Advantages : i) Thegame will make one’s leisure time enjoyable . ii) The game will help to take decision . iii) It will increase one’s attention to any task. Functionalities : i) Score Showing ii) Playing time in the game iii) Length of the snake
  • 6.
    Technical Functions : i) Addition of score .   ii) Increment of time .  iii) Random number .   iii)Graphical tool and Frame.
  • 7.
    Technical Tools Used:  i) Netbeans IDE.   ii) Microsoft Office & PowerPoint Project Internal Structure : Algorithm of the Project : i) Open Netbeans IDE ii) Make two class one is main and other is render class
  • 8.
    iii) Do codeand use necessary tools accordingly what you need . iv) Check the code properly. v) Run the project . vii) Control the snake using button. viii) If the game is over use white space bar to play again
  • 9.
    Output of TheProject : Here comes the output display frame of the project . Here in the picture we can see the yellow color snake and the red color cherry . In the Jframe there is a title Snake and in the panel of the black Background there can be seen score, time , length of the snake .
  • 10.
    Limitation of theProject :  i) The game is in just 2D. ii) There no level of game upgrade case in this game . iii) Using png file of snake and cherry will make the game more attractive.
  • 11.
    Summary of TheProject :  The project has been made using JFrame , Timer , JPanel, Dimension , graphics, random tool . The Project is made for the mind refreshment and make one’s feel enjoy in the loneliness leisure time .