Creating a Game of Feeding the Snake using JAVA GUI, Swing
- The Player controls a dot, square or object on a bordered plane.
- As it moves forward it leaves a trial behind resembling a moving snake.
- The player loses when the snake runs into the screen border, other obstacle or itself.
- Object Oriented Programming in Java
- Making an amazing application using core java libraries
- Core java AWT and Swing tutorial
- Building such an interesting game of your own from Scratch
- Classes and Objects in Java with example
- Create a new java project in the IDE
- Adding images to the project
- Started creating frame
- Place the images inside the frame
- Place the image one behind the other
- Locating the apple
- Adding action listeners
- Implementation of Keyboard events
- Handling collision to snake with apple
- handle the collision of the snake with walls or with itself
- Moving the snake inside the frame
- repaint the frame
- handle the game over functionality
- Running the snake game
- JDK
- IDE - (vscode)
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
The workspace contains two folders by default, where:
src
: the folder to maintain sourceslib
: the folder to maintain dependencies
Meanwhile, the compiled output files will be generated in the bin
folder by default.
If you want to customize the folder structure, open
.vscode/settings.json
and update the related settings there.
The JAVA PROJECTS
view allows you to manage your dependencies. More details can be found here.