Fun Fat Studios mark Fun Fat Studios
devlog Games & Craft Published · Updated · 7 min read

Deterministic Integer Simulation in Strategy Games: Byte-Identical Cross-Platform Replays

How Tchotchke Tactics avoids floating-point drift with seeded integer math so replays, Daily Challenges, and Brawl fights match across Web, PC, and mobile.

Quick Answer · Key Takeaways

Floating-point rounding differences across CPUs and browsers break strategy replays and daily ladders. Tchotchke Tactics resolves every battle using a seeded pure integer simulation, ensuring Daily Seeded Challenges, Custom Seeds, Hall of Veterans replays, and server-verified Brawl runs stay byte-identical across itch.io Web, Steam, Android, and iOS.

  • Floating-point math (IEEE 754) can diverge across x86 PCs, ARM mobile chips, and browser engines during long combat chains.
  • Tchotchke Tactics runs 100% pure integer deterministic simulation seeded per run so outcomes reproduce identically across platforms.
  • Deterministic seeds power Daily Seeded Challenges, shareable Custom Seeds, 1x/2x/4x playback, and async Brawl validation.
  • 6-character Cross-Device Save Links and optional async PvP snapshots run via anonymous Firebase auth with one-tap Delete My Data.

Picture the worst bug a cross-platform strategy game can ship: you build an unstoppable 6-unit warband on your PC, send your Custom Seed to a friend on Android, watch both rounds play out—and your Frozen frontline shatters on PC while surviving with 1 HP on mobile.

That class of bug happens constantly when auto-battlers tie combat logic to rendering frame rates or floating-point percentages (Math.sin, float damage multipliers, or engine-specific Math.random()).

To keep Tchotchke Tactics fair across itch.io browsers, Steam (Windows, Linux/Steam Deck, macOS), Android, and iOS, we built the core combat and shop engine around a seeded pure integer deterministic simulation.

Why floating-point drift breaks cross-platform strategy

Source of Non-Determinism What Breaks in Practice Integer Deterministic Fix
Floating-point rounding (float/double) Slight CPU/browser differences flip 1-HP outcomes across devices Pure integer arithmetic & fixed-point scaling only
Frame-rate-dependent animation timers Switching 1x / 2x / 4x speed or dropping frames alters hits Combat resolves completely in discrete logical ticks, then animates
Unseeded OS random() calls Daily Seeded Challenges & Custom Seeds give different shops Seeded PRNG stepped explicitly per draft & battle action
Client-only unverified PvP claims Tampered match claims corrupt async ladders Send compact run seed + action log for deterministic verification

Four player-facing features pure integer determinism unlocks

Deterministic math is not invisible plumbing—it directly powers half the modes inside Tchotchke Tactics:

  1. Daily Seeded Challenges & Custom Seeds: Two players opening the same daily seed on Linux Steam Deck and an Android tablet see the exact same commander options, shop rolls, and opponent trajectories—removing platform luck from competitive seed comparisons.
  2. Reliable 1x / 2x / 4x speed & reduced-motion toggles: Because visual speed and accessibility settings never touch simulation ticks, speeding through Campaign hunts at 4x or turning on reduced motion never changes who wins a round or drops a trigger.
  3. Tiny, tamper-resistant online run verification: When you opt into Online Brawl or Ranked Arena, the server does not need heavy video streams or full live match rooms. Storing only the run seed, mode, content version, and warband snapshots via anonymous Firebase auth lets battles replay and verify byte-identically on tiny mobile payloads.
  4. Clean Cross-Device Save Links & Hall of Veterans: Compact state saves let you resume an in-progress run mid-flight or generate a temporary 6-character Cross-Device Save Link between devices—while preserving one-tap Delete My Data inside Settings (detailed in the Tchotchke Tactics Privacy Notice).

How this connects to our studio engineering philosophy

This mirrors the local-first engineering mindset across Fun Fat Studios:

  • In Pocket Power, an on-device deterministic solver checks every one of 150 campaign levels and 400 offline daily puzzles locally—detailed in our Pocket Power solver devlog.
  • In Tchotchke Tactics, pure integer combat keeps Campaign, 3-Act Expedition, and bot Brawl 100% offline-ready with zero server dependency unless you choose online Brawl or Ranked Arena.

When to use something else

Pure integer tick simulation excels at turn-based tactics, auto-battlers, and card or grid roguelikes, where predictability, deterministic seeds, and exact replay verification matter far more than sub-pixel analog physics. If a project relies on continuous 2D rigid-body physics—like frame-perfect platforming jumps, manual hitbox dodging, and dynamic knockbacks in our 1970s stunt platformer SMASH-CUT (live on Google Play)—local frame simulation models prioritize real-time control feel and input responsiveness differently than cross-platform seed parity.

Want to test how crisp 1x/2x/4x deterministic fights feel right now? Install Tchotchke Tactics on Google Play, try the free browser demo on itch.io, or review the technical overview on the Tchotchke Tactics app page.

FAQ

Questions people ask

How do games guarantee identical replays across Web, PC, and mobile?

By eliminating floating-point math, unseeded system clocks, and frame-rate-coupled physics from combat resolution. Tchotchke Tactics runs every turn on a seeded pure integer deterministic simulation, so a combat replay on an ARM phone matches an x86 PC or itch.io WebAssembly/HTML5 browser tab byte for byte.

Why does pure integer arithmetic matter for Daily Seeded Challenges and Custom Seeds?

When players share a Custom Seed or compete in a Daily Challenge across Windows, Steam Deck (Linux), macOS, Android, and iOS, everyone expects identical shop rolls and identical combat outcomes from identical decisions. Pure integer math prevents cross-platform desyncs.

Does deterministic simulation slow down 4x combat speed or mobile battery?

No—integer operations are tiny and fast. Because battle states are calculated cleanly in pure data independent of visual frame rate, 1x, 2x, 4x playback and reduced-motion toggles never alter combat results.

What data gets sent online if I use Cross-Device Save Links or Online Brawl?

Offline Campaign, Expedition, and bot Brawl store everything locally. If you opt into online Brawl, Ranked Arena, or a temporary 6-character Link Code, anonymous Firebase auth syncs only run seeds, action logs, and warband snapshots—no email or password—and Settings includes one-tap Delete My Data.

All blog posts →