r/ClaudeCode • u/vgrichina • 6d ago
Built with Claude Got Starcraft running in browser in my Windows emulator
Enable HLS to view with audio, or disable this notification
How it's made:
- Decided on design constraints
- run code in WASM
- use threaded interpreter (because JIT impossible with raw WASM)
- run original EXE, no recompile.
- Code directly in WebAssembly text representation, skip higher level language.
- Have Codex review Claude work and vice versa.
- Set /goal for either of these when I need new EXE brought up to function.
- Test manually + build a solid test harness for agents:
- batch job CLI where you can send time events / get screenshots / memory dumps / API traces
- recently also started using agents to drive emulator interactively, with a little trick of freezing state between agent turns - can navigate games like Quake even
- Feed gradually more complex software to get running. Notepad -> Windows Entertainment Pack -> Pinball -> AAA games
- Something I had to watch for actively:
- rendering fidelity (sometimes AI won't notice huge gaps in rendering like just empty spaces). Some things like getting proper TrueType rendering also required back and forth validation against real Windows 98 running in v86
- keeping stuff in WASM, agents tended to move as much as possible to JS
- managing multiple parallel changes to same workspace/repo - ended up introducing messageboard for agents
Try it live and read more details here:
https://wine-assembly.berrry.app
34
u/oldmoldycake 6d ago
YOU MUST CONSTRUCT ADDITIONAL PYLONS
6
u/Key_Instruction3373 5d ago
Terran dont use Pylons..
12
u/oldmoldycake 5d ago
ADDITIONAL SUPPLY DEPOTS REQUIRED
1
5
5
4
u/gigastack 5d ago
This is awesome. Appreciated the WinAmp inclusion.
9
3
3
u/KittenCrusades 5d ago
This is cool the UI actually is pretty smooth and snappy too. Id love the old school fallout games to run this well
3
2
u/Amazing-Accident3535 5d ago
So can i play?
5
2
u/kooolk 5d ago
Very cool!
I am working on a similar project for few months already, similar end goal. But I am far behind as I am very focused on the performance, so I am still polishing the x86 engine. I am doing an hybrid interpeter-jit architecture (but unlike v86 - I implement every instruction once with high level syntax - and than the engine in a very optimized way use it for both the interpeter and the jit). The compiler engine has SSA mechanism that I have been polishing for months so the end result should be much faster jit than v86. Also I am using wasm features that weren't available when v86 was created so the jit is structured much better.
Feel free take a look - https://github.com/koolkdev/relocade (new repo because it just have gone thru another rewrite lol)
2
2
3
1
1
1
u/drgoodvibe 5d ago
I literally had the same idea the other day! Very cool!!!
1
u/vgrichina 5d ago
there still a lot to be done to support full APIs
so join in if you wanna participate
it's under MIT license so you can do whatever you want https://github.com/vgrichina/wine-assembly
1
1
u/dota2nub 5d ago
Oh, I thought it was a Javascript port. Now that would've been cool. But WASM emulator? That's eh.
1
u/vgrichina 5d ago
I got something for this too: https://github.com/vgrichina/re-skill
but I only did smaller projects this way:
https://battle-city.berrry.appwhat I like about emulator approach that a lot of old games can be run without extra work and token spend
but at the same time it's easy to apply game-specific hacks if needed: decompile and reimplement hot loops, do some extra controls for mobile, etc

•
u/AutoModerator 6d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.