← Back

Obliterate EarthAI · Claude 3.5

Game information

Destroy a rotating planet with missiles, nukes, and asteroids that carve out chunks and shift its center of mass in real-time!

TypePhysics Destruction Sim
ResolutionResponsive
OrientationPortrait
PlatformsPC Web / H5 Mobile
StoragelocalStorage
Authorlsk
Date2026-07-07

AI generation prompt

Copy this prompt to study or reproduce the game.

Core Game Loop and Mechanics

Obliterate Earth is a physics-based destruction game where players systematically destroy a rotating planet by launching weapons from orbit. The core gameplay loop consists of:

  1. Weapon Selection: Player chooses between three weapon types (Missile, Nuke, Asteroid)
  2. Weapon Launch: Player taps/clicks anywhere on screen to spawn the selected weapon at a fixed orbital distance
  3. Weapon Flight: Weapon locks onto Earth's current center of mass and travels toward it
  4. Impact & Destruction: Weapon explodes on contact, carving out a circular chunk of the planet
  5. Mass Recalculation: Planet's center of mass instantly recalculates, shifting its rotation pivot
  6. Victory: When planet mass drops below 1%, trigger epic destruction sequence

What makes it compelling:

  • Satisfying visual feedback with each impact (explosions, particles, screen shake)
  • Strategic weapon choice based on desired destruction pattern
  • Dynamic physics where the planet's behavior changes as you destroy it
  • Clear progression indicator (mass percentage) driving toward victory
  • Immediate, visceral destruction with no waiting or resource management

Starting Scope

First Implementation (Minimal Viable Product):

  • Single rotating Earth in center of screen
  • Three weapon types with distinct properties (size, speed, explosion radius)
  • Weapon selection UI at bottom of screen
  • Click/tap to spawn weapons at orbital distance
  • Collision detection and circular explosion masking
  • Real-time center of mass recalculation
  • Mass percentage display
  • Basic particle effects on impact
  • Screen shake on explosions
  • Victory condition at <1% mass remaining
  • Victory screen with restart button

Future Enhancements (Post-Launch):

  • Multiple planets/celestial bodies with different properties
  • Weapon upgrades or modifications
  • Combo system for rapid successive hits
  • Score tracking and leaderboards
  • Sound effects and background music
  • More elaborate particle systems
  • Weapon trails and visual effects
  • Different planet textures/themes
  • Challenge modes (time limits, weapon limits)

Game Perspective

Fixed-screen perspective with a centered, rotating planet. The camera is stationary, viewing the planet from a 2D orthogonal angle. All action takes place on a single screen with no scrolling. The planet rotates in place while weapons approach from the edges.

Game World and Level Design

Single Level Design:

The game takes place in deep space with a starfield background. At the center of the screen sits Earth - a circular planet with recognizable continents and oceans rendered procedurally.

Planet Specifications:

  • Initial size: 200px diameter circle
  • Starting appearance: Blue oceans with green/brown landmasses
  • Rotation speed: 0.01 radians per frame (slow, visible rotation)
  • Position: Screen center initially, shifts as mass changes

Orbital Zone:

  • Weapons spawn at 300px radius from current screen center
  • Spawn position determined by click/tap location angle
  • Creates a clear "orbital bombardment" feel

