About the Game
Asteroids 3D is a demo game that showcases the capabilities of the MX2 3D engine. It is a fully 3D Arcade Space Shooter where players can explore the vastness of space and destroy Asteroids!
Source Code Summary
This codebase implements a 3D space shooter game using OpenGL with support for both desktop environments and web browsers (via WebGL through Emscripten). The game features a first-person space flight simulation where players control a spaceship, navigate through space, and destroy Asteroids.
Windows X64 download, simply download, extract, open directory and double click on gl_asteroids.exe to play.
Key Components:
Rendering System
Uses OpenGL/WebGL for 3D rendering with custom shader programs for different visual effects like particle systems, lighting, and texture distortion.
Game Objects
- StarFighter: The player-controlled ship with pitch, yaw, and roll controls
- Asteroids: Destructible space objects with different models (Asteroids)
- Projectiles: Torpedoes fired from the ship that can destroy Asteroids
- StarField: Dynamic background star system creating parallax effects
- Particle Systems: Visual effects for explosions and engine exhaust
Input Handling
- Keyboard controls (arrow keys for movement, W/S for pitch, SPACE to fire)
- Game controller support
Game Logic
- Ship movement with physics-based velocity and inertia
- Collision detection between projectiles and Asteroids
- Speed control with acceleration/deceleration mechanics
- Camera system that follows behind the ship with lag
- Cooldown system for weapon firing (200ms between shots)
Visual Effects
- Particle-based explosions when Asteroids are destroyed
- Engine exhaust particles that vary with ship speed
- Glowing projectiles with size and intensity animation
- Asteroid rotation with shader-based visual effects
- Dynamic lighting system with ambient, diffuse and specular components
UI Features
- Debug overlay showing ship position, velocity, and game stats
- FPS counter and controller connection status
- Intro screen with fade-out animation
How to Play
Command Your Ship. Defy the Void.
Fly around in a 3D world shooting asteroids.
Controls (Also supports Gamepad)
- Move Left: Arrow Left or Left Analog Stick
- Move Right: Arrow Right or Left Analog Stick
- Move Up: W Key or Right Analog Stick
- Move Down: S Key or Right Analog Stick
- Shoot: Space or X Button
- Accelerate: Up Arrow or Left Shoulder Button
- Decelerate: Down Arrow or Right Shoulder Button
Objectives
In this early demo the objective is to blow up all the objects.
System Requirements (Recommended)
- Operating System: Windows 10/11, macOS 12+, Linux
- Processor: Intel Core i5 or equivalent
- Memory: 4 GB RAM
- Graphics: OpenGL ES 3.0/WebGL 2 compatible
- Internet: Broadband connection
Game Screenshot

Play Asteroids3D
Download X64