Remix.run Logo
benstopics 4 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.

nwellinghoff 3 hours ago | parent | next [-]

Indeed very clever. I wonder if you framed this problem up with claude how it would “guide” you to solve this problem. Would be an interesting match up of ai vs human. Love the story!

benstopics 36 minutes ago | parent [-]

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.

replwoacause 4 days ago | parent | prev [-]

That’s awesome. What a clever approach!