Skip to content

Latest commit

 

History

History
98 lines (66 loc) · 2.83 KB

File metadata and controls

98 lines (66 loc) · 2.83 KB

Contributing to Loopolis

Thanks for your interest in contributing! Loopolis is a solo indie project open to community improvements. Keep PRs small and focused — that makes review fast and merges easy.

Website: https://www.codewithagents.de


Getting Started

Prerequisites

Clone and build

git clone https://github.com/codewithagents/loopolis-city-builder.git
cd loopolis-city-builder
dotnet build src/

Run Tests

All simulation logic lives in src/Loopolis.Core/ and is covered by NUnit tests. Run them with:

dotnet test

Tests complete in under 5 seconds — no Godot startup required.


Run the Game

Standalone mode (Godot runs its own simulation)

DOTNET_ROOT=/opt/homebrew/opt/dotnet/libexec \
  /Applications/Godot_mono.app/Contents/MacOS/Godot \
  --path /path/to/loopolis/godot/ \
  --editor
# Open scenes/World.tscn and press F5

Server + viewer mode (headless simulation + Godot viewer)

# Terminal 1 — start simulation server
export DOTNET_ROOT="/opt/homebrew/opt/dotnet/libexec"
dotnet run --project src/Loopolis.Runner -- server default --speed 2

# Terminal 2 — launch Godot viewer
DOTNET_ROOT=/opt/homebrew/opt/dotnet/libexec \
  /Applications/Godot_mono.app/Contents/MacOS/Godot \
  --path /path/to/loopolis/godot/ \
  --editor
# Open scenes/World.tscn and press F5

Headless balance checks

dotnet run --project src/Loopolis.Runner -- 500 default
dotnet run --project src/Loopolis.Runner -- 1000 powered_start

Output is JSON — useful for verifying simulation balance without opening Godot.


How to Contribute

  1. Fork the repository
  2. Create a branchgit checkout -b feat/my-feature
  3. Implement Core changes first (if any), then Godot presentation
  4. Testdotnet test must be green; Godot must compile (cd godot && dotnet build)
  5. Open a PR — fill in the PR template

Rules

  • No Godot imports in Loopolis.Core/ — ever. Core is pure C# with zero engine dependencies.
  • Every new system needs NUnit tests — test files mirror source paths (e.g. Simulation/MySystem.cstests/.../Simulation/MySystemTests.cs).
  • No business logic in Program.cs or World.cs — wiring only.
  • Keep PRs small and focused — one feature or fix per PR makes review much easier.
  • Balance check — if you touch simulation math, run a headless scenario and include the output (or a summary) in the PR description.

Questions?

Open a GitHub Discussion or reach out via the website: https://www.codewithagents.de