gilded-system

byyousuf2024

I need you to build my entire Flutter city transportation simulation game using an automated, self-correcting development loop. Do not ask me for clarification; make logical decisions and proceed through ALL phases. GAME SPECIFICATION: Theme: Dark theme with realistic roads, buildings, trees, and bus stops. Core Loop: Buses follow routes, pick up/drop off passengers, generate revenue. Features: City Map View (interactive, zoom/pan, double-tap to add stops). Bus System (multiple buses, routes, capacities, colors). Passenger System (automatic generation, rush hour simulation). Route Management (create routes by selecting stops). Stop Management (add/delete via double-tap). Financial Dashboard (revenue by bus, stop, route). Game Controls (Play/Pause, Speed slider 0.5x-3x). Expansion Ready (architecture must support future trains, airports, and buildings like cafes/schools). YOUR AUTOMATED TIERED LOOP INSTRUCTIONS: TIER 1: THE FOUNDATION (DO NOT PROCEED UNTIL THIS PASSES) Generate the core GameState class (using Riverpod or Provider). Generate the MapRenderer (roads, dark theme, basic grid). Self-Critique: Check if the map renders without crashes and if the state updates properly. Rewrite: Fix any issues. Test: Provide 3 tests to prove the map and state work. OUTPUT: Only proceed to Tier 2 once you confirm Tier 1 code is solid. TIER 2: THE CORE MECHANICS (BUSES + PASSENGERS + REVENUE) Generate the Bus, BusStop, Passenger, and Route classes. Generate the movement controller (smooth animation along routes). Generate the passenger spawner (with rush hour logic). Generate the revenue tracker (per bus/stop/route). Self-Critique: Check for memory leaks (dispose controllers), capacity bugs, and revenue calculation errors. Rewrite: Fix all issues. Test: Provide 5 edge-case tests (e.g., bus full, midnight no passengers, etc.). OUTPUT: Only proceed to Tier 3 if all tests pass. TIER 3: THE UI & INTERACTIONS (MANAGEMENT + DASHBOARD) Generate the RouteManagementScreen (select stops to create a route). Generate the FinancialDashboard (charts and tables showing revenue). Generate the double-tap-to-add-stop functionality. Generate the Play/Pause and Speed Slider controls. Self-Critique: Check for UI lag, incorrect state updates, and unresponsive gestures. Rewrite: Optimize UI performance (use RepaintBoundary, Consumer widgets correctly). Test: Provide 3 user-flow tests (e.g., "User adds stop, creates route, starts game"). OUTPUT: Only proceed to Tier 4 if UI interactions work flawlessly. TIER 4: THE EXPANSION LAYER (FUTURE-PROOFING) Refactor the architecture to use an abstract TransportNode class (so trains/airports can inherit later). Refactor buildings to use an abstract Building class (cafe, school, monument). Create an ExpansionManager that auto-discovers new node types from a config file. Self-Critique: Does the new architecture break existing bus/passenger logic? Is it truly plug-and-play for new features? Rewrite: Ensure zero breakage and 100% backward compatibility. Test: Simulate adding a "TrainStation" as a proof of concept without changing core code. TIER 5: FINAL INTEGRATION & POLISH Combine all Tiers into a single, cohesive main.dart and supporting files. Generate a folder structure (e.g., /models, /controllers, /screens, /widgets). Provide a 10-point setup guide (dependencies, assets folder for dark theme icons, etc.). Final Self-Critique: Review the entire project for consistency, naming conventions, and performance. Final Rewrite: Polish the code. FINAL OUTPUT: Output the complete project code in organized code blocks. If the response gets cut off, say "CONTINUE" and I will prompt you to resume. EXECUTION RULE: You are forbidden from stopping at Tier 1 and asking "Should I proceed?" You must automatically move through Tier 2, 3, 4, and 5 until the entire game is fully built, tested, and output. You are the architect and the worker. Begin now.

LandingCityMapRouteManagementExpansionManager
Landing

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document
Page 1 of 5

System Requirements Document for Gilded-System

Introduction

The "Gilded-System" is a city transportation simulation game designed to provide an interactive and engaging experience for users. The game is built using Flutter and follows an automated, self-correcting development loop to ensure robustness and scalability. This document outlines the system requirements for the Gilded-System, focusing on its core functionalities, user interactions, and future expansion capabilities.

System Overview

The Gilded-System is a simulation game where players manage a city's transportation network. The game features a dark theme with realistic elements such as roads, buildings, trees, and bus stops. The core gameplay loop involves managing buses that follow routes, picking up and dropping off passengers, and generating revenue. The system is designed to be expandable, allowing for future additions like trains, airports, and various buildings.

