Add configuration option for ghost reset distance. Improve documentation.

This commit is contained in:
2025-12-20 17:12:58 -05:00
parent faf3f239d8
commit 7a3705d342
25 changed files with 132 additions and 28 deletions

View File

@@ -3,4 +3,23 @@ This is a continuation of my [goland-game](https://github.com/five-hundred-eleve
While the previous project was implemented in go, for this project I was not able to get the go bindings for OpenGL working, and so I went with C++.
[Repository Guidelines](AGENTS.md) outlines code structure, build steps, and contribution conventions.
## Configuration (`ghostland.json`)
`ghostland.json` is parsed at startup with a minimal line-by-line reader, so keep it a flat list of key-value pairs (`"key": value`). Omitted keys fall back to in-code defaults.
| Key | Type | Default | Description |
| --- | --- | --- | --- |
| `camera_speed` | float | `20.0` | Scales how fast the free camera pans when you move the mouse to the screen edge or hold movement keys. Raise for faster fly-through, lower for precise adjustments. |
| `ghost_reset_distance` | float | `10.0` | Minimum distance (units) between the player and the nearest ghost before the player is snapped back to the maze start. Increase for a safer buffer, decrease for higher tension. |
Example:
```json
{
"camera_speed": 30.0,
"ghost_reset_distance": 8.5
}
```
![gameplay capture](https://stromsy.com/content/ghostland_6.gif)