Lurker News
Hello my name is Ben Ward for the past 3 years I have been remastering the financial game Wall Street Raider created by Michael Jenkins originally on DOS in 1986.

It has been a rough journey but I finally see the light at the end of the tunnel. I just recently redid the website and thought maybe the full story of how this project came to be would interest you all. Thank you for reading.

Comments (240) 65 threads

Earlier comments
thomassmith651 reply#
This is a wonderful project, and the post is a wonderful read!

Are there any plans to break out portions of the Basic engine to a modern language? It's frustrating that the heart of the game remains inscrutable. Surely Ward is tempted?

benstopics1 reply#
I understand the code now after working with it for so long. I even improved the options code to use Black-Scholes so I have a few tricks up my own sleeve. The reality is, now that I have mastered the codebase structure and BASIC... Why would I port it? I have plans on how to keep it in BASIC and make it cross platform e.g. web based.
thomassmith65#
I don't know the project, obviously, so any opinions I could add on porting wouldn't be so meaningful.

It's a lovely achievement you have pulled off, and Jenkins must be tickled.

vessenes#
Ben, thanks for working on this! I instantly flashed back to the mid to late 80s when I saw the screenshots; I’m certain I played this game as a pre-teen. Just let us know how we can buy it.
pillefitz3 replies#
This is amazing! Having no knowledge of Basic, a.) what makes the rewrite "impossible"? b.) how do coding agents perform on the codebase? It might make for a neat benchmark similar to ARC
thomassmith652 replies#
I gather the version of Basic is not Object-Oriented.

So the program most likely is flat: a bunch of global variables (and possibly memory addresses), and instructions ordered by line number, rather than functions or methods.

flomo1 reply#
Apparently PowerBasic was the successor to Borland TurboBasic and complied to a native executable. So this wasn't an interpreted 'line number' Basic like our kiddie computers. It also probably had the Borland Windows GUI stuff.

(However it wouldn't surprise me if older 'line number' programs still mostly worked. iirc VB6 also supported this.)

benstopics2 replies#
No line numbers but you can use numbers as goto labels. It uses Dynamic Dialog Tools which is a Win32 wrapper which most of my "job" is gutting out those calls, implementing Single Responsibility in functions and plugging in Electron UI. And trying not to break EVERYTHING...

Continue this thread — 2 replies

benstopics#
Functions yes, and actually PowerBasic does have OOP. Michael didn't use it but it's there.

No line numbers except for goto labels, but gosub is the challenge for transpilation.

lelanthran1 reply#
The BASIC from that time was pretty limited, IIRC.

No real functions, only `gosub` and `goto` so everything is a global variable.
I think even assembler for x86 is easier to unravel.

benstopics#
PowerBasic does have functions. Go there is thousands of goto and gosub which would need to be unraveled which there isn't really a 1:1 for gosub at least in say C++. Or EXIT IF... The bane of my existence...
benstopics1 reply#
a) At the time it was impossible for me. I think I could actually do it now. But now that I can read the BASIC... what would be the point? If I wanted it cross platform, I will build a virtual machine. b) Claude Code has performed exceptionally well. I haven't tried the most recent Codex update. But I don't see the point in spending thousands of dollars on tokens to rewrite it when it works perfectly fine. It would be much cheaper to have Claude Agent build the virtual machine. That's just my opinion. If it ain't broke don't fix it I guess. I do want to bring it to mobile though, whether that's a phone app or responsive website.
thomassmith651 reply#
Can the original code simulate the stock market as it operates today? The main reason I would want to convert the engine to a modern language is to make it easy enough to understand that I could add features.
benstopics2 replies#
I think it will definitely need refactored in order to do an overhaul like that.

But the best way I can answer your question. WSR does not claim to simulate real markets. It probably leans too much into fundamentals for our time, at least for the blue chip stocks in the game. What is actually is is a M&A and tax evasion simulator on top of a financial market sandbox to create tax implications to be avoided.

Continue this thread — 2 replies

TacticalCoder#
I now work on the "real thing" and that is fascinating to read. I didn't know about Wall Street Raider. Anyone who's ever tried a "paper trading account" on a real brokerage app knows how poor these are: it's near impossible to simulate the real thing without implementing the real thing.

One thing I really don't understand at all is how it's possible to do so much in only 115 kloc. 115 000 lines of code is next to nothing for such a project: there are solo projects with more lines of code than that. It simply ain't that much: how can you simulate mergers, financial derivatives, etc. all in so little lines of code?
It is, simply put, a little codebase. Which makes it all the more impressive.
I mean: it's both a lot (for the time) and nothing for what it does. I'm sure brokerage apps have 10x that amount of code and they only deal with the client side of things. I understand the game doesn't reproduce everything but it still looks incredibly impressive to me to pack so much in so little lines of code. Doubly so if this is sufficient to teach people the basics of finance and trading.
Now something else: this reminds me a bit of a game by the company FTL (created in 1982), who created Dungeon Master. Before that game FTL did "Sundog: The Frozen Legacy". In Sundog they implemented an interpreter for a programming language so that they could write their game (otherwise the default languages available were too limitating) and... You could buy/sell stuff across planets, that you'd transport in your spaceship. They had started writing a complex trading engine for the game: the player was supposed to be able to place buy/sell orders and whatnots but eventually they gave up that part of the game. FWIW when I was playing Sundog The Frozen Legacy I was feeling I was Han Solo in my spaceship: great memories.
Wishing the best to Ben Ward and sending big thanks to Jenkins. These kind of entries are why I'm on HN.

Load more comments