Show HN: I spent 3 years reverse-engineering a 40 yo stock market sim from 1986

52 pointsposted 2 days ago
by benstopics

22 Comments

ozozozd

an hour ago

Awesome story! Well-written also.

You are the engineer we all aspired to be. Though, you really are the chosen one.

Wish you the best!

JohnHammersley

2 days ago

This is such a well written story, and congratulations Ben, it sounds like it's been a lot of hard but ultimately successful work!

I know you'll deservedly get a lot of credit for all your work in remastering the game, but you should also get credit for how you've woven this narrative together, it's a lovely read. Thank you for taking the time to write it up, and good luck with the Steam release, and whatever project you take on next! :)

benstopics

a day ago

Thank you sir and I'm glad you enjoyed the story! I hope it's successful but we will see.

jjmarr

2 days ago

Good job! When can I buy it?

I am sold on the game and wishlisted it but lack of release date saddens me.

I love spreadsheet games like Terra Invicta/Paradox/Simutrans and this seems like a terrific example of one.

benstopics

2 days ago

If I can't get a response from a publisher here soon, I will be setting an Early Access release date of 1-2 months from now to give me some time to build up more wishlists before I pull the trigger.

saaaaaam

2 days ago

This is very well written. I have fairly low interest in video games and rarely read gaming content, but read this all the way through. That’s an achievement in itself!

replwoacause

2 days ago

I enjoyed the read. How did you tap into the legacy Power Basic engine? Was there a FFI or some kind of bridge you could hook into? And what languages were you using?

benstopics

2 days ago

I built an FFI via event dispatching and shared memory pointers/matching structs. Imported the C++ UI layer as a DLL via Win32 LoadLibrary. The PB shares a big array for storing global pointers allowing them to read/write each other's memory. The C++ has an event queue and has DLL functions the PB can call to peek/pop the next event. It actually isn't that complicated, just took me forever to come up with the idea.

As for languages, PB, C++, and JavaScript (Electron/Preact). I chose a no-build UI framework so that it could be modded by players without installing any build tools, just edit the text files in the game folder, and it has been a very good decision.

replwoacause

2 days ago

That’s awesome. What a clever approach!

cameron_b

2 days ago

Cheers for this!

Thank you for sharing your story.

nacozarina

2 days ago

AI can’t do impossible things yet, but we still can.

zahlman

a day ago

... You got the source code, and it was 115 kloc of BASIC, but several other individuals and organizations failed to "reverse-engineer" it?

benstopics

a day ago

Others attempted to build from scratch or port it without the original developer's involvement. I worked directly with Michael and built a bridge layer into his existing codebase rather than rewriting it.

zahlman

13 hours ago

Ah, I understand now.

benstopics

a day ago

I'm sorry what is the question?

sevenseacat

a day ago

oh this is an absolutely fascinating story!

sevenseacat

6 hours ago

I forgot to ask, do you have links to any of the Reddit threads? They’d be a fun read!