Skip to content
ContractorKeith
Go back

pioneer trail went from terminal to browser

3 min read

Pioneer Trail started with a wagon in a terminal. now the browser opens on a road west, with mountains ahead and enough room to see what i am getting the party into.

still my responsibility to buy food.

Pioneer Trail's browser welcome screen with an illustrated wagon journey, scenic and first-person choices, and a begin-your-journey button

that is the browser app’s welcome screen. the terminal game has a released v0.2.0, and the browser edition is public source you can run locally. browser hosting is pending as of september 8.

the rules stayed in Rust

the browser edition carries the original simulation and content from a pinned terminal-game commit. a committed hash manifest checks those files against that baseline.

Rust still owns the supplies, prices, weather, and seeded outcomes. the web bridge compiles the engine to WebAssembly, while React handles the screens and Three.js adds optional atmosphere.

so moving a cloud across the scene does not consume the random number that decides what happens at the next river. presentation and game rules have separate jobs.

that separation let me change the whole way the journey looks without quietly rebalancing it. the browser still has to pay for what the player buys, honor the wagon’s carrying limits, and resolve the original hunting and rafting controls.

saves are where the pretty part stops helping

a save includes the exact Rust random-number state. the frontend stores the engine’s JSON as an opaque string so JavaScript does not round away the 64-bit integers inside it.

and the tests run the actual WebAssembly artifact shipped to the browser. they cover repeatability and save/load, rejected commands that leave state alone, and every legal trail/year combination through real game commands.

the acceptance record also owns a less flattering detail: production-only checks missed a development-server bug. concurrent cold starts initialized the WebAssembly module more than once, mixing object pointers between instances.

buying supplies exposed it.

the fix shares one initialization promise. a retained regression starts eight cold engines and checks that each can configure and buy independently. the development server now has its own checks alongside the production build.

make the journey usable

the browser has keyboard and touch controls, optional sound, and reduced-motion settings. it stays playable without WebGL; reduced motion uses still scenes and turn-based hunting and rafting.

there are limits. reloading during a hunt or raft restarts that activity from its original seed. browser storage keeps the latest active journey, so export a save before replacing it with a new one.

for the released terminal game, macOS and Linux users can start with:

brew install contractorkeith/tap/pioneer-trail
pioneer-trail

release downloads also include Windows. for the browser edition, use Node 22.12 or newer:

git clone https://github.com/ContractorKeith/pioneer-trail-web.git
cd pioneer-trail-web
npm ci
npm run dev

open http://localhost:5173. the compiled browser engine is included, so Rust is not required just to play. a hosted play button will follow when deployment is ready.

for a forgiving first trip, try Banker, March, Oregon, 1848. i would still read the supply advice before leaving town.


Share this post on:

Previous Post
slowbooks after the first mac release
Next Post
how i run the ai crew