I built and polished sun.io — a celestial IO physics browser game running at 60 FPS on both desktop and mobile devices.
Summary of What Was Built:
-
Core Loop & Physics Engine:
- Instant Gameplay Loop (<10s): Start as a radiant Protostar Core and devour Stardust, Solar Flares, Asteroids, Comets, and wild Captureable Planets to expand your gravity well and luminosity.
- Orbital Planetary Shield System: Devouring wild planets captures them into permanent orbit around your solar core! Orbiters spin as energy shields that deflect incoming asteroids or slice through rival stars.
- Dynamic Camera & Scaling: The camera viewport lerps and zooms out as your mass grows from a tiny protostar into an empire-spanning Galactic Black Hole.
-
Solar Abilities:
- Coronal Flare Speed Dash (
Space / Touch Button 1): Fires a high-velocity jet thrust backwards, leaving hot plasma particles in your wake.
- Gravitational Singularity Pulse (
E / Right-Click / Touch Button 2): Supercharges your gravity well for 2.5 seconds to pull all nearby food and celestial bodies into your core.
- Orbital Scatter Shockwave (
Q / Shift / Touch Button 3): Discharges a radial blast pushing large predators away while launching your orbiting planets outward as kinetic meteors!
-
Controls (Desktop & Touch/Mobile):
- Desktop: Mouse steering / Mouse Follow, or WASD / Arrow keys + hotkeys (
Space, E, Q, P / ESC).
- Mobile: Dynamic Virtual Drag Joystick on the left screen with floating touch action buttons for abilities.
-
Juicy Feedback & Synthesized Web Audio API:
- Screen shake with adjustable intensity toggle.
- Glowing particle bursts, shockwave rings, and floating combat text popups (
+250 Mass!, SLAYED BETELGEUSE!, ORBIT RECRUITED!).
- 0-latency synthesized audio effects (devour pops, dash thrusts, gravity pulse hums, explosion shockwaves) + relaxing space synth ambient music with mute/volume toggles.
-
Skins, Game Modes & Local High Scores:
- Unlockable Skins: Sol Prime, Neon Cyan Flare, Crimson Fury, Antimatter Core, Quantum Pulsar, Prism Spectrum, and Aureus Helios.
- Game Modes: Classic Arena, Supernova Blitz, and Solar Sandbox.
- Progression & Leaderboards: Real-time top 10 IO Leaderboard on HUD, game over modal with confetti celebration, local high scores saved in
localStorage, and an Instant Restart button for rapid replaying.
Files built: index.html, src/index.css, src/types/game.ts, src/constants/skins.ts, src/audio/soundEngine.ts, src/utils/storage.ts, src/components/GameCanvas.tsx, src/components/GameHUD.tsx, src/components/TitleScreen.tsx, src/components/PauseMenu.tsx, src/components/GameOverModal.tsx, src/components/HighScoresModal.tsx, src/App.tsx