🌐 English | Español
__ ______ _
/ / ___/_ __/________ _(_)___
/ / / _ \/ / / ___/ __ `/ / __ \
/ /___/ __/ / / / / /_/ / / / / /
/_____/\___/_/ /_/ \__,_/_/_/ /_/
The Letter Train Simulator
(C) 2006-2026 Antonio Vazquez Araujo
LeTrain is a procedural train simulator that blends classic ASCII aesthetics with a modern 3D engine. Build vast rail networks across an infinite world, manage a complex economy, and master the art of logistical efficiency.
📜 Read the LeTrain Manifesto & Philosophy (Leer en Español)
"A game for engineer-children and child-engineers: no toys that play by themselves, honest trains, and pure keyboard flow."
LeTrain has evolved! While maintaining its terminal roots, it now features a high-performance 3D engine powered by LibGDX:
- Modern Perspective: Explore your rail empire in full 3D with smooth orbiting cameras.
- Classic Soul: Industrial zones and trains retain their iconic character-based charm, now rendered as physical 3D objects.
- Visual Polish: Dynamic transparency for mountains, semantic color-coded stations, and high-resolution typography.
Classic 2D terminal · 3D by day · 3D by night
The editing workflow is now first-class — in both the 2D and 3D clients:
- Record/edit mode (
R): freeze the world, build instantly, and journal every edit. - Undo / redo:
uand Ctrl+R (orundo;/redo;), for construction and state changes (forks, semaphores, signals). - Scenarios (
.ltr): export your whole network as a small text recipe and import anyone else's. The same seed rebuilds the same world, so a scenario travels as plain text. Validate one headlessly with the bundledletrain-check. - Built-in editor (
p): a tabbed Scenario / Programming / Config editor with a per-tab quick reference and error navigation. - Experiment mode (
X): snapshot the live world, try anything, then restore it.
The game now features a fully integrated financial system:
- Capital Management: Start with $0 (Zero-to-Hero challenge) and grow your wealth.
- Logistics Engine: Transport specialized cargo (GOLD, COAL, RUBY) from Producers to Consumers.
- Smart Pricing: Revenue scales with travel distance. Every meter counts!
- Construction Costs: Balancing infrastructure expansion vs. operational fuel costs.
- Configurable Gameplay: Fine-tune the entire game via the
letrain.cfgfile (it ships next to the launchers).
- Entropy Booster: Every new game starts at a unique, randomized coordinate (±10k to ±100k units) to ensure fresh exploration every time.
- Procedural Landscapes: Navigate through lakes, forests, and towering mountains generated by custom Perlin noise.
- Frustum Culling: Optimized rendering engine handles massive maps by only processing what you see.
- Java JDK 17 or higher.
- Maven.
The build system is fully automated. Simply run:
mvn clean package -DskipTestsThis generates three standalone distributions in output/:
output/LeTrain— the modern 3D experience.output/LeTrain2D— the classic, high-speed ASCII terminal view.output/letrain-check— the headless scenario (.ltr) validator.
A default letrain.cfg ships next to each launcher, so you can tweak the game without touching the code.
LeTrain(or.exe/.sh): Launches directly into 3D mode.LeTrain2D(or.exe/.sh): For those who prefer the classic terminal view.letrain-check <file.ltr>: Validates a scenario file and printsfile:line:coldiagnostics.
- Core: Java 17
- 3D Engine: LibGDX (OpenGL)
- Terminal UI: Lanterna
- Scripting: Custom ANTLR4-based rail automation language.
- Audio: Granular synthesis engine for realistic locomotive sounds.
LeTrain has been designed by Antonio Vázquez Araújo since 2006, when generative AI did not exist — first as a C++ ASCII experiment, later as Java. Every design decision, mechanic and direction is his, and until March 2026 he wrote every line of the code himself.
Since then, the project is developed with a team of AI agents (OpenCode) working under his direction: he designs, decides and reviews; the agents write, test and refactor at his instruction — the same way a compiler or a linter helps to think at a higher level. This is human-authored, AI-assisted software, not AI-generated: the goals, the architecture and the judgement are human, and every change goes through the full test suite and CI and is validated by the maintainer before merge.
The team's definitions and working rules live in the repository (AGENTS.md, .opencode/agents/), and the whole development is public in issues and pull requests.
Contributions are welcome! Bug reports, feature ideas, docs and code are all appreciated.
- 📜 Start by reading our Design Philosophy & Manifesto to understand the core soul, the 2D/3D symmetry, and the non-negotiables of LeTrain.
- Read CONTRIBUTING.md for the build/test and PR workflow.
- Open an issue for a bug or a feature request.
- For code, branch from
develop(feature/.../fix/...), keep the PR focused, and make suremvn clean testpasses.
Created by Antonio Vazquez Araujo.
Twitter/X - @avaraujo | GitHub
Because the Snap package uses strict sandboxing and bundles its own graphics/audio libraries, it may not function correctly in virtualized or remote environments:
- Windows Subsystem for Linux (WSL2 / WSLg): The Snap version will run without audio. This is due to a known AppArmor sandbox restriction that prevents the Snap from accessing Microsoft's non-standard PulseAudio socket (
/mnt/wslg/PulseServer). - Remote Desktop (XRDP / VNC):
- The 3D version will crash on startup with OpenGL errors (
Failed to create context: BadValue,swrastfallback failures). Snap's bundled Mesa graphics drivers conflict with the virtual X11 display created by XRDP. - The 2D version will not stream audio over the network. ALSA directly accesses the host's physical sound card instead of routing through XRDP's virtual PulseAudio sinks.
- The 3D version will crash on startup with OpenGL errors (
Solution: If you are playing over a Remote Desktop connection on Linux, compile the game from source or use the .sh launcher from the Linux .zip release, which perfectly adapts to the host's XRDP drivers. If you are playing on Windows, download the native LeTrain-Windows.zip from the Releases page for perfect 3D acceleration and sound.





