Towntopia - City Building & Management Game

Seele01-Flash
By
Towntopia is a captivating city-building simulation game where you create and manage your own thriving society from the ground up. Build houses, manage resources, and watch your population grow in this engaging SimCity-style experience.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Towntopia Mobile". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Create a vibrant **Isometric Low-Poly** aesthetic. The camera should be fixed at an orthographic 45-degree angle (Iso view). Use a warm color palette (terracotta/orange ground, bright green vegetation, pastel building colors) similar to the reference screenshot. * **Grid System**: Implement a visible grid map (e.g., 20x20 tiles). The ground should be a flat plane. * **Building Models (Procedural/Primitives)**: Since external assets cannot be loaded, use composed Three.js primitives (`BoxGeometry`, `CylinderGeometry`) to represent: * **Residential**: Small cottages with triangular prism roofs. * **Commercial**: Boxy shops with awnings (flat planes). * **Industrial**: Buildings with smokestacks (cylinders). * **Nature**: Trees (Cone on Cylinder), rocks, and water tiles. * **Roads**: dark gray flat tiles. * **Performance**: Use `THREE.InstancedMesh` for repeated environmental elements like trees, road tiles, or fence posts to ensure 60fps on mobile browsers. Use simple Lambert or Phong materials for performant lighting. ### 2. Audio Requirements * **BGM**: Generate a placeholder for a gentle, looping acoustic melody (SimCity style) – calm and productive. * **SFX**: * **Construction**: A satisfying "thud" or "poof" sound when a building is placed. * **UI Click**: A soft "wood block" click for menu selection. * **Collection**: A high-pitched "ding" or "coin" sound when resources are collected from buildings. * **Error**: A buzzer sound if the player tries to build without enough money. ### 3. Gameplay Loop * **Resource Management**: Track four core resources: **Money**, **Population**, **Food**, and **Materials**. * **Building Logic**: * **Roads**: Connect buildings (visual only for this prototype, but necessary for aesthetic). Cost: $5. * **Houses**: Increase Population cap. Generate passive Money slowly. Cost: $50 + 10 Materials. * **Farms**: Produce Food. Require Money to build. Cost: $100. * **Factories**: Produce Materials. Consume Population (workers). Cost: $200. * **Shops**: Generate high Money. Consume Food and Materials. Cost: $300. * **Core Loop**: Player starts with limited funds -> Builds a road and a house -> Waits for income -> Builds a farm -> Expands town. * **Visual Feedback**: Display floating text (e.g., "+$10") rising from buildings when resources are generated. ### 4. Mobile Controls & Interaction * **Camera Controls (Touch)**: * **One-finger Drag**: Pan the camera across the map (X and Z axis). * **Two-finger Pinch**: Zoom the camera (adjust Orthographic camera zoom). * **Limit**: Clamp camera movement so the player cannot lose the map. * **Building Placement UI**: * Create a **Bottom Sheet / Scrollable Horizontal Bar** containing building icons. * **Interaction Flow**: 1. Tap icon in UI (highlight selection). 2. Tap a grid tile on the map to place the building. 3. If the tile is occupied, show a red "invalid" visual cue (color tint). * **UI Layout**: * **Top Bar**: Display current resources (Money, Pop, Food, Mat). Text should be large and legible (min 16px). * **Touch Targets**: Ensure UI buttons are at least 44x44 pixels for easy tapping. * **Haptic/Visual Feedback**: * When a building is placed, trigger a slight screen shake or scale-bounce animation on the building mesh. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Towntopia is an immersive city-building simulation game that puts you in control of creating your own bustling society. Drawing inspiration from classic SimCity gameplay, this browser-based strategy game challenges you to build, manage, and expand a thriving metropolis from scratch. With its charming isometric graphics and intuitive gameplay mechanics, Towntopia offers hours of engaging city management entertainment.

Core Features

Complete City Management System

Towntopia provides a comprehensive city-building experience where every decision matters. Start with empty land and gradually transform it into a bustling urban center by strategically placing residential, commercial, and industrial buildings.

Resource Management & Economy

Balance multiple resources to keep your city running smoothly: - Housing : Build residential areas to grow your population - Food Production : Construct farms to feed your citizens - Commercial Zones : Develop shops and businesses to generate income - Industrial Buildings : Create factories for raw material production - Infrastructure : Design road networks to connect all areas

Advanced Urban Development

As your city grows, unlock advanced features: - Office Buildings : Boost your economy with commercial districts - Monuments : Add prestigious landmarks to enhance city appeal - Natural Features : Customize terrain with trees, mountains, lakes, and waterfalls - Decorative Elements : Personalize your city with unique aesthetic touches

Free Browser Gaming

Enjoy full access to all features without downloads or payments. Towntopia runs smoothly on any modern web browser, making it perfect for quick gaming sessions or extended city-planning marathons.

Game Mechanics

Population Growth System

Your city's success depends on maintaining a healthy population. Build adequate housing to attract new residents, then provide essential services to keep them happy and productive.

Economic Balance

Manage the delicate balance between residential, commercial, and industrial zones. Each sector supports the others - residents provide workers, businesses generate tax revenue, and factories produce goods for trade.

Infrastructure Planning

Road placement is crucial for city efficiency. Well-planned transportation networks ensure smooth resource flow and enable rapid expansion into new territories.

Operation Guide

Basic Controls

  • Menu Access : Press ESC to open the main menu
  • Building Placement : Click to place selected buildings and structures
  • Camera Movement : Use WASD keys or arrow keys to navigate around your city
  • Zoom Function : Use Z/X keys or mouse scroll wheel to zoom in and out

Getting Started Tips

  1. Begin with basic residential buildings to establish your population
  2. Build farms early to ensure adequate food supply
  3. Connect all buildings with roads for optimal functionality
  4. Balance commercial and industrial development for steady income
  5. Expand gradually while maintaining resource balance

Why Play Towntopia

Perfect for Strategy Enthusiasts

Towntopia appeals to players who enjoy strategic thinking and long-term planning. The game rewards careful resource management and thoughtful urban design.

Stress-Free Gaming Experience

Unlike many city builders with time pressure, Towntopia allows you to build at your own pace. Take time to plan the perfect layout without rushing deadlines.

Creative Freedom

The game's decoration and terrain modification features let you express creativity beyond pure functionality. Design unique landscapes and architectural masterpieces.

Accessibility and Convenience

With no downloads required and cross-platform browser support, you can continue building your city from any device with internet access.

Educational Value

Towntopia teaches valuable lessons about urban planning, resource allocation, and economic principles while remaining entertaining and accessible to all ages.

Frequently Asked Questions (FAQ)