HN user

benstopics

393 karma
Posts3
Comments67
View on HN

In my last post about Wall Street Raider, I was asked a lot about why I hadn't tried to use AI to port the game to another programming language. The truth is that the original creator, Michael Jenkins, is still helping with the project and he only knows and has worked with PowerBasic for the past 40 years. So it didn't make sense to change the language.

But I was running into issues with my PB-C++-ElectronJS architecture where my FFI event system was causing race conditions and freezing the game, especially with navigation. I also always had dreams of Wall Street Raider on 64-bit cross-platform, but I always thought this would be a challenge... until I learned Claude Code and proper AI orchestration strategies.

You see, in 2012 the creator of PowerBasic Bob Zale passed away and his wife maintained it until selling it to Drake Software in 2017. Drake promised 64-bit and new features. Instead, they sold to Cinven, who shut down the forums and the website, abandoning the loyal developers who still had to maintain legacy systems now with no place to ask for help or look up example code.

Well I read this article recently about how they made a C compiler from scratch using Claude Code and I thought that was cool and I said I want to do that with Powerbasic. But one thing that you need of course is test harness, which of course there was none for PowerBasic. So I orchestrated Claude to build the compiler and also an interpreter to create TDD feedback loop. CC ran for many hours using my many long-winded markdown files as a north star, and eventually came up with a compiler... that didn't work right.

But now I was able to set up a test harness for Wall Street Raider. You see, the PBWin.exe PowerBasic compiler program has no CLI capabilities. Every time you compile it will pop up a Win32 message box. It is supposed to have a quiet switch, but it don't work. So that is why I had to make my own compiler. Now with my compiler and interpreter in hand, I was able to allow Claude to iterate on the compiler itself and Wall Street Raider code, fixing bugs in both codebases at same time. It ran for many hours and eventually smoke tested and fixed the compiler issues, and I was able to write Discord bot to download threads from the bug-reports channel and sic Claude on them, enforcing strict unit/integration/e2e Selenium testing practices in my many CLAUDE.md files scattered throughout project.

If you would like to check out my other stuff you may visit http://benjaminward.com/ thank you for reading.

No, I had considered Microprose, Kitfox, Hooded Horse. I reached out to some but I should have been reaching out a year or two ago. I didn't think I would need one, I still don't think I NEED one... But would have been nice. But I just set a release date as a kick in the butt to get this thing shipped, which pretty much burns the boats of signing a publisher. I think it is better this way though. If it fails it fails. But Michael and I get to keep whatever proceeds are made and we get to do things our way at our pace. But there's other games such as Speculator that also need revamped. I kinda want Hackjack Games to be a remastering game studio, a land of misfit games of sorts. Maybe I'll be more open to having a publisher in the future.

Sorry for LLM flavor in the article. It's valid criticism and I will rewrite it when I get the chance. I just wanted to share the story and I didn't have time to write it completely from scratch, plus I'm not that great of a writer. I thought filtering my thoughts through LLM editor would eliminate the distraction of my poor writing abilities, which for most people I think it worked. For others, it created another distraction, ragebait in fact, which was not my iuntention. So between working 80 hours a week at the prompt factory and raising two kids I will find some time to de-ragebaitify the article, although it seems to have unintentionally propelled it to the front page, for which I am admittedly thankful for.

It is a cult and you should run while you still can. I would say to get to the point I'm so now I had to understand 40-50% of it. Let's face it, I work as a software developer and I don't remember half of the code in the project, maybe more, and I wrote it all! And this is way more complex than a business app. The reason I had to understand a lot is hard to explain but I will try... Basically a function might be called "FrontBuy". In this function contains all the math and all the decision tree logic and workflow for every possible situation to buy a stock. So now you say, let's replace all the Win32 dialogs with Electron front end. So what I did was I maintain essentially a high level GUI state manager in the Power Basic which controls the Electron app, using the C++ DLL as a FFI. That being said, you had to have some modicum of understanding of every function, maybe not all the math, but at the very least the workflow and structure of the PB code so that you don't break anything. And oh boy, did I break everything, many many times, to the chagrin of my beta testers.

