(More to come(still in development for more features))-v2 Coming soon.
An immersive browser-based endless flying shooter built with LittleJS, featuring third-person 2.5D perspective, pseudo-3D projection, and intense space combat action!
๐ฎ Born from experimentation! This game was created while exploring the LittleJS engine for the first time โ a journey from curiosity to a fully-playable space shooter with nitro boosts, pseudo-3D combat, and retro-futuristic vibes!
- Game Features
- Controls
- Scoring System
- Health System
- Visual Style
- Installation & Running
- Project Structure
- Technical Details
- Gameplay Tips
- Advanced Features
- Troubleshooting
- Credits
- Future Enhancements
- License
- Third-Person Perspective: Pilot a futuristic spaceship from behind, just like Star Fox or After Burner
- Endless Scrolling: Continuously fly through space with increasing difficulty
- Pseudo-3D Projection: Full depth simulation with objects scaling based on distance
- Real-Time 3D Collision Detection: Distance-based collision system using x, y, z coordinates
- Sleek Design: Metallic blue triangular hull with glowing cyan wing tips
- Triple Engine Exhausts: Bright blue thrusters with dynamic particle trails
- Smooth Banking: Ship tilts naturally when moving left and right
- Cockpit Highlight: Glowing center cockpit for futuristic feel
- Dual Missile Launchers: Fire two missiles simultaneously from both wings
- Detailed Missiles: Red warhead, metallic body, fins, and glowing blue exhaust
- Smoke Trails: Dynamic smoke effects behind each missile
- Rapid Fire: Hold spacebar for continuous missile barrage
- Homing Missiles: Missiles travel straight with smooth acceleration
- 150+ Star Field: Hyperspace tunnel effect with stars rushing toward camera
- Ground Grid: Cyan grid lines scrolling beneath for depth perception
- Dynamic Camera: Smooth camera following ship movement
- Explosion Particles: 3D particle debris with yellow-orange bursts
- Depth-Based Scaling: All objects scale realistically with distance
- Enemy Ships: Red menacing spacecraft that attack from a distance
- Asteroids: Irregular rocky obstacles with rotation
- 3D Spawning: Enemies approach from maximum depth
- Smart Collision: Distance-based 3D collision detection
- Pseudo-3D Projection System:
function project3D(x, y, z) { const scale = CAMERA_FOV / (CAMERA_FOV + z); return { x: x * scale, y: y * scale, scale }; }
- Depth Sorting: Objects rendered in correct depth order
- Particle Systems: Engine trails, smoke, and explosions
- Camera FOV: 500 units for realistic perspective
| Control | Action |
|---|---|
| Arrow Keys or A/D | Move left and right |
| W/S | Move up and down slightly |
| Spacebar | Fire dual missiles |
| Hold Spacebar | Rapid-fire mode |
| R (when game over) | Restart game |
- Destroy Enemy Ship: +100 points
- Destroy Asteroid: +50 points
- Distance Traveled: Tracked in meters
- Difficulty: Increases every 500 meters
- Starting Health: 100 HP
- Enemy Collision: -20 HP
- Asteroid Collision: -15 HP
- Visual Health Bar: Color-coded (green โ yellow โ red)
- Game Over: Health reaches 0
-
Color Scheme:
- Player Ship: Metallic blue (#4488ff) with cyan highlights (#00ffff)
- Missiles: Red warhead (#ff3333) with blue exhaust (#00bbff)
- Enemies: Menacing red (#ff4444)
- Asteroids: Gray-purple (#8888aa)
- Space: Deep black-blue (#000011)
- Grid Lines: Cyan with transparency (#00ffff)
-
Effects:
- Glow effects on engines and weapons
- Particle trails with fade-out
- Smooth easing animations
- Shadow and blur for depth
- Open folder in VS Code
- Install Live Server extension (if not already installed)
- Right-click
index.htmland select "Open with Live Server" - Game opens in browser automatically
# Navigate to game folder
cd "c:\Users\pandr\OneDrive\Desktop\BrowerBasedGamesLITTLEJAM"
# Python 3
python -m http.server 8000
# Python 2
python -m SimpleHTTPServer 8000Then open: http://localhost:8000
Simply double-click index.html to open in your default browser.
BrowerBasedGamesLITTLEJAM/
โโโ index.html # Main HTML file with UI and canvas
โโโ game.js # Complete game logic and rendering
โโโ README.md # This file
- LittleJS Engine: v1.10.5 (loaded from CDN)
- No additional dependencies required
-
Pseudo-3D System
- Camera FOV: 500 units
- Depth range: -100 to 2000 units
- Ship position: z = -200 (fixed)
- Objects scale based on distance from camera
-
Object Classes
Spaceship: Player-controlled ship with health and movementMissile: Dual-fire projectiles with smoke trailsEnemy: AI-controlled hostile shipsAsteroid: Rotating obstaclesStar: Background starfield particlesGroundLine: Grid system for depth perception
-
Game Loop
- Update: 60 FPS game logic
- Render: Depth-sorted drawing
- Input: Real-time keyboard handling
-
Collision Detection
- 3D distance calculation:
โ(dxยฒ + dyยฒ + dzยฒ) - Radius-based collision spheres
- Separate checks for missiles, enemies, and player
- 3D distance calculation:
-
Particle Systems
- Engine trails: Blue glowing particles
- Missile smoke: Gray fading particles
- Explosions: Yellow-orange debris scatter
- Stay Mobile: Keep moving to avoid obstacles
- Aim Ahead: Missiles need time to reach distant targets
- Prioritize Enemies: They're worth more points and more dangerous
- Watch Your Health: Collisions add up quickly
- Use Rapid Fire: Hold spacebar for continuous attack
- Mind the Edges: Don't fly off-screen
- Distance Matters: Difficulty increases over time
- Speed increases every 500 meters
- More frequent spawns at higher levels
- Both enemies and obstacles become faster
- Smooth camera interpolation
- Ship banking animation
- Glowing effects on all energy elements
- Layered particle systems
- Depth fog effect
- Efficient object pooling
- Culling of off-screen objects
- Optimized particle systems
- 60 FPS target on modern browsers
Game doesn't load?
- Check browser console for errors (F12)
- Ensure internet connection (LittleJS loads from CDN)
- Try a different browser (Chrome, Firefox, Edge recommended)
Slow performance?
- Close other browser tabs
- Update graphics drivers
- Try reducing browser zoom level
Controls not working?
- Click on the game canvas to focus
- Check if keys are working in other applications
- Try refreshing the page
- Engine: LittleJS by Frank Force
- Game Design & Code: Custom implementation
- Graphics: Pure canvas rendering
- Sound: (Optional - can be added)
Potential additions:
- Power-up pickups (shields, rapid fire, speed boost)
- Background music and sound effects
- Multiple enemy types with different behaviors
- Boss battles at distance milestones
- Leaderboard system
- Weapon upgrades
- Parallax background layers
- More particle effects
Free to use, modify, and distribute. Have fun! ๐ฎ
Enjoy your flight through space, Commander! ๐โจ
Made with โค๏ธ by Blazehue