Space Environment:

  • Dark background (#0a0a15 or similar)
  • Subtle animated starfield for depth
  • No obstacles or other celestial bodies in first version

Technical Implementation:

  • Hidden canvas (400x400px) stores unrotated planet pixel data
  • Visible canvas renders rotated planet with proper center-of-mass offset
  • All collision detection happens in local space on hidden canvas
  • Explosions use destination-out blending to carve transparent holes

Edit Mode Design

Editable Properties:

  1. Weapon Properties (per weapon type):

    • Explosion radius (10-100px range)
    • Movement speed (1-10 pixels per frame)
    • Visual size multiplier (0.5-2.0x)
    • Particle count on impact (10-50 particles)
    • Screen shake intensity (0-20 pixels)
  2. Planet Properties:

    • Initial size (100-300px diameter)
    • Rotation speed (0.001-0.05 radians per frame)
    • Starting color scheme (ocean color, land color)
    • Victory threshold (0.5%-5% mass remaining)
  3. Gameplay Properties:

    • Weapon spawn distance (200-500px from center)
    • Particle lifetime (0.5-3 seconds)
    • Screen shake duration (100-500ms)
  4. Visual Properties:

    • Background color
    • Star density (0-200 stars)
    • UI color scheme

Constraints:

  • Explosion radius must be at least 5px (prevent invisible impacts)
  • Planet size must be at least 50px (ensure playability)
  • Rotation speed capped to prevent disorienting motion
  • Victory threshold minimum 0.1% (ensure game can be won)
  • Weapon speed minimum 0.5 (ensure weapons reach planet)

Edit Mode Interface: Simple property panel that appears when toggling edit mode, with sliders and color pickers for each editable value. Changes apply immediately to demonstrate effect.

Control Design

Mobile (Touch) Controls:

  • Weapon Selection: Tap one of three weapon buttons in bottom UI panel
  • Weapon Launch: Tap anywhere on screen (outside UI area) to spawn selected weapon at that angle from planet center
  • Restart: Tap restart button on victory screen

Desktop (Mouse/Keyboard) Controls:

  • Weapon Selection: Click one of three weapon buttons in bottom UI panel, OR press keys 1, 2, 3 to select Missile, Nuke, Asteroid respectively
  • Weapon Launch: Click anywhere on screen (outside UI area) to spawn selected weapon
  • Restart: Click restart button on victory screen, OR press R key

Control Implementation Details:

  • Track mouse/touch position to determine spawn angle
  • Calculate spawn position: angle = atan2(mouseY - centerY, mouseX - centerX), then spawnX = centerX + cos(angle) * spawnRadius
  • Prevent weapon spawning when clicking UI elements
  • Visual feedback: highlight selected weapon button
  • No complex input schemes needed - simple point-and-click/tap interface
  • Clear input state on window blur to prevent stuck states

Art Style and Visual Theme

Overall Style: Dark sci-fi arcade aesthetic with a retro-modern fusion. Clean geometric shapes with glowing accents and particle effects. Emphasis on satisfying destruction visuals.

Color Palette:

  • Space Background: Deep navy/black (#0a0a15, #050510)
  • Stars: White with subtle twinkle (#ffffff, 50-80% opacity)
  • Earth Ocean: Rich blue (#2b5f9e, #1a4d7a)
  • Earth Land: Green/brown continents (#3a7d44, #8b6f47)
  • UI Elements: Cyan/electric blue accents (#00d9ff, #0099cc)
  • Explosions: Orange-yellow-white gradient (#ff6600 → #ffcc00 → #ffffff)
  • Particles: Bright orange/yellow with glow (#ff8800, #ffdd00)

Asset Approach:

  • Planet: Procedurally generated on hidden canvas (code-rendered continents using Perlin-like noise or random blob shapes)
  • Weapons: Simple geometric shapes rendered with code (circles/ovals with gradient fills)
  • UI: CSS-styled buttons and text with sci-fi font
  • Particles: Code-rendered circles with radial gradients
  • Explosions: Code-rendered expanding circles with alpha fade
  • Background: Code-rendered starfield with random positioned dots

Visual Consistency:

  • All elements use smooth gradients and glowing effects
  • Consistent line weights for UI elements (2-3px)
  • Unified color temperature (cool blues for UI, warm oranges for destruction)
  • Minimalist geometric approach throughout

Technical Rendering:

  • Use Canvas API for all game rendering
  • CSS for UI overlay styling
  • Radial gradients for glows and depth
  • Alpha blending for particle effects
  • Screen shake via canvas transform

No generated assets needed - entire game can be rendered with Canvas API and CSS, keeping file size minimal and ensuring instant loading.