Reverse Engineering SimTower
112 points
2 days ago
| 9 comments
| phulin.me
| HN
This is the story of building https://towers.world, a ~perfect, tick-for-tick reproduction of 1993 game SimTower.

I 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

johnfn
1 minute ago
[-]
First of all, super cool. I have a soft spot for SimTower as well. :)

> 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!

[1]: https://github.com/zeldaret/oot

reply
MrPowerGamerBR
8 minutes ago
[-]
Just a fyi for anyone that doesn't know: A few years back Don Hopkins got the permission from Yoot Saito to open source Yoot Tower, SimTower's sequel: https://github.com/YootTowerManagement/YootTower

...however I don't think that the source was ever published anywhere, considering that the repository still doesn't have the source code yet. ("Please check out the YootTower repo, where I'll publish the source code once it's cleaned up, reviewed and approved by Yoot, and relicensed with the MIT licensed.")

reply
jlev1
3 hours ago
[-]
Wow!

There was a little-known sequel to SimTower called Yoot Tower (named after Yoot Saito). It was a commercial flop, but I played it in the 2000s and again in the 2010s and very much enjoyed it! It had a lot of added customizability (more choices of restaurants and shops, for one thing). I would love to see that game recreated.

reply
zamadatix
1 hour ago
[-]
Project Highrise is also worth checking out. It's a 2016 re-imagination of the same type of game. I'm not sure I enjoyed it as much as I did Yoot Tower... but I'm also not sure if that's just because Yoot Tower was a few decades younger back when I played :).
reply
pixelcort
3 hours ago
[-]
One of the maps in Yoot Tower is Kegon Falls. When I moved to Japan I found out it was a real place. Just took another day trip up there last month. Of course IRL it’s just an elevator but the view each season is amazing.
reply
thispbowden
3 hours ago
[-]
Love Yoot Tower! Can we clone it next?
reply
patrickhulin
3 hours ago
[-]
yes! I've been thinking about how to do it, but it will take some work!
reply
efromvt
1 hour ago
[-]
Can you still build a garage in the bottom corner to get more starting money??
reply
ryeguy_24
4 hours ago
[-]
Oh my gosh, this really brought me back. Haven't played that game in 30 years. What a great use of AI. Thanks for the trip down memory lane.
reply
findalex
4 hours ago
[-]
I loved this game so much. Can't wait to see Santa.
reply
taejavu
5 hours ago
[-]
Very cool! I used to play this game for a few minutes every morning at a friends place before school. With the clone being open source, would you be open to QoL patches? I don’t have anything specific in mind, just curious how close to the original you want to stay.
reply
patrickhulin
3 hours ago
[-]
Patches are welcome, especially for UI stuff - the simulation I'd like to keep matching exactly. I have one deviation already: the floors are 0-indexed and lobbies are on 15, 30, ..., which would be 16, 31, ... in the original game.
reply
schnebbau
4 hours ago
[-]
Amazing, loved this game when I was younger. I would keep restarting every time I thought of a more effective layout.

I don't think I ever made it to the cathedral though.

reply
SuperNinKenDo
2 hours ago
[-]
God I loved this game back in the day. Thank you!

EDIT: Nevermind... [sigh]

reply
I_am_uncreative
1 hour ago
[-]
What's with the edit?
reply
cozzyd
1 hour ago
[-]
Judging from user's posting history, they're not the biggest fans of llms

This is kind of the perfect use case though -- it's a game who cares if it's right or not.

reply
DonaldPShimoda
19 minutes ago
[-]
Some people also have moral issues with LLMs. If the poster is such a person, the accuracy metric may simply be irrelevant.
reply