logoalt Hacker News

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

432 pointsby asronlineyesterday at 7:41 PM169 commentsview on HN

Comments

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
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 1 reply
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
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
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
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
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.

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
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 1 reply
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
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.

doolsyesterday at 8:59 PM

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

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
HaloZeroyesterday at 8:18 PM

Is there any hope for Red Alert 2?

show 3 replies
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
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
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

pjmlpyesterday at 9:20 PM

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

show 1 reply
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
wewtyflakesyesterday at 10:30 PM

Worked for me; it was a nice surprise.

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.

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...

AussieWog93yesterday at 11:40 PM

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

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
wewewedxfgdfyesterday at 10:00 PM

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

arikrahmanyesterday at 9:54 PM

Finally, I can play Zero Hour everywhere

vaygryesterday at 8:52 PM

Tiberian Sun next.

ziofilltoday at 12:25 AM

Do homeworld next *_*

TacticalCodertoday at 1:46 AM

> Long sessions on iPad can be killed by iOS for memory (~3 GB+ resident); the app exits to the home screen with no dialog. Session logs (current + previous) are in the Files app under the game's folder. Under investigation.

Wait. It's a port from a game from 2003. I don't think PC had 4 GB of memory back then (unless my memory is fuzzy, ah!): I mean, maybe some had that, but not the majority. I doubt the requirements for the original C&C Generals were 4 GB of memory.

OK, I just checked on a box of C&C Generals on eBay: requirement 128 MB of RAM (I know I could have asked a LLM, but checking a picture of an actual box is kinda fun).

I understand the need for a bit more graphics etc. but that's still a big jump: if the reqs were 128 MB or RAM for the PC, the game wasn't using that.

So we're talking something like a 32x inflation in RAM usage during the port (unless I didn't understand the caveat).

Why can't a game requiring 128 MB in 2003 run on machine 20 years more recent without using all the RAM?

Is there a plausible reason or are we to consider that when porting using Fable, we can expect the RAM usage of a program to go up by 32x?

EDIT: the original game has more asset than I would have guessed, skimming through the port's docs I found this:

> the game requires .big archive files (INIZH.big, MapsZH.big, etc.) totaling 4-5 GB. These files cannot be committed to repository due to copyright (EA Games property).

4 / 5 GB is not nothing. I wonder if the memory issue could be related to the way these are loaded?

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
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.

ellis0nyesterday at 10:19 PM

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

Madmallardyesterday at 9:02 PM

Does it actually play identically or is there going to be weird bugs all over the place?

Seems like an impossible ask to verify if you don't have an immense test suite that covers everything.

asronlineyesterday at 7:41 PM

EA released the Generals source under GPL v3, the GeneralsX project got it running on macOS/Linux, and I've taken it the rest of the way: native iOS and iPadOS builds of Zero Hour, plus Apple Silicon macOS.

What works (all verified on a real iPad and iPhone):

Campaign, Skirmish, and Generals Challenge: full missions, objectives, cutscenes, saves All audio: music, unit voices, EVA announcements, Challenge taunts, briefing FMVs Touch controls built for RTS: tap select, drag a selection box, long-press deselect, two-finger camera pan, pinch zoom Self-contained install: game data ships inside the app bundle It's the real engine: unmodified game logic compiled for ARM64, rendering DirectX 8 → DXVK → Vulkan → MoltenVK → Metal. Not emulation, not streaming.

No game assets are included or distributed. You need your own copy (Steam sells Zero Hour) and a script pulls the data from your own account. Code is GPL v3.

Repo, with a full engineering log of every bug and fix (the black-minimap one is a 2003 texture-format fallback that ate the alpha channel; worth a read if you like archaeology): https://github.com/ammaarreshi/Generals-Mac-iOS-iPad/blob/ma...

Building: macOS is about four commands; iPhone/iPad needs Xcode and a free Apple developer account since you sideload your own build. Known issues (long-session memory on iPad, a rare backgrounding crash) are documented in the README.

Credit: fbraz3/GeneralsX did the heavy macOS/Linux lifting, TheSuperHackers keep the community codebase alive, and EA did a genuinely good thing releasing the source. The engine fixes I found are heading upstream so every platform benefits.

(And of course, not affiliated with or endorsed by EA, and sorry China had to deal with all of those particle cannons in that demo video)

show 4 replies
sueandelenatoday at 4:30 AM

[dead]

slipperybelugayesterday at 8:47 PM

[dead]

baqyesterday at 8:13 PM

When someone ported pylint to rust this place was full of ‘who will maintain this’ and met with blank stares when the answer was ‘what do you mean’ or ‘it’ll maintain itself’.

Good job. It was inevitable, but still someone had to, please excuse me, say the words.

show 3 replies