Skip to content

The Java-SnakeGame is a Graphical Snake Game, developed for Java-Swing learners.

License

Notifications You must be signed in to change notification settings

mohitsainiknl/Java-SnakeGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java-SnakeGame

Give a ⭐ if you like it!

Screenshot of Java-SnakeGame

Overview :

Java-SnakeGame is a project of an interesting snake game, which is developed in JavaSE with Swing framework. Genrally, this snake is made up with the help of drawArc method and setStroke method to set the Stroke interface, as shown below:

Stroke stroke = new BasicStroke(float width);
g2d.setStroke(stroke);
g2d.drawArc(int x, int y, int width, int height, int startAngle, int arcAngle);

And, this snake seem to move in wave motion with the help of changing the startAngle parameter of drawArc method, and then, repainting the JPanel of the ground.

ShowControls Option :

Screenshot of ShowContols Option

If you want to know, "How's the snake moving in the JPanel?", may this Show Controls option will help you. Snake can move in both light and dark colored lines, as shown in image above. Moreover, you can also change the speed of the snake, here.



Controls

There are Three ways to control the snake in game:

  • GUI Arrow Buttons
  • Keyboard Arrow Buttons
  • Mouse Click



Technical Details :

  • Full Setup Size : 2.19 MB
  • Programming Language : Java (JavaSE)
  • Framework Used : AWT and Swing



System Requirements :

  • Operating System : Any (Platform Independent)
  • JRE version : 8.0 or higher
  • Development Environment : VS Code, Eclipse, IntelliJ IDEA (recommended)

Note :- Image in application works properly in IntelliJ IDEA.




Downloads :

1. Entire Repository

https://github.com/mohitsainiknl/Java-SnakeGame/archive/refs/heads/master.zip

2. JAR File (Executable)

https://github.com/mohitsainiknl/Java-SnakeGame/blob/master/publish/Java-SnakeGame.jar

3. .exe File for Windows (not independent, require JRE to run)

https://github.com/mohitsainiknl/Java-SnakeGame/blob/master/publish/Java-SnakeGame.exe



"Suggestions and project Improvements are Invited!"
Thanks a lot
Mohit Saini

About

The Java-SnakeGame is a Graphical Snake Game, developed for Java-Swing learners.

Topics

Resources

License

Stars

Watchers

Forks

Languages