monotonicity

A city-building and transport simulation game written in Lean

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
# MonotoniCity

A city-building and transport simulation game written in Lean (like a hybrid of SimCity and OpenTTD)

Build roads, multilane roads, controlled-access highways, roundabouts, diverging diamond interchanges, trumpet interchanges, stack interchanges, tunnels, and more!

TODO screenshot

## Building

You can download a prebuilt AppImage at https://f.unnamed.website/monotonicity.AppImage

To build this using Nix (least painful trust me), just run `nix build`.

On NixOS you can also build this by hardcoding the directory of `libraylib.so` in `lakefile.toml` (for instance `moreLinkArgs = ["-L/nix/store/2ndddyrjb1ahx05kmsjqvzkagz1bdmpk-raylib-6.0/lib", "-lraylib"]`) and running `lake build`, which can be much faster due to caching.

Otherwise, install Raylib and run `lake build` and hope for the best. It probably won't work, but you can give it a try.

To build an AppImage that can run on any Linux distro, run `nix bundle --bundler github:NixOS/bundlers#toAppImage --impure`.

## Gameplay

MonotoniCity has both a console and a GUI window. Type `help` in the console to get a list of hotkeys for the GUI (TODO: document all the commands).

I recommend running the game with `rlwrap` for a slightly nicer console.

There's no soundtrack currently but you can play some nice tracks from the Simutrans soundtrack using `mpv --playlist=soundtrack --shuffle --loop-playlist --no-video`.

## Why the name?

`monotonicity` is a tactic in Lean.