LogoPolyTowerz
Cover
General
Sep 1, 2026

Devlog 7: two phones, one game, and everything that reads the outside world

I spent the last two and a half weeks teaching PolyTowerz to run the same match on two devices at once. Not by sending positions back and forth, which is what you would guess. By making both devices compute an identical game from the same starting point, and sending only what the players actually pressed.

That only works if the simulation is a closed room. Same fixed step on both sides, thirty times a second. Integer math instead of floating point, because two chips can round the same number differently. One seeded random generator with named streams instead of the one the operating system hands you, because that one seeds itself and never gives you the same run twice. And a fixed order for everything, because iterating a set is not iteration, it is a coin flip with extra steps.

Then you go hunting for every value inside that room that came from outside it, and that is the real work. I found the board size, which came from the screen. I found timers running on the wall clock. And I found the one I did not expect at all: the player's own save file. Meta upgrades, unlocked towers, the current cycle, all of them leaking into a shared simulation from a place that is different on every account. On one device that is not a bug. On two, it is the whole problem.

The method that actually finds these, and it is not the obvious one: do not list what the player can do. List every write into your game state and ask where that number came from. Half of mine came from somewhere I never chose.

Next devlog: what the game does when the two devices disagree anyway.

Discussion