Page 2 of 5

Functional Requirements

  • As a Player, I should be able to view an interactive city map that allows zooming and panning.
  • As a Player, I should be able to add bus stops by double-tapping on the map.
  • As a Player, I should be able to manage multiple buses with different routes, capacities, and colors.
  • As a Player, I should be able to simulate passenger generation, including rush hour scenarios.
  • As a Player, I should be able to create and manage routes by selecting stops.
  • As a Player, I should be able to add or delete stops via double-tap.
  • As a Player, I should be able to view a financial dashboard showing revenue by bus, stop, and route.
  • As a Player, I should be able to control the game with play/pause and a speed slider ranging from 0.5x to 3x.
  • As a Developer, I should ensure the architecture supports future expansions like trains and airports.
  • As a Developer, I should ensure the game state updates properly without crashes.
  • As a Developer, I should ensure smooth animations for bus movements along routes.
  • As a Developer, I should ensure memory management by disposing of controllers properly.
  • As a Developer, I should ensure UI performance is optimized using appropriate Flutter widgets.

User Personas

  • Player: The primary user who interacts with the game, managing the transportation network and making strategic decisions to optimize revenue.
  • Developer: The individual responsible for maintaining and expanding the game's features and ensuring its smooth operation.

Core User Flows

  • Player opens the game -> Views city map -> Adds bus stops -> Creates routes -> Starts simulation -> Monitors revenue on the dashboard.
  • Player adjusts game speed -> Observes passenger generation -> Manages bus capacities -> Optimizes routes for maximum efficiency.
  • Developer tests game state -> Ensures map renders correctly -> Verifies smooth animations -> Checks for memory leaks.
Page 3 of 5

Visuals Colors and Theme

  • primary: #1A1A2E (Dark Blue)
  • primary_light: #16213E (Lighter Blue)
  • secondary: #E94560 (Crimson)
  • accent: #0F3460 (Deep Indigo)
  • highlight: #F9D342 (Amber)
  • bg: #0D0D0D (Dark Gray)
  • surface: rgba(26, 26, 46, 0.8)
  • text: #FFFFFF (White)
  • text_muted: #B0B0B0 (Muted Gray)
  • border: rgba(233, 69, 96, 0.2)

Signature Design Concept

The Gilded-System features a dynamic cityscape that evolves as the player interacts with it. The homepage presents a 3D interactive map using @react-three/fiber and @react-three/drei, where buildings and roads rise and fall based on player actions. As players zoom in, the map transitions smoothly, revealing intricate details like bus stops and passenger movements. Hovering over elements provides real-time data, and clicking on buses or stops opens detailed management panels. The map's lighting changes with the in-game time, creating a living, breathing city environment.

Page 4 of 5

Interaction Model & Motion Direction

The landing page employs a "parallax" interaction model, providing a layered depth effect as users scroll. Decorative elements like clouds and distant cityscapes move at different speeds, creating an immersive experience. Internal pages, such as the dashboard and management screens, use an "animated" model with scroll-triggered reveals and hover transitions for a polished look.

Non-Functional Requirements

  • The system must handle up to 10,000 concurrent users without performance degradation.
  • The game should load within 3 seconds on standard broadband connections.
  • The UI must be responsive and function correctly on both desktop and mobile devices.

Tech Stack

  • Frontend: Flutter
  • Backend: Not specified (assumed to be managed within the Flutter framework)
  • Database: Not specified (assumed to be managed within the Flutter framework)
  • AI Models: Not applicable
  • Local Orchestration: Not specified
  • Server-side Orchestration: Not specified

Assumptions and Constraints

  • The game will be developed and tested primarily for the Saudi Arabian market, considering local preferences and time zones.
  • Future expansions must integrate seamlessly with the existing architecture without requiring significant rewrites.
Page 5 of 5

Glossary

  • Bus Stop: A designated location where buses pick up and drop off passengers.
  • Route: A predefined path that buses follow within the city.
  • Passenger: A simulated entity that uses the bus system.
  • Revenue: The income generated from passenger fares.
  • Rush Hour: A period with increased passenger generation, simulating real-world traffic patterns.
Landing design preview
Landing: Launch App
CityMap: Test Render
CityMap: Verify Map
GameState: Test State
GameState: Check Updates
BusSystem: Test Animations
BusSystem: Verify Movement
PassengerSystem: Test Spawner
FinancialDashboard: Verify Revenue
ExpansionManager: Test Config
Architecture: Check Memory
Architecture: Validate Performance