logoalt Hacker News

Command and Conquer Generals natively ported to macOS, iPhone, iPad using Fable

634 pointsby asronlineyesterday at 7:41 PM268 commentsview on HN

Comments

tangentertoday at 4:06 AM

I think the next 10 years or so are going to see a chucklefuck of games reversed thanks to LLMs, which can easily pattern match and operate on contrivedely optimized assembly and output reasonably accurate C/C++ code. I’m one of many right now using Ghidra + LLM workflow. It’s doing the thing it needs to and I’ve helped several communities revive and port their games this way. It is a huge time saver. While I’d personally prefer an actual source code leak, a working reverse job is good enough, even if it’s partial as long as it’s accurate.

I wonder if we’ll get to a situation where a new game is reversed in the first few months by a team effort. Right now it’s mostly solo devs, but a technical team that’s capable without LLMs is unstoppable with them, and given the nature of modding communities, the only thing they are missing is an LLM to grind away at the details of the game that would otherwise take years to find out.

show 4 replies
Eufratyesterday at 8:48 PM

IMHO, this is an actual good use of what sounds like a person guiding a model to do a mass conversion. Although, I wish the porting docs were a little wordsmithed by a human, the AI generated text style is grating.

The stakes are low, it’s mostly for fun and you can iterate on it. Compare this with Bun which was just like, “hey we converted everything to Bun to Rust from Zig, of course it works, what could possibly go wrong, I’ll totally write up a blogpost (that still doesn’t exist) explaining what we did, you can put this into your production environment soon!”

show 4 replies
didibustoday at 4:55 AM

Diff of the changes Fable added to the parent fork (which does not appear to have used AI): https://github.com/ammaarreshi/Generals-Mac-iOS-iPad/compare... for those curious.

show 1 reply
xg15yesterday at 8:20 PM

> (tap-select, drag-box, long-press deselect, two-finger scroll, pinch zoom)

This is another "AI-ism" I noticed, mostly in coding agents - they seem to be very fond of making up new "compound nouns" (and occasionally verbs) to sum up relatively complex and specific concepts into single noun phrases. I wasn't sure if it's to save tokens or if the AI uses this to get a concise "identifier" for a concept that it can refer back to later, but I found it very noticeable.

I find the resulting sentences hard to read, though it does get better if you're aware of that tendency and make a conscious effort to parse the noun phrases. But I guess since it's just intermediate output from coding agents and not text for essays or blog posts, it's fine.

show 9 replies
lazy_moderator1today at 5:51 AM

clickbait, right? it did not port it to macos, that was already done. all fable did (and it might've been opus for all we know) is adding the last few commits for ios/ipados support after all of the heavy lifting was done

still cool but the title makes it sound like it was done from scratch

flohofwoetoday at 11:01 AM

TL;DR: nothing to see here, HN title is extremely misleading

> rendering DirectX 8 → DXVK → Vulkan → MoltenVK → Metal.

Ok, *this* is a bit weird. Why create such a jenga tower of indirections instead of directly letting the LLM port the rendering code from D3D8 to Metal either through a D3D8-to-Metal shim or even better by creating a new Metal-based render layer beneath the higher level game specific rendering code? I would expect that the LLM can 'see through' all those redundant shims and collapse them into the equivalent Metal code.

Also the readme says 'no emulation', but then goes on to describe the rendering layer as emulating D3D8 on top of Vulkan on top of Metal ;)

(also why are both Meson and CMake required)

