The Oregon Trail is a text-based educational game originally developed in 1971 by Don Rawitsch, Bill Heinemann, and Paul Dillenberger in HP Time-Shared BASIC. A revised version was published in the May/June 1978 issue of Creative Computing magazine.
This project is based on OREGON 77, an ANSI FORTRAN 77 port of the 1978 version created by Philipp Engel and published in 2022 under the ISC license.
The goal is to explore Fortran-to-WebAssembly compilation using modern Fortran compilers such as LFortran and LLVM Flang. The game is currently built with LFortran and Emscripten and runs entirely in the browser.
Tested with gfortran, lfortran, and flang.
# gfortran
gfortran src/oregon.f src/oregon_time.f -o oregon
# lfortran
lfortran --fixed-form --implicit-interface --implicit-typing src/oregon.f src/oregon_time.f -o oregon
# flang
flang src/oregon.f src/oregon_time.f -o oregonRun the game with ./oregon.
Prebuilt web/oregon.js and web/oregon.wasm are committed, so no toolchain is needed to run the web version. CI rebuilds them for each deployment.
To rebuild them locally, install LFortran and Emscripten, make sure both are on your PATH, and run:
npm run build:wasmWeb builds use LFortran 0.65.0. LFortran 0.66.0 currently breaks sequential stdin reads on WebAssembly.
To run locally:
npm run devThen open http://localhost:8080.
Every push to main is checked and deployed to GitHub Pages automatically via GitHub Actions.
Run the regression suite, browser smoke tests, and typecheck with:
npm run verifyThis repository makes no copyright claim on the existing game or source code. All original additions made for this project are licensed under the ISC License.
