logoalt Hacker News

Reverse Engineering SimTower

213 pointsby patrickhulinlast Tuesday at 5:41 PM52 commentsview on 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


Comments

johnfntoday at 1:23 AM

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

show 1 reply
jlev1yesterday at 9:43 PM

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.

show 3 replies
dsltoday at 7:12 AM

It is missing the most important function.

If the first tile you build is a lobby in the bottom left corner, it is supposed to double your starting money. :)

show 2 replies
swyxtoday at 3:40 AM

> This project used an absolutely ridiculous number of tokens. I had to upgrade to the Claude Code $200/month plan and carefully avoid usage in the 8 AM-2 PM 2x peak window.

that doesnt sound too terrible to be honest. TIL that 8am-2pm is 2x usage.

grogenauttoday at 3:21 AM

I played when I was a kid. I figured out you could just build condos like crazy and make money pause build more, and repeat, get tons of money, build all the way up. But I couldn't figure out how to get people to the top level for that achievement.

I'm gonna Google that and see what I got wrong

show 1 reply
qingcharlestoday at 3:15 AM

Can you talk about how you actually disassembled the EXE and reverse-engineered it?

dwedgetoday at 7:11 AM

I want someone to do this with SimCopter. I loved that game but I don't think it was very popular

show 1 reply
MrPowerGamerBRtoday at 1:15 AM

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.")

show 2 replies
nealstoday at 10:20 AM

Played it for a few cycles. I feel like the elevators are a bit bugged, they keep idle in the lobby why people are waiting to get on (and turning red)

cortesofttoday at 1:25 AM

I love SimTower, and one of the reasons I keep my SheepShaver environment working is so I can still play it on Mac OS 9.

I’ll have to check this out!

show 1 reply
LostMyLogintoday at 4:23 AM

> First, the AI makes premature conclusions about subsystems, records them, and then struggles to figure out when to abandon its earlier guesses.

This perfectly describes what feels off to me about Opus 4.7 (unsure if that’s what you are using). It seems to go down an incorrect path, I correct it, but it still references things from it. Trying to direct it back becomes a mess.

Has anyone experience this as well or am I going crazy? Doesn’t happen with 4.6 for me.

show 1 reply
rho4today at 7:17 AM

You can only serve the 3 closest levels to a lobby with stairs or escalators.

Dwedittoday at 1:45 AM

I remember that SimTower (Windows 3.1 version) would briefly draw the dialog boxes in Japanese, then immediately redraw it in English. This was on a computer without any Japanese fonts.

ok_dadtoday at 5:24 AM

I love you this was the best sim game when I was a kid and now I’ll spend my weekend on your site!

efromvtyesterday at 11:35 PM

Can you still build a garage in the bottom corner to get more starting money??

findalexyesterday at 8:29 PM

I loved this game so much. Can't wait to see Santa.

show 1 reply
taejavuyesterday at 8:13 PM

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.

show 1 reply
ChickeNEStoday at 4:42 AM

Heh, I have four different games I am currently experimenting with, luckily I skipped this one as I am still expecting the original/Yoot source will be published (hopefully DonHopkins sees this and it nudges him to get it uploaded!).

show 1 reply
schnebbauyesterday at 8:30 PM

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.

ryeguy_24yesterday at 8:50 PM

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.

EdwardDiegotoday at 2:50 AM

I sunk ages into "the world's most brutal elevator simulator" - how does the game model elevator demand? I always wondered if it was some sort of Poisson distribution.

SuperNinKenDoyesterday at 11:20 PM

God I loved this game back in the day. Thank you!

EDIT: Nevermind... [sigh]

show 1 reply
mfgadv99today at 11:10 AM

[dead]

immanuwelltoday at 6:08 AM

[flagged]

yesitcanyesterday at 10:32 PM

[flagged]

show 1 reply