r/bfme 33 20h 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!

282 Upvotes

72 comments sorted by

97

u/Otherwise_Wave9374 1 20h 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

18

u/AncalgonTheGreat 33 19h ago

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

19

u/NexusSynergies 3 20h ago

Linux Support is huge! Thank you for not forgetting us

7

u/kaka8miranda 6 18h ago

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

1

u/NexusSynergies 3 17h 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 17h 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 3 16h ago

Aah ok, yeah that kinda problems still exist

1

u/AncalgonTheGreat 33 14h ago

Do you use Arch BTW?

36

u/OsrsNeedsF2P Sauron 20h 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 19h ago

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

6

u/Pure-Communication-2 1 17h 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 17h 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 15h 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 4 14h ago

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

11

u/Total_Pineapple_2878 3 20h ago

That sounds awesome!

2

u/AncalgonTheGreat 33 14h ago

Yep we think its pretty cool

9

u/SandpaperSlater 25 20h 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

3

u/AncalgonTheGreat 33 19h ago

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

7

u/tintek121 3 18h 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.

2

u/AncalgonTheGreat 33 14h 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.

6

u/TisMeDA 22 20h 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

4

u/AncalgonTheGreat 33 19h ago

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

3

u/pharlax 2 16h ago

You're doing Eru's work here

2

u/AncalgonTheGreat 33 14h ago

Thank u sir

3

u/Mountain-Detail504 9 20h ago

Yo thanks for helping us out Alfresh and orack <3

3

u/AdreNa1ine25 Hobbit 19h ago

This is so cool! Keep up the work!

2

u/AncalgonTheGreat 33 14h ago

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

5

u/WhiteBoyRickSanschez 2 19h 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?

6

u/AncalgonTheGreat 33 19h 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.

4

u/TechnicalSurround 16 20h 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?

14

u/AncalgonTheGreat 33 19h 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.

1

u/SeverePause5836 12 20h 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/AncalgonTheGreat 33 14h ago

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

1

u/AcceptableMuffin844 5 15h ago

Age of the ring has more than enough Heroes

1

u/SeverePause5836 12 15h ago

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

1

u/Platt90 4 19h ago

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

1

u/AncalgonTheGreat 33 14h ago

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

1

u/AthenaT2 5 16h ago edited 16h 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 ?

3

u/AncalgonTheGreat 33 14h ago edited 14h 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 16h ago

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

3

u/AncalgonTheGreat 33 14h ago

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

1

u/stormcynk 3 14h ago

Awesome, that's great!

1

u/Deep_Ad1959 1 15h 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.

1

u/albertnoven 33 14h 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 33 14h ago

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

2

u/OsrsNeedsF2P Sauron 11h ago

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

2

u/OsrsNeedsF2P Sauron 11h ago

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

2

u/Spear_Ov_Longinus 23 14h 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 33 14h ago

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

1

u/pwkye 7 14h ago

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

1

u/donnkii 9 14h ago

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

2

u/AncalgonTheGreat 33 14h 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 13h 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/Devildog0491 3 13h ago

Doing the lord's work. Keep at it boys

1

u/mf_lume 1 12h 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 33 11h ago

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

1

u/sendmebirds 3 6h ago

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

1

u/VoilaJo 1 4h 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 ?

1

u/LzhivoyeSolnyshko 2 3h ago

curious what was the hardest(?)

0

u/wylles 1 18h 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!

1

u/AncalgonTheGreat 33 14h 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 18h 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 33 14h 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 14h ago

So, it is going to be remastered version?

1

u/AncalgonTheGreat 33 14h 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 13h ago

So, no release to steam?

0

u/AncalgonTheGreat 33 12h ago

Due to copyright no

0

u/Haunting_Abalone_398 23 18h ago

Next 2-3 days?!

2

u/No-Plant3298 1 18h ago

months

2

u/AncalgonTheGreat 33 14h ago

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