> I didn’t want to do a function-by-function port. First, APIs may be copyrightable - and copying a binary that closely might implicate copyright more than an approach closer to clean-room design. But it was clear that I needed some level of feedback from the ground-truth binary in order to provide a hill for the LLM to climb on the reimplementation.
Interesting, but isn't this what, say, the Ocarina of Time reverse engineer port does[1]? I imagine the fact that this hasn't been served a takedown notice from Nintendo is a proof that it's defensible? Or at least that there's precedent, ha.
Anyway, this is really cool. I genuinely think the only thing that's missing for me to waste an afternoon here is the sound effects!
Reverse Engineering SimTower
https://phulin.me/blog/simtowerI spent weeks reverse-engineering the original EXE and writing up a detailed spec of how the simulation actually works under the hood — population flow, elevator AI, the whole star-rating system. The specs are all on GitHub if you want to read them: https://github.com/phulin/tower-together/tree/main/specs
It's also collaborative. Multiple players can connect to the same tower, the simulation keeps running as long as anyone's connected, and build actions sync across clients in real time.
Because I rebuilt the UI, I could add features like shift-click to build grids of rooms - instead of painstakingly clicking to build rows of offices and hotels, shift-click allows a 10-floor grid to be built all at once.
The game runs on Cloudflare Durable Objects, one of my favorite web primitives.
Everything is open source: https://github.com/phulin/tower-together