DEV Community

Mohamed Ashraf
Mohamed Ashraf

Posted on

I Ported CS:GO to the Browser With WebAssembly

Hello guys! I've been on a wile ride the past couple of months, working on something kinda stupid. Running CS:GO on the browser, yes you read that right, Its slow, janky, and held together with duct tape and hope but it runs... well its running...

Backstory

Back in 2023, a user made a feature request/issue to the nillerusr/source-engine repository on GitHub requesting that there should be support for compiling to Emscripten and WebAssembly platforms. I'd never seen it during that time, but I had the same thought back then, I wanted to play Half-Life 2 on my crappy chromebook. I was inspired by the Xash3D port for Emscripten, I tried to do it back then, but I was a script kiddie (Before, not now), and I didn't know how to code.

Fast forward, 2025, I started a project named "CSGO: Plus" - a Linux-focused CS:GO remake, which was like a Kisak Strike clone but not cmake, and didn't have a hundred commits, and was pretty bad. I did add support for usage of emcc, but I never compiled it with emcc back then and I am sure that it never compiled with emscripten, but later, the repo and the account that owned the repo got deleted (RIP).

Then Came EmSource or Emscripten Source, a port of the Source 2013 engine branch to WebAssembly. It was.. a pretty bad implementation, and VPC wanted to make me rip my eyes out. I made NeoSource next, but honestly, I won’t get into the mess. Finally, I had an old mod laying around named "Lambda Complex: Source" which was based under Source SDK 2013, so I rebooted it under the CS:GO code, and actually worked on Emscripten, my best implementation thus far.

The Goal

The goal is simple. Bring the Source Engine to the web platform so it can be played universally accross all platforms (aka so people can play it with crappy computers)

The result

Well... it’s rough. Performance is garbage, memory is tight, and everything feels like it’s taped together with dreams. But hey, it runs. That’s something!

The Chaos & Legal Stuff

I licensed this beast under GNU Public License version 3, which probably makes this whole think kinda illegal (sorry, Valve). To do it "by the book", I'd need an MIT license and an official Source Engine license; but I am not giving up this mod that I loved, and poured hours of work onto.
SO yeah its a mess.

Final Thoughts

Is this legal? Probably not.
Should you try it? Unless you’re into agony, nah.
Was it fun? Hell yes.

If you want the source code, you can find it in the Links section. Its called Lambda Complex: Source which is a remake of Opposing Force.

Links

GitHub source code

Thanks for reading, please star the repository, and drop feedback

Top comments (2)

Collapse
 
mohammaddarkazanly profile image
Mohammad-Darkazanly • Edited

I’ve tried messing around with porting random stuff into WebAssembly before, nothing this big though, and running anything with Source engine code on a browser is wild. I was just toying around with Quake 2 via wasm a while back, and even that was shaky.

If you do keep working on this, and people actually get into it, I’d recommend brushing up on a few gameplay mechanics too. One thing that helps when testing aim stability in janky setups like browsers is knowing how to control recoil in csgo. Makes debugging a little less painful when weapons don’t fly all over.

Collapse
 
loire918 profile image
Loire • Edited

it really made me think about how far technology has come. Being able to take such a resource-heavy game and run it in a browser shows just how powerful optimization and innovation can be. It reminded me of the way smaller casual games, like dice dreams free rolls have also found ways to reach wider audiences by making rewards and gameplay instantly accessible. What I’ve noticed is that projects like this often succeed because they reduce barriers—no massive downloads, no complicated setup, just direct access. That’s valuable whether you’re exploring experimental browser ports or checking out reward-based apps. It’s a reminder that convenience often drives engagement, and exploring new formats can open unexpected doors both for developers and for players.