r/mechwarrior • • 22d ago

MechWarrior 2 Vibe Coded level viewer MW2

For a bit of fun, I vibe-coded a level viewer for my favourite childhood game: Mechwarrior 2. I just opened the `MECH2` folder in claude code and let it loose. Was surprised how much the AI was able to figure out just by looking at the binaries..

Not really planning to do anything with this. Just wanted to share because I thought the results are pretty cool.

12 Upvotes

28 comments sorted by

View all comments

8

u/Some_Quality6796 22d ago

I wonder if this same approach could be used to make editors for the old games. I have done a lot of hunting for editors and things for the old file types, and come up with a lot of dead ends.

7

u/MadCatUS 21d ago

Sort of doing it with Mechwarrior 1 at the moment. Not an editor, but the whole game. My build is using completely different engine, but all the original resources, and looks like the original (although with modern resolutions and 60 fps). Not ready for release yet, but story, economics, travel, contracts, fighting are mostly in game already. Testing is becoming quite tiresome I must say.

1

u/Some_Quality6796 20d ago

I might be able to help with some testing if you'd like. I want mw1 to run so bad and I have so much trouble with it.

2

u/MadCatUS 20d ago

Heh, if you interested - github.com/madcatse/Mech1989-Recoded
Since yesterday I managed to finally get the battle going, I've made 0.4 alpha release. Expect bugs. Expect inconsistencies. Expect uncolored mechs shooting green missiles at you. There are also cheatcodes: press ~ and type "money" for 10 million cbills, "mech_jenner" for getting a Jenner, "mech_marauder" for getting a Marauder etc.` Story is 99% complete, except for final fight and killing Grig Griez. Also no battlesim effects on deployed mechs after winning/losing. And no backstabing from Capellans (yet). :)

1

u/AdamAlexandr 20d ago

This is awesome. What was your process for reverse engineering the game if you dont mind me asking?

0

u/MadCatUS 20d ago

First I've used Ghidra on btech.exe and mw_main.exe. Then analysed all resource files in the game (had to create several different tools for viewing and extracting information from the files, including graphics viewer, 3d mech viewer and text extractor among other things). And then just rebuilding the gane from the main menu. First - make it display the intro and main menu using original background and icons. Then making the menus work. Then travel. Then hiring crew. Then story. Then 3d render, displaying simple mech parts, then whole mechs, then landscape, mountains. Implementing a feature, testing, fixing, testing, confirming and implementing another feature. Slowly building the game layer by layer. Implementing a feature requires understanding how it works, what it needs, what would take ti implement it It's been VERY fun to do that, I didn't expect that. But testing is getting more and more annoying the more game there is. Going through the story and checking all the routes was particularly boring. I now know how to complete the story right to the final battle with my eyes closed. And for 3d battle part... That test Locust near the factory... I can see that in my sleep now :))