Most people enjoyed it. It is the same as the game. Most people like the remaster direction, a subgroup vehemently dislike specific design decisions and they don't always overlap. The more people that learn about the game the volume of feedback goes up and so does the volume of negative feedback. Just telling you feel my perspective, take it when a grain of salt. So you learn to take negatively, especially emotionally charged negativity, with a grain of salt. And you have a compulsion to ignore it. But I'm a very self aware person and I try to see the other side. I may not understand it, I may not agree, but I try to listen and understand. But to say I blanket missing the criticism is a flippant remark in my opinion. I'm not an idiot... It's easy to tell AI was involved and it turned many people off. But they also crap on the stuff I wrote from scratch. So is it AI or just that I suck at writing? It was just to share the story. I reread it multiple times and I enjoy the story even knowing it like the back is my hand. I lived it. I write stuff for me. I remastered the game for me and to share with like minded people. Honestly, the article being anti-AI rage bait is a low pass filter for people who could have said anything, and instead, they chose to NIT the article. But I try to be open minded and do better, but I am only human, not an AI, I have emotions and opinions. I'm sure most of those opinions are flawed. But I'm not mad at any of the criticism and I appreciate it.

Still using PB compiler. Tried to reach out to the company that bought the right to it and killed it because I wanted to extract the parser from it and make it target LLVM to be cross platform, but after a year of trying to contact them I gave up. I will have to build my own compiler at some point with Claude Code which won't be too difficult as WSR only uses a subset of PowerBasic so. When I first tried to build a compiler two years ago I didn't understand all the gotchas in PowerBasic as I do now. But right now I'm just focused on testing the game, fixing bugs, and getting it to Early Access so many I can get up to minimum wage in sales with the time I have invested in the project!

The code is not a mystery anymore! I'm going to rewrite the article from the feedback I received here. Because I do understand the code now, but it still has been been rewritten even though I could now. This is so Micheal can still add his ideas to the game. Not because I can't work on the code myself, I can. I can code in BASIC now, Micheal can ONLY code in BASIC.

I did exactly that originally. But here is the reality. Michael only knows BASIC and he has felt the agency to continue patching and working on the code, adding features even, since it is still BASIC. When others tried to port it to C++ be felt like he had no agency and wasn't motivated to help. So while he's still motivated to work on it, it needs to stay in a language he can work with. And thanks for wishlisting!!!

I honestly get it. I wouldn't have made that comment but I get why it was made. It tells me I need to go back and put some more effort into it and clean it up. You know, in-between working 80 hours a week at the prompt factory and working on the actual game... Without Claude there would be no story to read. I pay Anthropic $200/mo and Claude is a robot. I don't think anyone shed a tear that I didn't put "coauthored by Claude" at the bottom.

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.

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.

I continue to advocate for the fact that Michael's code is not bad at all. There are some anti patterns in it for sure, what engineer hasn't fallen into those traps. The fact is Michael is an infinitely better programmer than many of the senior developers I've worked work in my career. I truly sing high praise to his software development capabilities, not just coding itself but building the product, delivering results, and getting it out the door, especially a simulator like this with no reference points, no formal training, no help? Sure it took him 40 years and it's in BASIC and uses gosub everywhere. But the damn thing works and for anyone who took the time to learn the language and structure as I did, you will see that it is actually very enjoyable codebase to work with.

The feat was done before Claude Agent which is why it was so challenging. Although I admit I am a heavy user now circa the past two weeks. We shall not discuss my Claude Code experience lest I have another mental breakdown at work and my employer has to send me home again. Let me put it this way. I have set up Claude dangerously skip permissions with Agent Teams, Fast Mode, and our automated e2e test suite I designed where it can see screenshots of every step and browser and API console logs. It is entirely hands off software development. I have had to think long and hard about my identity as a software engineer. So forgive me if for my passion project I don't let Claude do everything, lest I remember the decades I spent reading those textbooks on my shelf, and the fear that I will forget it all.