Skip to content

Jacob-Strokus/RTS

Repository files navigation

FrontierAges (Working Title)

3D real‑time strategy game inspired by classic large‑scale historical RTS titles, built with Unity (URP) targeting scalable simulation, readable battle clarity, and moddable data.

Chosen Foundations (Confirmed)

  • Engine: Unity LTS + URP.
  • Style: Low‑poly readable silhouettes (flat shaded accents, light PBR for hero props).
  • Ambition: Long‑term stretch 1000 units per player (deferred). Staged targets: Phase A 300 total, Phase B 300 per player (4 players), later optimization toward higher counts.
  • Map Sizes: Start 256×256 heightmap (playable core ~128×128). Add 512×512 mid, experiment 768–1024 later.
  • Ages (initial 3): Era I, Era II, Era III (placeholder naming).
  • Resources (4): Food, Wood, Stone, Metal.
  • Multiplayer: Defer to Milestone 5 (SP first) but maintain deterministic‑friendly simulation (fixed tick 20 Hz, isolated logic assemblies).
  • Minimum Hardware Target: GTX 1050 / RX 560 @ 60 FPS medium settings; integrated GPU fallback 30 FPS.
  • Differentiators:
    1. Seasonal & weather cycle affecting vision/movement/economy.
    2. Territory influence + supply efficiency (soft logistics bonuses, not hard punishment).
    3. Data‑driven moddable pipeline from day one.

Repository Layout

/docs
  architecture.md
  milestones.md
  data_schemas.md
  design_pillars.md
  networking.md
/data
  units.json
  buildings.json
  resources.json
  techs.json
/prototype
  Simulation/ (early pure-C# deterministic core sketches prior to Unity integration)
unity_project_placeholder/README.md

Unity project itself will be created inside unity_project/ (not yet generated) to keep design docs separate.

Quick Start (after creating Unity project)

  1. Install Unity LTS (e.g., 2023.2/2023.3 or 2024.x when stable) with Windows + WebGL modules (future optional).
  2. Create project (3D URP) in ./unity_project named FrontierAges.
  3. Add assembly definitions:
    • Gameplay.Simulation (no UnityEngine dependencies for determinism core where possible).
    • Gameplay.Presentation (depends on Simulation + UnityEngine).
  4. Import data JSON under Assets/Data/ (will later move to Addressables).
  5. Implement bootstrap: Load data -> Build prototype scene -> Spawn test units.

Simulation Loop Concept

Render (variable frame) → Interpolate from last 2 fixed states
FixedTick (20 Hz):
  1. Collect + queue player/AI commands (timestamped frame)
  2. Process production & research
  3. Assign tasks (gather, build, move, attack)
  4. Pathfinding batch + movement integration
  5. Interactions (gathering, combat resolution)
  6. Economy & territory update
  7. Vision / Fog of War update
  8. Weather / season progression events
  9. AI strategic + tactical layers (staggered frames)
 10. Event dispatch (UI / FX consume)

Contribution Next Steps

Standalone builds

  • Branch: feature/standalone-build
  • Folders: build/ (timestamped build outputs), bin/ (shortcut to latest build)
  • In Unity (open unity_project/):
    • Menu: FrontierAges > Data > Sync to StreamingAssets (copies repo data/ into Assets/StreamingAssets/data)
    • Menu: FrontierAges > Build > Build Windows (x64)
    • Output: build/windows-x64-YYYYMMDD-HHMMSS/FrontierAges.exe and mirrored to bin/windows-x64-latest/

Build and run from CLI (no Unity Hub)

  • PowerShell (Windows):

    • Script: scripts\build-and-run.ps1
    • Usage: .\u200bscripts\build-and-run.ps1 -UnityPath "C:\\Program Files\\Unity\\Hub\\Editor\\<ver>\\Editor\\Unity.exe" (Unity path optional if auto-detected)
    • Flags: -NoRun to skip launching after build.
    • Output exe: bin\windows-x64-latest\FrontierAges.exe
  • Bash (WSL/Linux/macOS):

    • Script: scripts/build-and-run.sh
    • Ensure UNITY_EDITOR_PATH or UNITY_PATH points to your Unity editor binary, or pass via UNITY_PATH=/path/to/Unity ./scripts/build-and-run.sh
    • Under WSL, the script will attempt to launch the Windows exe via powershell.exe if available.

See /docs/milestones.md for milestone definitions.

  • Snapshot system: save (F5) / load (F9) including unit order queues and movement paths (capped lengths) + building footprints + faction stockpiles + resource nodes
  • Deterministic RNG embedded (xorshift32) used for spawn variation

Planned / Next Steps

  • Visual combat feedback (damage numbers, health bars, attack range debug)
  • Tech / research serialization & progression
  • Replay / deterministic verification via command log (snapshots already in place)
  • Fog of war & vision system integration
  • Territory / logistics prototype (influence overlay)
  • Multi-building production & queues (batch / rally points)
  • UI polish: icons, hotbar, drag placement orientation, resource tooltips
  • Pathfinding improvements: crowd avoidance, flow fields for large armies
  • Network lockstep experiment post local replay validation
  • Performance instrumentation expansion (per-system timings, allocation charts)

About

rts game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages