An OCaml remake of Railroad Tycoon (1990). Build railroads, manage trains, compete with AI rivals, and grow your empire across historical regions.
See FEATURES.md for a full list of features.
- OCaml 5.x with opam
- Original Railroad Tycoon files. Unfortunately Railroad Tycoon is not available for sale digitally, so you'll need to buy it off of ebay and such.
The game expects original game assets in ./data/.
opam install . --deps-only
dune build# New game
dune exec rails
# Load saved game (can also be done via the menu system)
dune exec rails -- --load 0
# With options
dune exec rails -- --zoom 3 --shader crt-hyllian2 --adjust-ar| Option | Description |
|---|---|
--load N |
Load save slot 0–9 |
--zoom N |
Display zoom, multiply the original 320x200 resolution (default: 3) |
--shader NAME |
Shader from shaders/*.glsl (test, crt-hyllian, crt-hyllian2, vga-1080p, etc.) |
--adjust-ar |
Adjust aspect ratio |
src/rails_lib/— Main librarybackend/— Game logic (trains, stations, AI, economy)ui/— Menus, rendering, fonts, texturesanim/— PANI animation formatutils/— Rendering, image loading, sound
shaders/— GLSL shaders for display- technical_documentation.md — Architecture and design details
dune runtest
dune build @docMIT — see LICENSE.