PS: after reading more, it can be explained by what this project does (and it's not what the HN title says): it's not a port from the original C&C Generals code release to macOS/iOS, instead all the heavy lifting (of making the original code base portable, and providing example ports to Linux and macOS) was all already done by an existing project (https://github.com/fbraz3/GeneralsX), all that this project did was slightly enhance the existing macOS version so that it also runs on iOS.

Suddenly this is much less impressive and could probably have been done just as well with older and simpler models (or tbh, a few hours or at most a few evenings of manual coding - macOS and iOS code is nearly identical for this type of application).

namuolyesterday at 7:52 PM

> Built on EA's GPL v3 source release via fbraz3/GeneralsX (which did the heavy lifting of the macOS/Linux port — this fork adds the iOS/iPadOS port and a set of engine fixes).

show 3 replies
Aurornistoday at 6:11 AM

The title is contradicted by the README:

> Built on EA's GPL v3 source release via fbraz3/GeneralsX (which did the heavy lifting of the macOS/Linux port — this fork adds the iOS/iPadOS port and a set of engine fixes)

It’s cool that someone took the extra steps to run it on iPad and iOS, but if the README is correct then it was already ported to macOS? Going from Mac to iPad isn’t trivial, but it’s a much smaller jump than porting into the Apple world the first time.

jwithingtontoday at 5:37 PM

It's crazy that the title is largely clickbait because he's a Deepmind employee who reps Gemini AI Studio.

So if you're just gonna do a clickbait project...why pump the competition?

evanjrowleyyesterday at 7:47 PM

I wanna know if these techniques would be useful for Emperor: Battle for Dune (2001). It's the first 3D RTS by Westwood Studios, predating C&C Generals by just a couple years. It's popularity was hampered by intellectual property disputes and a introduction of a new faction that diverged from the book series lore. The gameplay, soundtrack, and campaign missions were awesome.

show 6 replies
siva7yesterday at 8:19 PM

no way fable did this. It would have stopped after the words "command and conquer" and nerfed you to opus (while also landing you on some nsa watch list)

show 2 replies
lostloginyesterday at 10:48 PM

For any fellow idiot following behind, the below error means you haven't paid for the game in Steam.

> "ERROR! Failed to install app '2732960' (No subscription)"

This is of course mentioned in the read me.

Reubendyesterday at 10:21 PM

> rendering DirectX 8 → DXVK → Vulkan → MoltenVK → Metal

Am I reading that right? It makes API calls that go through 5 different layers before actually getting rendered? That's kind of crazy. I'm surprised it works, although I guess the underlying libraries are solid enough that it shouldn't be unexpected.

show 2 replies
doolsyesterday at 8:59 PM

How is it done "using Fable" when the first commit was Feb last year??

show 3 replies
OsrsNeedsf2Pyesterday at 8:07 PM

I'm doing something similar, using AI to make Battle for Middle Earth (same engine) "open source" with AI: https://github.com/dginovker/BFME-Source-Code

show 3 replies
bel8yesterday at 9:41 PM

Title is click bait.

This started back in February and looking at commits, Fable did only a small part of the latest commits. 19 commits out of 2000:

https://github.com/ammaarreshi/Generals-Mac-iOS-iPad/commits...

And maybe it wasn't even Fable, they might have downgraded to Opus.

This is the kind of frequent misinformation that makes me skeptical of Anthropic LLM claims. Whenever I compare them to GPT 5.5 on my web dev workflows, they seem to trade blows, even Fable, which I started testing since it was re-enabled.

Also I bet any decent LLM could have done such port. Think GLM 5.2 or similar which would probably work better because it doesn't constantly try to guess if I'm a terrorist trying to hack goverments or develop some biological weapon.

People just don't have the resources to compare LLMs and imply whatever they used is the best thing ever and unlocked some new workflow.

I have seen little improvement since Opus 4.6.

show 1 reply
momocowcowtoday at 9:43 AM

I recently threw an llm at porting an old title I had published more than 25 years ago. 150 loc in a very modular codebase. It's not easy. I got rendering and a few modules working within a week. There's a reason why the heavy lifting for this C&C port had already been done by humans.

IgorPartolatoday at 6:42 AM

Amazing. I have always maintained that Fallout 1 and 2 have nearly perfect UI for mobile. RTS games are hard to port directly while turn based games seem like a very natural fit, as long as they aren’t very reliant on full keyboard control. Fallout does not!

joehabeebstoday at 12:45 AM

I spent countless hours on this game as a kid and as I got older I found that trying to go back and play the game got more and more difficult as the technology scaled beyond the platform it was originally intended for.

A great use for what AI can help with, especially in the hands of dedicated fans. Maybe I will find some time to try and experiment with custom maps or units, the modding scene of C&C Generals was always pretty lively.

Aperockytoday at 5:59 AM

The issue with these kind of porting is edge case bugs - far smaller project/physic simulation has hit the same thing especially when original code isn't exactly clean, or sometimes only worked because of a logic bug.

This means you can play for maybe 10 minutes on the happy path but just as you are getting into the zone either a CTD or some strange event would make the game/simulation unplayable.

And while debugging is made easier, it's much more effort than telling the model to convert the code. Hence it's usually not done in these demos.

show 1 reply
AltruisticGapHNtoday at 9:29 AM

Completely misleading title.

simonebrunozzitoday at 6:33 AM

All right, when someone will do this for Railroad Tycoon Deluxe, Master of Magic, Master of Orion II, I will have to waste hundreds of hours playing these again... And it will hopefully be much more fun, because the computer "AI" will most likely be stronger / more interesting.

show 1 reply
rswailtoday at 6:20 AM

No one seems to be worried about the fact that a vibe-coded app or conversion or rewrite is not copyright-able. It is not a derivative, it's a machine translation, without a human author.

So if that is released to the public, it's in the public domain, no license is applicable.

show 1 reply
Ericson2314today at 5:32 AM

Good job, but the parent fork already did macOS, so this wasn't too hard.

HaloZeroyesterday at 8:18 PM

Is there any hope for Red Alert 2?

show 3 replies
de6u99ertoday at 6:53 AM

>No game assets are included or distributed. You need your own copy (Steam, ~$5 on sale).

Damn, I still have the CD in one of my unopened boxes from our last move.

delichonyesterday at 10:09 PM

I was bitching here the other day about GTA VI being locked down so I can't pass it on like a favorite book. But maybe if I just archive the whole package, a not-so-distant-future-ai will be able to rehydrate it onto any handy future platform at low cost.

show 1 reply
feverzsjtoday at 9:07 AM

Pretty much a clickbait.

8noteyesterday at 8:33 PM

ive had opus try movin Merlin's revenge up from director/shockwave.

the result: http://jhedin.github.io/merlin-s-revenge/

reasonably it works quite close to the lingo, but this is way difficult, and not just from being rusty. steve had most things triggered on the animation frame, which opus hasnt quite figured out by looking at the code and pulling stuff out of the .dir

i do remember that playing at double scale was a lot harder in general, but theres a really clear cooldown missing between attackes

ChrisMarshallNYyesterday at 8:54 PM

Very cool.

One big caveat with iPad and mobile, though, is battery usage. I strongly suspect that power consumption is the reason that a number of games made it to Mac, but not iPad.

show 1 reply
jayzer01yesterday at 11:46 PM

Generals. I never played this one. 2003? So you have to buy it on steam then this installer will allow you to play it on iPad?

show 1 reply
pjmlpyesterday at 9:20 PM

In the old days this would have required a proper team...

show 1 reply
bigyabaiyesterday at 7:43 PM

> rendering DirectX 8 → DXVK → Vulkan → MoltenVK → Metal

Another great case study in why native Vulkan drivers would be a boon for Apple's mobile computing. That's quite the render pipeline...

wewtyflakesyesterday at 10:30 PM

Worked for me; it was a nice surprise.

brailsafeyesterday at 9:29 PM

I wonder if this will work on my iPad 3, maybe with some Swift... 3 backport code?

OsrsNeedsf2Pyesterday at 8:35 PM

I just noticed a Flatpak folder in the repo. Does MacOS Support Flatpak somehow??

show 1 reply
Jyaifyesterday at 9:11 PM

I tell folks there's a chance GTA6 will be ported to PC before it's officially released to PC.

AussieWog93yesterday at 11:40 PM

Does this work with Generals Online (Zero Hour mod)?

wewewedxfgdfyesterday at 10:00 PM

This is one of the best of Command and Conquer games.

vaygryesterday at 8:52 PM

Tiberian Sun next.

arikrahmanyesterday at 9:54 PM

Finally, I can play Zero Hour everywhere

indyjotoday at 7:26 AM

Absolutely not to be confused with the equally AI-assisted recent port of Command&Conquer (1995) to the Atari ST. https://indyjo.itch.io/commandconquer

advennyesterday at 7:47 PM

someone do it for debian, omg. i use debian family, it has been years, i haven't played this gem

show 2 replies
gigatreeyesterday at 8:06 PM

This is an actual dream come true

show 1 reply
Quitschquattoday at 6:02 AM

I vibe code myself to sleep and implemented a rewrite of civ1 in Common Lisp. It works well, has all the DOS nostalgia I wanted (uses the same sprites etc.) 10/10 will continue doing this kind of shit.

show 1 reply
ziofilltoday at 12:25 AM

Do homeworld next *_*

ellis0nyesterday at 10:19 PM

AI is a data Xerox you can copy and transform anything with it (c)

zuzululutoday at 3:37 AM

Absolutely insane that Fable 5 was able to pull this off although I'm curious how much it cost

show 1 reply
diogenescynictoday at 3:31 AM

Very curious how much it cost to do this.

🔗 View 11 more comments