This is the one-shot prompt that was given to the AI agents to build the planet simulators. Two independent builds from the same prompt: Claude Fable 5.1 and GPT-6 Astra.

One-Shot Prompt — Procedural Planet & Continent Simulator

Build a complete web application for procedurally simulating the geological evolution of an Earth-like planet, emphasizing believable continents, landmasses, islands, mountains, coastlines, oceans, and tectonic history.

Product Goal

Create a browser-based geological simulator where a user can generate a deterministic seeded planet, watch tectonic plates and continents evolve over hundreds of millions of years, pause, change playback speed, move forward/backward, scrub to arbitrary geological times, inspect geology, switch between globe and flat-map views, and export a high-resolution Mercator map at any point.

The objective is geological plausibility rather than research-grade physical accuracy. Continents and features should emerge from geological rules rather than independently generated random shapes.

Technology

Use TypeScript, React, Vite, WebGL/Three.js, Canvas/WebGL for maps, and Web Workers where useful. Avoid requiring a backend. Keep simulation logic independent of React and rendering.

The app must run with:

npm install
npm run dev

Core Simulation

Model:

Planet
→ tectonic plates
→ continental/oceanic crust
→ plate movement
→ boundary interactions
→ uplift/subduction/rifting/volcanism
→ elevation
→ sea level
→ continents/islands
→ erosion
→ hydrology
→ visible geography

Noise may add fine terrain detail but must not define the primary continental structure.

Spherical World

Run the underlying simulation on a sphere using normalized 3D vectors, spherical coordinates, an icosphere, cube-sphere, or another suitable spherical mesh. Do not simulate geology in Mercator coordinates.

Support rendering the same state as:

Architect projections so others can be added later.

Geological Time

Default timeline:

Start: -500 Ma
Present: 0 Ma

Use deterministic discrete simulation steps, such as 0.5–1 Ma.

Support play, pause, forward/backward stepping, jumping, timeline dragging, direct seeking, and exact-time entry.

Playback speeds:

0.25×  0.5×  1×  2×  5×  10×  25×  Maximum

Playback speed changes display progression, not physical tectonic rates.

Determinism and Backward Time

Given seed + configuration + time, the world must always be identical. Never use Math.random() directly for simulation state.

Backward movement does not need physically reversible geology. Implement deterministic history with fixed simulation steps and periodic checkpoints, e.g. every 10 Ma.

To seek backward:

  1. Restore the nearest suitable checkpoint.
  2. Replay deterministic simulation steps to the requested time.
  3. Cache useful recent states.

Repeatedly seeking to the same geological time must reproduce the same state.

Configuration

Create a PlanetConfig including:

interface PlanetConfig {
  seed: number | string;
  planetRadiusKm: number;
  oceanCoverageTarget: number;
  plateCount: number;
  continentalCrustFraction: number;
  tectonicActivity: number;
  plateSpeedScale: number;
  hotspotFrequency: number;
  volcanicActivity: number;
  continentalFragmentation: number;
  upliftStrength: number;
  erosionStrength: number;
  coastlineComplexity: number;
  seaLevel: number;
  geologicalAgeMa: number;
}

Use normalized 0–1 controls where appropriate.

Tectonic Plates

Generate roughly 6–20 plates by default. Plates should have identity, spherical region, crust composition, movement/rotation, thickness/density, and age.

Use spherical Voronoi or an equivalent method.

Continental crust must be separate from plate identity: one plate may carry continental and oceanic crust. Model cratons/continental nuclei so continents can fragment, collide, accrete, rift, and form microcontinents.

At plate boundaries calculate relative velocity, boundary tangent/normal, compression, extension, and shear.

Classify boundaries dynamically as:

Convergence should produce appropriate uplift, mountain belts, trenches, subduction, crustal thickening, and volcanic arcs. Continental/continental and oceanic/continental collisions should behave differently.

Divergence should produce rifts, mid-ocean ridges, crust thinning, new oceanic crust, and eventual continental separation.

Transform boundaries should produce faults, linear valleys, displacement, and moderate deformation.

Elevation and Mountains

Maintain a global elevation field conceptually based on:

base crust buoyancy
+ tectonic uplift
+ volcanic uplift
+ ridge uplift
- trench/subduction depth
- subsidence
- erosion
+ small-scale terrain detail

Mountains should primarily emerge from tectonic compression or volcanism.

Young ranges: narrow, high, rugged. Old ranges: lower, broader, smoother.

Track enough geological age/history for erosion to modify terrain.

Islands

Support geological origins:

Hotspots should remain approximately mantle-fixed while plates move overhead, producing age-progressive island chains.

Subduction zones should produce volcanic arcs where appropriate.

Design for later coral/atoll support.

Coastlines, Erosion, Hydrology

Coastlines must result from:

elevation > sea level

Do not generate them independently.

Active continental margins should tend toward narrow shelves, nearby mountains, and deep adjacent water. Passive margins should tend toward broad shelves, plains, and sediment accumulation.

Implement simplified elevation-, slope-, and age-dependent erosion. Add hydraulic/coastal erosion and sediment transport where practical.

Hydrology should derive downhill flow, accumulation, drainage basins, rivers, and lakes from terrain. Never draw arbitrary rivers.

