Skip to content

bluddy/rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,905 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails

An OCaml remake of Railroad Tycoon (1990). Build railroads, manage trains, compete with AI rivals, and grow your empire across historical regions.

OCaml License: MIT

See FEATURES.md for a full list of features.

Prerequisites

  • 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.

Data Files

The game expects original game assets in ./data/.

Installation

opam install . --deps-only
dune build

Running

# 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

Command-line options

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

Project structure

  • src/rails_lib/ — Main library
    • backend/ — Game logic (trains, stations, AI, economy)
    • ui/ — Menus, rendering, fonts, textures
    • anim/ — PANI animation format
    • utils/ — Rendering, image loading, sound
  • shaders/ — GLSL shaders for display
  • technical_documentation.md — Architecture and design details

Development

dune runtest
dune build @doc

License

MIT — see LICENSE.

About

Remake of Railroad Tycoon in OCaml

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •