A modern, physics-based recreation of the classic arcade hit "Asteroids," built using the Processing (Java) environment. This project features authentic arcade mechanics, advanced collision physics, and challenging UFO enemies.
- Realistic Physics: Implements conservation of momentum for asteroid-to-asteroid elastic collisions, friction mechanics, and Arcade-style screen wrapping.
- Game Modes: Three distinct ways to play:
- Classic: Start with 5 lives and progress through increasingly difficult waves.
- Endless: Ultra-hardcore mode with only 1 life. Surviving is the only goal.
- Time Bound: A 5-minute challenge with infinite lives. Score as high as possible before the clock runs out (Starts at Level 5).
- Challenging UFOs: Two types of UFOs that track the player and fire lasers:
- Big UFO: Slower, easier to hit, spawns at Level 5.
- Small UFO: Fast, agile, hard to hit, deadlier aim, spawns at Level 10.
- Dynamic Leveling System: Infinite gameplay where asteroid counts increase as you clear waves.
- Scoring & Penalties:
- Earn points for destroying Asteroids (Small > Medium > Big).
- High-value rewards for destroying UFOs.
- Score Penalties for taking damage from collisions or enemy fire.
- Visual Effects: Custom particle-based explosion system for asteroids, ships, and UFOs.
- Logging System: Built-in logging for debugging and performance monitoring in
./Logs. - Invincibility Frames: Temporary protection after respawning to ensure fair gameplay.
Take command of your spacecraft with these simple keyboard controls:
| Key | Action |
|---|---|
| Up Arrow | Thrust Forward |
| Left Arrow | Rotate Counter-Clockwise |
| Right Arrow | Rotate Clockwise |
| Spacebar | Fire Lasers |
IMPORTANT: This is an open-source project, but it requires specific licensed assets that are not included in this repository due to licensing restrictions. You must set them up manually before running the game.
Ensure your project directories are set up as follows:
Asteroids/
│ └── assets/
│ ├── fonts/
│ │ └── Orbitron.ttf <-- Required Font
│ └── data/
│ └── credits/
│ └── credits.txt <-- Required Credits File
- Source: Google Fonts - Orbitron
- Instructions:
- Download the font family.
- Extract the
.ttffile. - Rename it to
Orbitron.ttf. - Place it in
data/assets/fonts/.
- Source: Custom file.
- Instructions:
- Create a text file named
credits.txt. - Add credits content (one entry per line).
- Place it in
data/assets/data/credits/.
- Create a text file named
- "Font not found": Check that the file is named exactly
Orbitron.ttfand is indata/assets/fonts/. - "Credits File Missing": Ensure
credits.txtexists indata/assets/data/credits/. - Game Crashes on Start: Verify both files are present and readable.
- Clone the repository
- Create directory
data/assets/fonts/ - Download and place
Orbitron.ttf - Create directory
data/assets/data/credits/ - Create and place
credits.txt - Open
Asteroids.pdein Processing - Run the game
To run this game, you need the Processing Environment.
- Clone or Download this repository.
git clone git@github.com:Debagnik/Arcade-Asteroid-Game.git ./Asteroids- Open Processing.
- Open the Asteroids.pde file from the project directory.
- Click the Run button (Play icon) in the Processing IDE.
Asteroids.pde: Main entry point, setup, and game loop orchestration.Asteroids_Constants.pde: Global game settings, balancing constants, and enums.Title_Screen.pde: Manages the main menu, game mode selection, and credits.Player_SpaceCraft.pde: Player ship entity and physics.Player_Controller.pde: Handles player input, ship movement logic, and respawn mechanics.Asteroid_Object.pde: Asteroid entity behavior.Collision_Mechanics.pde: Centralized collision detection logic (Player, Asteroids, Lasers, UFOs).Asteroids_PhysicsHelper.pde: Core physics math (wrapping, distance checks).UFO_Controller.pde/UFO_Object.pde: Enemy AI logic and spawning.Explosion_Controller.pde/DebrisAnimation.pde: Visual effects, particles, and explosion animations.Lasers.pde/Weapons_Controller.pde: Weapon systems and projectile management.Loggers.pde: Debugging and game state logging utilities.Game_Manager.pde: Central Game State manager (Levels, Scoring, Lives, Game Over Logic).
This project is licensed under the WTFPL (Do What The Fuck You Want To Public License). See the LICENSE.md file for more details.
Author: Rak Kingabed debagnik@debagnik.in Copyright (c) 2026