Simulation API

Keep simulation independent of rendering, approximately:

class PlanetSimulation {
  constructor(config: PlanetConfig);
  initialize(): void;
  stepForward(): void;
  seek(timeMa: number): Promise<void>;
  getCurrentTime(): number;
  getPlanetState(): PlanetState;
  createSnapshot(): SimulationSnapshot;
  restoreSnapshot(snapshot: SimulationSnapshot): void;
}

Visualization

Globe and Mercator views should support pan/rotate, zoom, inspection, and layers.

Layer toggles should include:

Clearly distinguish convergent, divergent, and transform boundaries and provide a legend.

Inspection should expose useful information about plates, features, and clicked terrain: location, elevation, crust type, plate, age, velocity, geological cause, etc.

User Controls

Expose high-level controls for:

Put lower-level coefficients in an Advanced section.

Include presets:

Provide New Random World and Regenerate Same Seed.

Mercator Export

At any geological time, export a mathematically correct Mercator map using an appropriate polar cutoff (~±85°).

Support:

2048 × 1024
4096 × 2048
8192 × 4096
custom

PNG is required; WebP is optional.

Export types:

Exports must represent the selected geological time even when the user is viewing the globe and must contain no UI.

Export a JSON sidecar containing seed, timeMa, projection, simulation configuration, and simulation version. Support importing/exporting complete world configuration JSON.

Persistence and Performance

Use IndexedDB or suitable local browser storage for Save World, Load World, and Delete World.

Use Web Workers, typed arrays, cached checkpoints, incremental simulation, memoized projection results, and GPU rendering as appropriate.

Separate simulation frequency, rendering frequency, erosion frequency, and hydrology frequency. At high playback speeds, simulation correctness takes priority over rendering every intermediate state.

Implementation Priority

Level 1 — Required

Level 2

Level 3

Do not substitute placeholder UI for missing Level 1 behavior.

Architecture

Use strong boundaries approximately like:

src/
  simulation/
    random/
    sphere/
    terrain/
    tectonics/
    crust/
    geology/
    erosion/
    hydrology/
    timeline/
  rendering/
    globe/
    map/
    projections/
    layers/
    export/
  workers/
  persistence/
  components/
  utils/

Testing

Test at minimum:

Critical invariant:

simulate -500 → -100

must equal

simulate -500 → -250
snapshot
restore
simulate → -100

Also:

seek(-100)
seek(-300)
seek(-100)

must produce exactly the same -100 Ma state both times within defined numerical tolerances.

Scientific Principle

Do not attempt research-grade geodynamics. Preserve causal relationships:

plate movement → boundaries
boundaries → uplift/subduction/rifting
uplift → mountains
subduction → trenches/volcanic arcs
rifting → continental breakup
hotspots + plate movement → island chains
elevation + sea level → land
terrain → drainage
age + erosion → terrain degradation

Prefer causal geological approximation over arbitrary visual noise.

UI

Design the primary interface as a scientific simulation tool:

┌─────────────────────────────────────────────────────────────┐
│ Seed / World      Globe | Mercator        Save    Export   │
├────────────┬────────────────────────────────────────────────┤
│ Controls   │                                                │
│ Layers     │                 WORLD VIEW                     │
│ Inspector  │                                                │
├────────────┴────────────────────────────────────────────────┤
│ ◀◀  ◀  ▶/❚❚  ▶  ▶▶      5×                                │
│ 500 Ma ━━━━━━━━━━━━━━━━━●━━━━━━━━━━━━━━━━━━━ Present        │
│                       137 Ma                                │
└─────────────────────────────────────────────────────────────┘

Optimize primarily for desktop/tablet.

As time runs, users should visibly recognize continents drifting, oceans opening/closing, collisions, mountain formation, rifting, island arcs, hotspot chains, and erosion. Movement vectors and boundary visualization should explain why geography changes.

Do not merely morph arbitrary polygons between random states.

Development Requirement

Implement the application rather than stopping after planning.

Where a geological mechanism is too complex:

  1. implement the simplest causally correct approximation;
  2. isolate it behind a clean interface;
  3. document the simplification;
  4. preserve the ability to improve it later.

Do not replace required behavior with hard-coded demo animations.

Documentation

Provide a README covering installation, build/run commands, architecture, simulation model, checkpoint/timeline system, projection system, determinism, performance, exports, and scientific simplifications.

Also create:

docs/SIMULATION_MODEL.md

explaining which mechanisms are physically inspired versus procedural approximations.

Definition of Done

The first version is complete when I can:

  1. Launch the web app.
  2. Enter a seed and generate a spherical planet with plates and continental/oceanic crust.
  3. Start the simulation and visibly watch geography evolve.
  4. Pause and change playback speed.
  5. Scrub backward 100+ million years.
  6. Scrub forward again and obtain the same deterministic state.
  7. Switch between globe and Mercator views.
  8. Toggle tectonic visualization layers.
  9. Inspect plates and geological features.
  10. Stop at an arbitrary geological time.
  11. Export a high-resolution Mercator PNG representing that exact state.
  12. Export the seed/configuration needed to reproduce the planet.
  13. Reload that configuration and reproduce the same planet.

Prioritize a coherent working geological simulation over excessive visual polish.