Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# All files — Benjamin is the default reviewer for every PR
* @benjamineckstein
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Bug Report
description: Something broke or behaves unexpectedly
labels: ["bug"]
body:
- type: textarea
id: what_happened
attributes:
label: What happened?
description: Describe the bug clearly.
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: How can we reproduce the issue?
placeholder: |
1. Open the game
2. Place a residential zone
3. ...

- type: textarea
id: expected
attributes:
label: Expected behaviour
description: What should have happened instead?

- type: dropdown
id: where
attributes:
label: Where did it happen?
options:
- Godot game window
- Headless runner / CLI
- Simulation logic (Core)
- Other

- type: input
id: version
attributes:
label: Loopolis version / commit
placeholder: "e.g. main@abc1234"
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Feature Request
description: Suggest a new mechanic or improvement
labels: ["enhancement"]
body:
- type: textarea
id: feature
attributes:
label: What would you like to see?
description: Describe the feature or improvement you have in mind.
validations:
required: true

- type: textarea
id: why
attributes:
label: Why would this improve the game?
description: What problem does it solve or what fun does it add?

- type: textarea
id: implementation
attributes:
label: Any implementation ideas?
description: Optional — sketches, references, prior art welcome.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## What does this PR do?

<!-- One-line summary -->

## Checklist

- [ ] `dotnet test` passes locally
- [ ] New systems have NUnit tests
- [ ] No Godot imports in `Loopolis.Core`
- [ ] Godot scripts compile (`cd godot && dotnet build`)
- [ ] Balance checked (ran a scenario via headless runner if touching simulation math)
98 changes: 98 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# 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**

- [.NET 10 SDK](https://dotnet.microsoft.com/download)
- [Godot 4.4.1 .NET edition](https://godotengine.org/download) — install to `/Applications/Godot_mono.app` on macOS or adjust paths accordingly

**Clone and build**

```bash
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:

```bash
dotnet test
```

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

---

## Run the Game

### Standalone mode (Godot runs its own simulation)

```bash
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)

```bash
# 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

```bash
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 branch** — `git checkout -b feat/my-feature`
3. **Implement** Core changes first (if any), then Godot presentation
4. **Test** — `dotnet 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.cs` → `tests/.../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](https://github.com/codewithagents/loopolis-city-builder/discussions) or reach out via the website: https://www.codewithagents.de
15 changes: 15 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Security Policy

## Reporting a Vulnerability

Please do **not** file a public GitHub issue for security vulnerabilities.

Instead, send an email to **umingo@gmail.com** with the subject line:

> Loopolis Security

We will respond within **72 hours** and coordinate a fix before any public disclosure.

## Non-Security Bugs

For ordinary bugs and unexpected behaviour, please use [GitHub Issues](https://github.com/codewithagents/loopolis-city-builder/issues).
Loading