EARTHSHAPER — Tech Demo · Implementation BriefYou are an expert AI coding agent acting…
- User
EARTHSHAPER — Tech Demo · Implementation BriefYou are an expert AI coding agent acting as the lead engineer and technical artist on a real-time graphics tech demo. You have full autonomy to select the best architecture, rendering engine, libraries, and shader approaches to deliver this project end to end. This document is the spec, the art direction, and the acceptance criteria.0. Prime DirectiveVisual quality is the product. There is no overarching gameplay loop, no tribe to manage, no UI clutter. A player will load this, fly around a volcanic island, pick up and drop sand, water, and lava, watch the terrain physically react, and either think "this is AAA" or close the tab. Everything below serves that single judgment.Core Rules:Visuals > Specs: If a requirement in this brief conflicts with making the demo look more beautiful or fluid, break the requirement and log a one-line rationale in DECISIONS.md.No Placeholder Aesthetics: Anything that looks flat-shaded, low-poly, or untextured is a defect. If a feature cannot be polished to production standard, cut it rather than shipping it half-baked.1. Tech Stack & Environment Architecture1.1 Tech Stack (AI Autonomy)You are free to choose any modern web technology stack, rendering engine, and supporting libraries (e.g., Three.js, Babylon.js, WebGPU/WGSL, WebGL2/GLSL, WASM, Pixi, etc.). Choose the toolchain that gives you the best balance of:Fluid/cellular automata simulation speed on the GPU or via WASM.Photorealistic PBR landscape rendering, refractive water, and emissive fluid shading.Zero-garbage-collection runtime performance.Document your choices and reasons in DECISIONS.md.1.2 Development Server & VirtualBox ConfigurationThe project will be built inside a Linux VirtualBox VM (Guest) and tested from a Windows 10 Host machine via VirtualBox NAT Port Forwarding.Your development server configuration (e.g., Vite or equivalent bundler config) MUST strictly adhere to these rules:VirtualBox NAT Port Forwarding Mapping:Rule Name: Vite ServerProtocol: TCPHost IP: 127.0.0.1Host Port: 5173Guest IP: 10.0.2.15Guest Port: 5173Server Host Binding: The dev server must explicitly bind to 0.0.0.0 (all network interfaces) on port 5173 (e.g., server: { host: '0.0.0.0', port: 5173 } in Vite). Binding only to 127.0.0.1 inside the VM will cause connection drops across the VirtualBox NAT bridge. 2. Core Game & Simulation Systems2.1 Terrain & Fluid Simulation EngineThis is a real-time elemental sandbox. The terrain is a living, reactive surface.Grid: Create a GPU/WASM-driven grid (e.g., 512x512 or 1024x1024) storing height and material density (Rock, Sand, Water, Lava, Vegetation).Physics Mechanics:Water: Flows downhill, pools in depressions, evaporates near heat/lava.Lava: Viscous, slow-flowing, emits light, and cools into solid basalt/rock when touching water.Sand: Obeys the natural angle of repose, creating sloped dunes and collapsing under gravity.Mesh Generation: Render the terrain using continuous displacement mapping, heightfield rendering, or voxel meshing for smooth transitions from volcanic peaks to coastal reefs.2.2 Multi-Material PBR ShadingDevelop a material system that dynamically blends terrain surfaces based on simulation states:Sand: Features view-dependent granular glinting (specular noise) and a dynamic wetness mask where water has recently receded.Rock/Basalt: Dark, textured, with sharp micro-occlusion and rough cliffs.Water: Real-time refraction, depth-based color absorption (tropical turquoise to deep ocean blue), and foam effects where waves meet land.Lava: Emissive core with a cooling, cracked voronoi crust. Heavily drives bloom and dynamic scene lighting.Vegetation: Procedural growth of moss and flora over humid rock/sand near water sources.2.3 "The Breath" (Cursor & Interaction)The player controls a floating, ethereal entity ("The Breath") hovering above the terrain.Visual Representation: Localized heat shimmer/refraction distortion with a glowing particle core.Absorb (RMB): Vacuum up matter (sand, water, or lava) from the terrain into a swirling sphere contained within the cursor. The terrain deforms dynamically into craters as mass is removed.Release (LMB): Drop the stored mass back onto the island. Sand forms dunes, water triggers floods, lava creates new landmasses.Mass Conservation: Matter picked up must equal matter dropped.2.4 Atmosphere & Post-ProcessingLighting: Warm sun with cascaded soft shadows. Dynamic point/area lights emitted by active lava flows onto adjacent rock and water.Particle VFX: Steam plumes where lava touches water, dust clouds on sand slides, ember sparks from lava.Post-Processing Pipeline: TAA/FXAA → Depth of Field/SSAO → Screen-Space Reflections (for water/wet sand) → Bloom (for lava glow) → Color Grading (AgX / ACES) → Tonemapping.2.5 Camera & NavigationAn intuitive RTS/God-game drone camera.Pan across the terrain via keyboard (WASD) or screen edges.Orbit, pitch adjustment, and zoom via mouse drag/wheel with smooth momentum and damping.3. Performance & Optimization EngineeringFrame Target: Sustained 60 FPS target at 1440p during heavy fluid and sand interactions.Garbage Collection Elimination: Zero object/array allocations inside the main animation/render loop. Pre-allocate vectors, scratch matrices, and buffers at startup.Performance Monitoring: Include a minimal F1 performance overlay displaying a real-time frame-time graph, 1% low FPS, and compute/simulation dispatch times.4. Loading & Pipeline SettlePre-compile all shaders, pipelines, and particle textures during an initial loading screen.Step the physics simulation silently for ~100 frames before revealing the scene so the landscape settles naturally.5. Project Directory StructurePlaintext/src /core Engine setup, main loop, resource management /server Server & host binding configurations (0.0.0.0:5173) /simulation Fluid, sand, and lava physics shaders / algorithms /terrain Terrain displacement, PBR materials, and blending /interaction Cursor mechanics, matter absorption/release logic /vfx Steam, embers, dust, post-process chain /ui Performance overlay (F1) /assets Vendored CC0 materials, maps, and textures ASSETS.md DECISIONS.md PERF.md 6. Development MilestonesFoundation: Server booted with 0.0.0.0:5173 VirtualBox compatibility, basic engine render loop, God camera, settings overlay.Simulation Engine: Compute grid operational. Sand collapses, water flows downhill, lava cools into rock.Shading & World: Multi-material blending, refractive water, emissive lava, dynamic lighting.Interaction: "The Breath" cursor absorbing and releasing mass smoothly.VFX & Polish: Steam, bloom, screen-space reflections, atmospheric fog, and vegetation spread.Performance Tuning: 60 FPS sustained with zero GC spikes during active terrain manipulation.7. Working AgreementInspect your visual output continuously. Most of the difference between "indie prototype" and "AAA" lies in parameter tuning and material polish.If a selected library or technique underperforms, feel empowered to swap it out for a better alternative.Record all major design choices and stack decisions in DECISIONS.md.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.