
Build a complete, fully playable browser game in a single se...
Prompt
Build a complete, fully playable browser game in a single self-contained HTML/JS file using Three.js and WebGL. ### 0. METADATA & IDENTITY - Title / Tab / Save Key: Pocket Earth Tycoon - HUD Logo: Pocket Earth - Slogan: Walk the world. Draw the routes. - Short Description: Build airports, trains and ships on a tiny living Earth. - Search Tags: world map, airports, trains, ships, buses, quarries, tycoon ### 1. TABLETOP DIORAMA & RENDERING PIPELINE - Board Structure: Flat rectangular Earth diorama framed with a bevelled timber/brass museum border. Sculpted relief includes: Alps, Apennines, Pyrenees, fjords, Nile cut, Atlas, dunes, Appalachians, Andes, Mt. Fuji, Urals, Table Mountain. - Horizon: Studio cyclorama sky dome with soft procedural clouds (no void). - Lighting & Post-Processing: * Key light + soft fill + warm terrain bounce + miniature long cast shadows. * Tilt-shift depth of field (miniature DOF) in ground walk mode. * Unreal-style bloom on sun, illuminated night windows, route ribbons, and water specular highlights. * Day/Dusk/Night dynamic cycle: Dusk features copper terrain and mercury water; Night features indigo atmosphere, glowing window constellations, and illuminated transit ribbons. - Water Shader & Palettes: * Faint traveling waves, white shore/wake foam, persistent ship wakes. * Regional water tinting: Channel (dark crystal), Mediterranean (azure), Nile (green ribbon), Fjords (deep slate), Persian Gulf (turquoise), Hudson (steel), Guanabara Bay (emerald), Sydney Harbour (sapphire), Bosporus (deep blue). - Regional Vegetation (Trunk + layered geometry canopy): * Linden / Plane tree (Europe), Cypress & Olive (Mediterranean), Pine (Norway / Alps / Russia), Palm (UAE / Rio / Cape Town), Sakura (Japan), Acacia / Dry scrub (Africa / Egypt). * Micro-props: French poppy patches, Nile reeds, Brazilian jungle clusters, Australian red-earth scrub. - Miniature Architecture: * Paris (zinc roofs, cream stone), London (pale brick terraces), Germany (ordered blocks), Spain (ochre plazas), Rome (terracotta), Dubai/Shanghai (glass needles), Mumbai (dense warm stacks), New York (brownstones + towers). * Window grids with dynamic warm emissive illumination based on city level. ### 2. SOUVENIR LANDMARKS REGISTRY Each landmark is an instantly recognizable stylized miniature: 1. Paris: Eiffel Tower 2. Rome: Colosseum 3. London: Palace of Westminster / Clock Tower 4. Cairo: Giza Pyramids + Sphinx 5. New York: Statue of Liberty in harbor 6. Rio de Janeiro: Sugarloaf Mountain silhouette + Christ statue hint 7. Sydney: Sydney Opera House shells 8. Tokyo: Miniature Mt. Fuji backdrop + Tokyo Tower red spire 9. Dubai: Burj Al Arab sail + needle skyscraper 10. Moscow: Kremlin fortress walls + colored onion domes 11. Istanbul: Hagia Sophia / Blue Mosque waterfront domes 12. Cape Town: Flat Table Mountain slab 13. Oslo: Sloped waterfront Opera / fjord geometry 14. Shanghai: Oriental Pearl / Pudong skyscraper pair ### 3. COUNTRIES, CITIES & UNLOCK REQUIREMENTS Locked countries are accessible to walk, styled in desaturated velvet with a lock billboard. Unlocking restores full biome saturation and landmark catch-light. - UNLOCKED STARTERS: * France: Paris (Capital, Eiffel Tower), Lyon | Focus: High Tourism * Britain: London (Clock Tower, Thames dock) | Focus: High Business * Germany: Berlin, Frankfurt | Focus: Rail Multiplier + High Cargo * Spain: Madrid | Focus: Tourism Medium * Italy: Rome (Colosseum) | Focus: Tourism High - EARLY UNLOCKS: * Egypt: Cairo (Pyramids, Nile Dock) | Bonus: Tourism + Wonder | Req: 8 completed flights + $2,000 * Turkey: Istanbul (Bosporus Port) | Bonus: Natural Hub * Norway: Oslo (Fjord Port) | Bonus: Low-density High-revenue Tourism * UAE: Dubai (Gulf Port, Mega Airport) | Bonus: International Transfer Hub * USA: New York (Port, Liberty), Chicago (Rail hub) | Req: Grow 2 cities to Level 2 + Reputation - MID-GAME UNLOCKS: * Brazil: Rio (Sugarloaf, Port) | Bonus: Long-haul Tourism * Japan: Tokyo (Mt. Fuji, High-speed rail) | Bonus: Business | Req: 1 completed long-haul route * Australia: Sydney (Harbor Port, Opera) | Bonus: Long-haul Air | Req: Own 1 long-haul plane * India: Mumbai (Port, Dense stacks) | Bonus: High-volume passenger flow * China: Shanghai (River Port, Towers) | Bonus: Rail efficiency * Russia: Moscow (Kremlin walls) | Bonus: Transcontinental long-distance rail * South Africa: Cape Town (Table Mountain, Port) | Bonus: Maritime Tourism ### 4. TRANSPORT LAYERS & VEHICLE ROSTER - AIR LAYER: * 4 Airport Tiers: (1) Grass strip + windsock -> (2) Regional glass terminal + jetway -> (3) Hub with multi-piers & glowing canopy -> (4) Megahub with control tower & night runway cathedral lights. * 5 Aircraft Classes: Propeller, Regional Jet, Narrow-body, Cargo Plane, Long-haul Liner (Prestige). Blinking nav lights and contrail ribbons. - RAIL LAYER: * Station node built on shared landmass; auto-generates land-following tracks (no sea clipping). * 3 Train Types: Local Commuter, Intercity Express, Freight Train (locomotive + 3-6 cars with lit interior windows and track sparks). - SEA LAYER: * Port nodes strictly on coastal water staging spots. * 3 Ship Types: Passenger Ferry, Container Ship (colored cargo stacks), Bulk Freighter. Dynamic bow spray and lingering wake meshes. - BUS LAYER: * Plaza road connections between close towns on the same landmass. Low setup cost, high local network coverage. - QUARRIES & RESOURCE CHAINS: * 4 Resource Node Types: Stone (grey terraces), Sand (warm desert pits), Coal (dark spoil pits), Ore (red-brown open-cast). * Pit Visuals: Terraces, conveyor ramps, tiny machines, and dust particles. * Mechanics: Quarries produce physical cargo on a timer up to a stockpile cap. Cargo yields zero income until routed via Freight Train / Cargo Plane / Bulk Ship / Truck to a city or port. ### 5. ECONOMY, CONTRACTS & EVENTS - Metrics: Money (construction/upgrades) and Reputation (unlocks, route licenses). - Demand Pool: Tourist, Business, and Cargo metrics per city. Diminishing returns apply to duplicate routes; UI shows warning: "This market is already served". - Route Upkeep: Unused stations/airports incur small ongoing maintenance costs. - Route Slots: Starts at 4 slots. +2 slots per Tier 3 Hub; +2 per Reputation tier. - Transfer Hubs: Level 3+ city + Tier 3 hub enables A -> Hub -> C passenger routing with bonus payout. - Rotating Contracts (3 slots, 2โ8 min timers): e.g., "Deliver 80 tourists to Paris", "Move coal to Berlin", "Complete 6 international flights". - Light Seasonal Events: * Rio Carnival: Brazil tourism +50%. * Egypt Sandstorm: Air travel slowed; rail unaffected. * Japan Sakura Week: Tokyo tourism boost + pink sakura tree switch. * Aurora Borealis: Norway night visual flare + tourism boost. ### 6. CAMERA, AVATAR & POSTCARD OVERLAY - Controls: Third-person avatar controls with smooth continuous zoom (micro-level apron inspection to macro diorama overview). World camera never hard-cuts. - Proximity Bubble: Standing near nodes displays node name, visual tier, and "LOOK" eye button. - Route UX: 2-click builder: Select Origin -> click "Route From Here" -> select valid pulsing Destination -> Preview Plate (travel time, income/min, demand icons) -> Confirm instant spawn. - Live Postcard Overlay: * Triggers via LOOK button or city card thumbnail. * Freezes the main world in background with a slight blur/dim; renders an 80% screen overlay containing a dedicated, looping secondary Three.js scene (10โ15s loops): 1. Airport Stage: Terminal glass, jetway, airliner at gate, service baggage carts, heat haze tarmac. 2. City Plaza Stage: Landmark hero angle, looping pedestrian beads, cafe tables, bouncing warm sun. 3. Station Stage: Train docked at platform, commuters, destination boards, steam/light shafts. 4. Port Stage: Container crane moving, cargo ship at quay, gulls, crawling water caustics. 5. Quarry Stage: Dump truck tipping rock into hopper, volumetric dust beam, idling heavy excavators. ### 7. ONBOARDING SEQUENCE (FIRST 75 SECONDS) 1. Spawn avatar at Paris. 2. Build Paris Airstrip (Tier 1). 3. Build London Airstrip (Tier 1). 4. Connect Paris <-> London Air Route. 5. First plane takes off, completes loop, awards income + unlocks Special Bright Livery. 6. Trigger prompt to open Paris Live Postcard view.
A system prompt was added to support web rendering
Response not available