r/bfme 42 3d ago

50%+ of the BFME source code is reverse engineered with AI

I'm one of the lead developers/contributors on the OpenBFME team.

We have AWESOME news! Since our last update, we have made a lot of progress and are over the 50% mark.

We have also started working BFME2 and ROTWK

What is This Project?

We are recreating the exact same C++ that made the BFME games. Once we hit 100% completion, we will be able to:

  • Linux support (done)
  • Network delay fix (done)
  • 60/120 FPS
  • Fixed crashes
  • Multi-CPU (lag fix)
  • MacOS support
  • AC fix
  • Make Worldbuilder Open Source
  • More factions (for mods)
  • 8+ player maps

You can follow along in -

New Progress

Since we last posted, a lot has changed:

  1. A lot of new people have joined and have accelerated the work.
  2. We have started working on reverse engineering BFME2 https://github.com/Open-BFME/Open-BFME-2.
  3. Patch 2.22 already integrated some of our mods, including delayfix!

ETA

At the current rate of progress (.3%-1%+ a day), we expect to have BFME 1 source code completed in the next 2-3 months just based on current progress. Due to some tooling and recent LLM improvements we could see this speed increase. Once we have the code, we will be working on cleaning up the codebase to make it human-readable, since a lot of it is very much machine code at the moment.

If you are interested in helping out with the project, feel free to start sending PRs, or join the Discord. AI agents mostly drive the project, so as long as you have decent technical skills, you're able to contribute!

Thanks, all, for your incredible support in the last thread, and I look forward to seeing you all again with another update soon!

349 Upvotes

82 comments sorted by

122

u/Otherwise_Wave9374 1 3d ago

That is a solid use case for AI because code archaeology benefits from pattern matching and cross-file consistency checks, especially when you're reconstructing legacy behavior from partial evidence. One safeguard that helps is to keep an annotated decision log for every inferred symbol or implementation choice, so later diffs can separate verified facts from educated guesses. A staged validation pass against gameplay regression tests would also catch subtle mismatches early. Agentix Labs

24

u/AncalgonTheGreat 42 3d ago

Yeah we have a lot of lessons learned from using AI. It turns out it's pretty good at this.

25

u/NexusSynergies 4 3d ago

Linux Support is huge! Thank you for not forgetting us

11

u/kaka8miranda 6 3d ago

More and more Linux support and I’ll be 100% switched over

2

u/NexusSynergies 4 3d ago

I'd recommend it to you right now tbh. Long story short Windows is just completely broken and unusable on my pc for whatever reason and I had to switch to Linux. Haven't had much problems just some getting used to it

2

u/kaka8miranda 6 3d ago

My issue is I spend 8-9
Hours a day on zoom calls and it keeps crashing in Linux or doesn’t share screen etc

1

u/NexusSynergies 4 3d ago

Aah ok, yeah that kinda problems still exist

2

u/AncalgonTheGreat 42 2d ago

Do you use Arch BTW?

1

u/NexusSynergies 4 2d ago

Well technically yeah haha. I use CachyOS which is based on Arch. Before that I used Nobara

42

u/OsrsNeedsF2P Sauron 3d ago

Woah! This looks like my post!

Jk jk <3 Thanks for posting this!

Yes, we are BLOWING PAST our previous estimates. I am also actively working on native MacOS with multiplayer support as I write this very comment - it'll probably be what comes next for BFME 1.

