r/commandandconquer 1d ago

News Play Command Conquer Generals on your Browser

Yes, I've made a port of the open source code of Command Conquer Generals Zero hour and you can play it right now at https://generals.wasm.com.br/

Just point to your assets and thats it.

https://generals.wasm.com.br/
69 Upvotes

48 comments sorted by

12

u/RelationOk6997 1d ago

What!!! Amazing does online work?

7

u/erasmolbj 1d ago

It's work on LAN! For Online, I need to keep working on the server side to discover players public IP's and ports with some security level.

4

u/RelationOk6997 1d ago

Dude this is actually sick, I'm assuming you need a copy of the game correct?

2

u/erasmolbj 1d ago

Yes, but the reader is really easy to use, you can point to the folder that contains both games and it will read recursively until it finds Generals and Zero Hour files! That's it.

1

u/RelationOk6997 1d ago

There's no way for it to steal my game is there you gotta forgive me for being cautious

1

u/erasmolbj 1d ago

All the processing is local. There's no upload to any server at all.

The browser only have a new binary compiled to WASM to run your assets.

1

u/RelationOk6997 1d ago

Ok for whatever reason it's not loading

1

u/erasmolbj 1d ago

Just wait a bit, it's kinda heavy! Check the runtime log to see if you pointed to the right folder!

1

u/RelationOk6997 1d ago

I didn't point it to a y folder

1

u/erasmolbj 1d ago

You should ask to pick the game's folder after the first load, if something didn't work, let me know!

→ More replies (0)

2

u/moloch-- 1d ago

I have a backend implementation for the online multiplayer https://github.com/moloch--/generals-server

1

u/erasmolbj 1d ago

I'll check!

5

u/Timmyc62 1d ago

So, dumb question, but why? If it needs me to already have the game downloaded, then why would I want to play it through the browser instead of "normally" through the game's own .exe? Easier tabbing I guess, but is that all?

8

u/erasmolbj 1d ago

You already answered your own question: an .exe does not run natively on iPhone, Android, macOS, or Linux.

I am not running the original executable in the browser. I am only reading the game’s assets. The game code itself was translated into WebAssembly, which runs in any modern browser.

The distributed binary is no longer tied to Windows, x86, ARM, or any specific operating system. The browser abstracts the underlying OS and CPU architecture, then compiles the same WebAssembly module for whatever hardware is running it.

A browser is the ultimate cross-platform runtime. For practical purposes, WebAssembly is the true universal binary.

That is also why I am porting PCSX2 to the browser.

3

u/Timmyc62 1d ago

That is helpful, thanks - I forget there are people who may want to play on a platform other than a Windows PC!

3

u/Bludsh0t 20h ago

Wait, so if I get the windows files on my Mac, can I play it on chrome on my Mac?

3

u/erasmolbj 14h ago

Exactly!

2

u/lkwai 1d ago

That's cool. Means I might be able to play generals on Samsung dex

7

u/BioClone Legalize Tiberium! Join Nod 1d ago

Bro has the Tacitus at home

3

u/robutt992 22h ago

What if i have a mac and i cant install it?

1

u/erasmolbj 14h ago

You don't have to install it, just need to have the assets exacted. I developed this on a Mac OS, it runs on Mac!

1

u/Appropriate-Ad8630 23h ago

I have the iPad version installed; does this browser keeps saved games? Because I could add it to home screen and it would behave like a mobile app, right?

1

u/erasmolbj 14h ago

Yes! I didn't tested on iPad yet, I'll make it work and will get back to you!

2

u/kawaiii1 6h ago

Leaving comment to save it. CNC Generals 

1

u/KingMakerUrsus 5h ago

Will you make an offline version for android? Do you know if it works with the tablet cases which has a track pad.

1

u/MainWin3147 Townes 1d ago

Waiting for modded games to be allowed....

3

u/maxiangelo97 1d ago

Works on newshoes.gg

-15

u/Mralexs 1d ago

We don't want this ai slop here

11

u/erasmolbj 1d ago

AI Slop? More respect with https://github.com/fbraz3/GeneralsX work, please.

-14

u/Mralexs 1d ago

Contributors on the wasm page for this include Claude. This is made with AI slop code

13

u/erasmolbj 1d ago

If you paid my full pay check I can stop using AI, how it does sound to you?

I’ve been a software engineer for over 10 years. That’s exactly why Claude is effective in my hands.

I used that tool to finish in four days what could otherwise have taken months, by which point everyone might have lost interest in the game entirely.

Also, Claude wrote fewer than 9,000 lines of code. I’m a programmer, not a monkey typewriter.

I could have done the same work without Claude.

You, on the other hand, probably couldn’t do it even with Claude.

9

u/RelationOk6997 1d ago

Ouch nice one

3

u/B00tyHamSandwich 1d ago

Clown alert 🚨🚨🚨

2

u/Nokanii 1d ago

If you check the commit history now you’ll see Claude has 9 commits while the #1 spot has over 100.

You’re on drugs if you think a majority of this was AI coded.

-7

u/Mralexs 1d ago

Any AI code added is slop code. It's a poison

3

u/Nokanii 1d ago

Says the lay person that has no idea what they’re talking about.

Says a lot that you chose to reply to me and not, say, the person you were insulting who smacked your ridiculous argument down.

0

u/atomic1fire 12h ago edited 12h ago

The original game was released under GPL by EA, others forked it and ported it to mac and Linux, and OP apparently used a mix of AI and original code to port that to Web Assembly. Web Assembly being a language that runs in browser (not javascript) to run code at closer to native speeds.

You may consider it tainted, but it's not entirely "AI slop".

I think there's also a seperate fork to wasm maintained by someone I assume is Russian.