How Shareable Game Links Work
Baseball Sim Engine game links are designed so a simulated game can be shared and reopened without depending on the original browser session.
The key is that Baseball Sim Engine simulations are deterministic.
Given the same game setup, simulation version, and random seed, the engine can reproduce the same sequence of events.
What Is In a Game Link?
A playable game URL includes the information needed to identify and reproduce the simulation:
- Simulation version
- Random seed
- Input hash
- MLB game ID and date
- Any customized setup
- Game start time
The seed determines the random sequence. The input hash verifies that the starting game data matches the simulation being requested.
Together, those values give the game a stable identity.
Rebuilding a Shared Game
When someone opens a game link, the site first checks for a local copy of that game.
If one exists, it is loaded.
If not, the site reloads the MLB matchup, applies the setup from the URL, and starts the game again using the same simulation identity.
Because the inputs and seed are the same, the reconstructed game follows the same simulation.
The start time gives different browsers a shared clock, so someone opening the link later can catch up to the same point in the simulated game instead of starting over from the first pitch.
Everything Stays Local
Playable games are not stored on the Baseball Sim Engine server.
Game state, playback state, and recent-game data are stored locally in the browser.
The server does not keep a central copy of every simulated game. The URL carries enough information to reproduce the game, and each browser keeps its own local state.
That is also why direct box score links can work without the game having been previously opened in that browser: the site can reconstruct the same simulation from the link itself.
The result is a shareable game without needing server-side game storage.