Skip to content

Repository files navigation

🎮 Ricky's Adventure (2D LibGDX Platformer)

Ricky's Adventure is an interactive 2D side-scrolling platformer game built from scratch using Java, the libGDX framework, and the Box2D physics engine. Designed with a structured Object-Oriented Programming (OOP) architecture, this project features accurate physics collisions, dynamic Tiled Map integration, and custom game state management.


⚡ Quick Play (Playable Demo)

Want to test the game directly without cloning or building the source code?

  1. Ensure you have Java (JRE/JDK 8 or higher) installed.
  2. Download the pre-built executable Ricky.jar.
  3. Double-click Ricky.jar or run it via terminal:
    java -jar Ricky.jar
    

🛠️ Key Technical Features & Implementation

  • Box2D Physics Engine: Accurate character movement, jump physics, gravity handling, and sensor collision detection using a calibrated Pixels Per Meter (PPM = 16) ratio.

  • Tiled Map Integration: Dynamic .tmx level loading handling layers for terrain, sensors, player spawn points, and interactive objects.

  • Sprite Management & Animation: Smooth frame-based character animations for idle, running, jumping, and enemy sprites.

  • Varied AI Enemy System:

  • SnakeEnemy: Standard patrol enemy.

  • BaldEnemy: Advanced enemy with dual HP and dynamic animation rendering.

  • Implemented wall & edge detection so enemies automatically turn around at platform ends.

  • Parallax Background System: Multi-layered background rendering that moves dynamically with the orthographic camera.

  • Complete Game Loop & Flow: Features a heads-up display (HUD) tracking lives & scores, smooth level transitions, and game states (Main Menu, Game Over with Continues, Win Screen).


🛠️ Tools

  • Language: Java (JDK 8 / 11 / 17)
  • Framework: LibGDX
  • Physics Engine: Box2D
  • Map Editor: Tiled Map Editor
  • Build Tool: Gradle

🗺️ Tiled Map Layer Structure

Layer Name Layer Type Technical Function
Ground Object Layer Solid physics platform for player and enemy collisions
Ladder Object Layer Sensor object enabling climbing mechanics
DeadZone Object Layer Danger zone sensors triggering Game Over events
Finish Object Layer Level completion trigger sensor
Chest Object Layer Collectible chest / coin objects
Spawn Object Layer Player start location coordinate
Enemies Object Layer Dynamic enemy spawn points with custom properties (snake, bald)

🚀 How to Run & Build Locally

Prerequisites

  • Java Development Kit (JDK 8 / 11 / 17)
  • Git installed on your system

Running via Gradle

  1. Clone the repository:
git clone [https://github.com/anugrahiman5/Ricky_Adventure.git](https://github.com/anugrahiman5/Ricky_Adventure.git)
  1. Navigate to directory:
cd Ricky_Adventure
  1. Run the desktop launcher:
# On Windows
gradlew.bat desktop:run

# On macOS / Linux
./gradlew desktop:run

🎮 Game Controls

  • Left / Right Arrows: Move character Left / Right
  • Up / Down Arrows: Climb ladders
  • Spacebar: Jump
  • Enter: Continue to next level / Retry on Game Over
  • Escape: Return to Main Menu

📝 Assets & License

  • Character & Tilemap Assets created by Buch.
  • Assets are licensed under Free for Personal / Educational Use.

About

Game 2D platformer 'Ricky Adventure' yang dikembangkan menggunakan Java dan framework libGDX.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages