2D platformer demo game written from scratch in Java.
This is a very small demo/prototype game that simply consists of a parallax background, environment tiles and a single character that can run, jump and collide with the environment. There are no enemies and no UI.
Main features of the code:
- Software rendering
- Sprite sheet animation
- Collision detection
- State machine
- Clone the repository:
git clone https://github.com/taardal/pixelcave
Script
- Make run-script executable:
chmod +x run.sh
- Run the script:
sh run.sh
Manual
- Build the app:
mvn clean package
- Run the app:
java -jar target/pixelcave-jar-with-dependencies.jar
- TheCherno: Game Programming (YouTube)
- Game Programming Patterns: Game Loop (Book)
- Build a 2D platformer - JAVA (Book)
- The Guide to Implementing 2D platformers (Blog)