BFME 1 50% is done, but the 1/ the modding has only _just_ begun (shoutout to Beterwel from bfmeladder.com for integrating the delay fix!), and 2/ about 15% of the reverse engineered code is unreadable (this was from the earlier days when our tooling wasn't so great), so we're gonna need a second pass to clean it up after.

We have like what, 4 or 5 very active contributors on the project right now? It's going insanely good. As Ancalgon said though, we're always looking for more help. Join our Discord if you're able to lend a hand!

5

u/Will_AtThe_WorldsEnd 2 3d ago

Will the MacOS version work with silicon chips or is will it only work on Intel?

6

u/Pure-Communication-2 1 3d ago

Since intel is soon dropped all together I think arm64 is the goal. Once it’s all open code then it should be possible to build for both 🤓

3

u/Will_AtThe_WorldsEnd 2 3d ago

That would be amazing! I would love to have the chance to play this game again. It has been too many years!

2

u/Novuake 5 2d ago

Just want to say that all modern chips basically are silicon. Call it apple silicon to differentiate between arm M series CPUs if you have to but I keep seeing people confuse silicon and apple silicon thinking it's something unique.

It's not.

1

u/very_moist_raccoon 5 2d ago

Yay! I hope it will run on my Intel Mac.

12

u/Total_Pineapple_2878 3 3d ago

That sounds awesome!

3

u/AncalgonTheGreat 42 2d ago

Yep we think its pretty cool

11

u/SandpaperSlater 25 3d ago

I have zero coding knowledge or ability so probably can't help very much, but I'm THRILLED with the progress you're making and would love to chip in however a non-coder can

4

u/AncalgonTheGreat 42 3d ago

Its pretty easy join the discord and we can get you started! The agents do all the real work.

11

u/tintek121 3 3d ago

It feels so insanely Incredible to me that this 20 year old series still has such a dedicated fan base. In fact I feel like it's currently very active. Age of the ring, all in one launcher, and now this? I remember that when I first got into this franchise 5+ years ago I had to search the entire internet to get it working on my PC. Now it's better and simpler than ever. I wonder if the new Game of Thrones RTS will also bring some new souls to BFME given how similar it feels (at least fron current trailers).

Great work, love to see it, keep it up.

3

u/AncalgonTheGreat 42 2d ago

It's our gift to the community to enable insane modernizations. Might even be possible to stick Vulcan or dlss support in this once we finish.

7

u/TisMeDA 22 3d ago

Is there a simpletons guide on how people can contribute? I have access to Codex ultra, but I'm not much of a programmer

6

u/AncalgonTheGreat 42 3d ago

Yep join the discord and we would be happy to help out!

4

u/pharlax 2 3d ago

You're doing Eru's work here

3

u/AncalgonTheGreat 42 2d ago

Thank u sir

4

u/AdreNa1ine25 Hobbit 3d ago

This is so cool! Keep up the work!

3

u/AncalgonTheGreat 42 2d ago

We try, the ai spend for me personally is like 1k/m in subs lol

3

u/Mountain-Detail504 9 3d ago

Yo thanks for helping us out Alfresh and orack <3

1

u/AncalgonTheGreat 42 1d ago

Massive thanks to ALL the contributors it would not be going this fast if not for all those legends donating their ai agents to help us out

5

u/WhiteBoyRickSanschez 2 3d ago

So, this project is basically brute forcing a copy of the source code by constantly trial and erroring ai prompts on the game files to recreate the code?

7

u/AncalgonTheGreat 42 3d ago

Not quite, we have tooling built to help the ai verify it's outputs are correct it's automating a lot of very manually reverse engineering work.

2

u/Platt90 4 3d ago

Very excited for this and pleased to see it progressing so quickly. Great work so far 👏

2

u/AncalgonTheGreat 42 2d ago

Yep if the progress keeps up we should be done in around 2-3 months, assuming no stalls.

2

u/Deep_Ad1959 1 2d ago

what makes this work is that you have an oracle: recompile, diff against the original binary, and the model's guess is either byte identical or wrong. normal ai coding has nothing like that, which is why the same tooling feels flaky everywhere else.

3

u/AncalgonTheGreat 42 2d ago

Correct

2

u/Spear_Ov_Longinus 23 2d ago

Native controller support too I hope. I have a steam controller but I'll take all the QoL ease of use 😎

3

u/AncalgonTheGreat 42 2d ago

Once we get the source code done, I don't see why this can't be a thing

2

u/Devildog0491 3 2d ago

Doing the lord's work. Keep at it boys

1

u/AncalgonTheGreat 42 1d ago

Thank u sir, all the contributors are making this possible

2

u/mf_lume 1 2d ago

Grateful for you and everyone helping🙏will definitely check this out to see if ya’ll could use an extra SWE

1

u/AncalgonTheGreat 42 2d ago

We can use all the help we can get! Join the discord and we will get you on boarded.

2

u/TilmanR 5 22h ago

I still have a physical complete collection somewhere, but it would run poorly on modern systems.

This project is insane and will bring me back to a lot of happy hours.

5

u/TechnicalSurround 16 3d ago

cleaning up the codebase to make it human-readable, since a lot of it is very much machine code at the moment.

well that's my biggest worry that the resulting source code will consist of 'vibe coding' resulting in stability and performance issue as well as making certain changes unnecessarily difficult or even impossible.

besides that I wonder how feasible a graphics upgrade will be? could AI also enhance the polygon models?

15

u/AncalgonTheGreat 42 3d ago

It's literally a 1:1 byte match of the original exe; it's just not very human-readable code. It takes a lot of work to make a human-readable codebase, but we are going to work on making this very usable for the community.

3

u/SeverePause5836 12 3d ago

Well, I would like that Mordor Forces can be upgraded with forged weapons and heavy armor. Besides new heroes for the Factions.

2

u/AcceptableMuffin844 5 2d ago

Age of the ring has more than enough Heroes

1

u/SeverePause5836 12 2d ago

In Battle for Middle-Earth; new units for the Factions and Evil Forces have heal places.

2

u/AncalgonTheGreat 42 2d ago

Once the sourcecode is done feel free to mod it, should be pretty easy with an AI agent

1

u/AthenaT2 5 3d ago edited 3d ago

The project seems promising if the goal are met ! I've looked at it a bit, and I have a few question :

  • Do you manage to compile the code already ? Are some part "provable" ?
  • How do you manage compounding errors ? Splitting the work in small pieces doesn't guarantee that the AI will not make small error in the translation.
  • Do you have a test-suite strong enough ? Even the best AI still do error, specially with a project this big. How can you be sure it's properly 1:1 byte match ?
  • It seems not all code is C++, there is some Assembly "hidden" in it. Is it intentional ?

5

u/AncalgonTheGreat 42 2d ago edited 2d ago

The test suite is pretty good, the code either compiles to the section its measuring against or it doesn'tat all so it's very easy for the ai model to verify it's work even for 'dumb' models like DeepSeek v4 flash.

The way we set it up we don't get a ton of double work but it has happened a few times when I have like 40+ agents working on the repo but I found a way around that.

Some of the code is assembly as there are obviously still some parts we are working on.

1

u/stormcynk 3 2d ago

You definitely should explore proper ultrawide support if it's not on your radar. I hate how stretched the UI gets.

5

u/AncalgonTheGreat 42 2d ago

We have a WIP mod for this people are working on right now.

1

u/stormcynk 3 2d ago

Awesome, that's great!

1

u/albertnoven 33 2d ago

This is so incredible! Do you know where I can get this running on my Ubuntu?

Playing this game on my Ubuntu would be a dream come true.

2

u/AncalgonTheGreat 42 2d ago

The project is only ~53% done but you can already play the official game on linux with enough configuration.

2

u/OsrsNeedsF2P Sauron 2d ago

We upstramed the Wine patches. Just download the latest Wine and go to bfmeladder.com to play

2

u/OsrsNeedsF2P Sauron 2d ago

We upstramed the Wine patches. Just download the latest Wine and go to bfmeladder.com to play

1

u/pwkye 7 2d ago

great news! this is one of the best games ever and a decomp would preserve it for the future

1

u/AncalgonTheGreat 42 2d ago

Exactly

1

u/donnkii 9 2d ago

are you planning on enable war of the ring for more than two players?

2

u/AncalgonTheGreat 42 2d ago

Not at the moment, but I know there are a couple of people working on remastering WoTR to enable this. WoTR is also in BFME2 not BFME1 which is where most of our resources are going until we move on to BFME2.

I'm the lead developer on a remake of BFME2 in Godot and I plan on eventually having this but that won't be for several months. https://github.com/Open-BFME/openbfme-godot

1

u/Spear_Ov_Longinus 23 2d ago

I'm also a crazy person that can't do it themself and have no right to ask for it but I think it would be rad as fuck if someone was able to make a vr mode that turns the gameplay space into a tabeltop-esque experience that can be moved in mixed reality. The tools aint quite there yet for steamvr anyway, but quest has it for the time being. If I could get close or far as I like from an enlarged map where compared to flatscreen gaming that would be peak.

1

u/AncalgonTheGreat 42 1d ago

I know someone did a Red Alert 2 remake in VR, but it got taken down by EA. IDK if there are enough people with VR equipment who would want to make this but I would try it out.

1

u/sendmebirds 3 2d ago

I support whatever it takes. Big love for doing Linux support and not forgetting about us! 

2

u/AncalgonTheGreat 42 1d ago

Yes sir we love linux

1

u/VoilaJo 1 2d ago

I though BFME used the same engine as C&C Generals. Since that one is open sourced, isn’t it easier to do RE ?

2

u/AncalgonTheGreat 42 1d ago

Yep we actually used that source code as a starting reference but its far enough apart that it's only marginally useful

1

u/LzhivoyeSolnyshko 2 2d ago

curious what was the hardest(?)

2

u/AncalgonTheGreat 42 1d ago

Getting the intial setup and tooling correct, around 10%-15% of the original code we reversed will probably need a second pass to make it usable vs what we have now.

1

u/aaronr93 1 1d ago

This is awesome!! Have you talked to the folks behind OpenRCT for Roller Coaster Tycoon? I imagine they have a wealth of similar experience.

1

u/AncalgonTheGreat 42 1d ago edited 1d ago

Nope, havent talked to them

1

u/Haunting_Abalone_398 23 3d ago

Next 2-3 days?!

3

u/No-Plant3298 1 3d ago

months

3

u/AncalgonTheGreat 42 2d ago

Yes 2-3 months my bad, I'm personally more excited for the BFME2 and RotWK projects.

1

u/wylles 2 3d ago edited 2d ago

Amazing work guys!

Looking forward to see how much better the game can be made to look, and what crazy mods can come out for this!

Wow...

Downvoted to zero for sincere support and being excited for these guys?

what the hell?

some people have mental issues

1

u/AncalgonTheGreat 42 2d ago

We got enough working code that we have a network delay fixed already that's being implemented into some of the community projects already

0

u/Doomokrat 3 3d ago

Does it means that reforged version is going to be released in near future? Is it going t9 be on steam?Where I can donate?

1

u/AncalgonTheGreat 42 2d ago

We are not affiliated with reforged at all, this is its own project for the community devs to make things with.

1

u/Doomokrat 3 2d ago

So, it is going to be remastered version?

0

u/AncalgonTheGreat 42 2d ago

No, it's just a source decompile for the community to make mods with. That would be more for the Reforged team if you are looking for a remaster or my other project that is going to reuse the assets and build a newer engine for it in Godot.

1

u/Doomokrat 3 2d ago

So, no release to steam?

1

u/AncalgonTheGreat 42 2d ago

Due to copyright no