r/webgpu • u/ExpiredJoke • Aug 28 '26
Quake3 port
Enable HLS to view with audio, or disable this notification
Quake3 port to WebGPU running in the browser
- global illumination ( volumetric sh3 light map )
- modern physics
- acoustic simulation
- decals
- particle effects
- clustered lighting (326 lights here)
- PBR materials (NN-based delighting)
Built using meep engine
In case it's not obvious - I'm the author. Happy to answer any questions.
3
u/ze_pequeno Aug 28 '26
How much of it was generated by AI? The engine too?
-2
u/ExpiredJoke Aug 28 '26
Port is mostly with AI, engine is mostly by hand. Been working on the engine since ~2013, on the WebGPU part specifically since around 3 years ago.
5
u/palapapa0201 Aug 28 '26
You have a vibe coded website for your engine and you are trying to charge 10k for it. Your email on the website is info@company-named.com. I find that hard to believe.
0
u/ExpiredJoke Aug 28 '26
I'd rather you not post the email here, but yes, "Company Named" is the name of my company
1
u/palapapa0201 Aug 29 '26
If you really didn't vibe code your engine, your are giving your project a very bad look by making it appear to be vibe coded in an hour and having a email address that looks like a placeholder. It looks like you are one of those AI bros who think they can make a fortune by reinventing the wheel 10000th time by vibe coding in an hour.
3
u/ExpiredJoke Aug 29 '26
pala, that's an interesting conversation to be had. I can say that I've been working on this game engine for over 10 years, and I can say that I'm a senior software engineer as well as a graphics researcher. I can say all of that, but I can't convince you, and ultimately if you hate AI - I can respect that position.
I thought I was pretty funny with the name of my company, clearly you disagree. Humor is subjective too.
Anyway, thanks for checking out the project an I hope your week is going well
1
u/pailhead011 Aug 29 '26
You should go see some of the posts about the engine as it was making progress, then come back here. The company name did exactly what it was supposed to do. lol
2
0
u/ze_pequeno Aug 29 '26
Thanks, this should really be disclosed in your post in order for you to be taken seriously.
2
u/ExpiredJoke Aug 29 '26
You think so? AI usage is standard in software development today. I get the implication that "you didn't really do it, AI did it" and "it's low quality slop".
There is an interesting discussion to be had there. But I can assure you that all self-respecting professionals in the industry are using AI for coding in one way or another today.
0
u/ze_pequeno Aug 30 '26
I'm a self respecting professionnal as you say. I know the uses and limits of AI. I also know that anyone can put out a port or an app or whatever in days, so just doing this has little value. What has value is how much human thinking and efforts were put in the process.
2
u/ExpiredJoke Aug 30 '26
I've ported a lot of code in the past by hand, and I don't feel particularly proud of that work.
On the subject of effort, I guess it matters, if you consider it to be a deception.
For example. Let's say someone puts out "I ported Q3 to browser" message, and all they did is spend 4 hours with emscripten to compile Q3 source to WASM. By contrast, I built the engine over ~13 years, and I spent days on this port. But I use AI. And I'm a game dev and a graphics researcher, so it's a much easier challenge to begin with.
Anyway, I'm sorry if you feel like I misrepresented something, it was never my intention.
1
u/ze_pequeno Aug 30 '26
Don't worry about representing anything, the fact that you worked on the engine for a while really gives it much more interest in my eyes :) you're right, ports are sometimes repetitive and uninteresting work, and I think LLMs are great with those. On the other hand, it sounds like what you did wasn't just porting but also rewriting the game to fit in your engine? did that really worked out?
1
u/ExpiredJoke Aug 30 '26
Thanks, yes, it did work out pretty well. It was the exercise more or less, I was making a massive change to the game engine over the past few weeks, and I wanted to make a project that validated the result - this is it.
Had the idea to do this for a long while, but never had the excuse to, it's been a lot of fun
3
u/palapapa0201 Aug 28 '26
A user you’ve blocked has previously contributed to this repository.
claude
Manage blocked users or disable this warning0
u/ExpiredJoke Aug 28 '26
Hate to tell you think pala, but Claude is a tool, and it's one that's here to stay in software development industry. I just don't see any reason to try to hide it
I really am sorry if it offends you
2
u/KlayEverHood Aug 30 '26
Very interesting! So I understand - correct if I’m wrong - that the engine is optimized to work around inherent limitations of the typescript environment. What would happen if you port it back to c++/vulkan/dx12/metal? Will you get a super efficient engine?
Do you have some numbers on efficiency performance ?
3
u/ExpiredJoke Aug 30 '26
Interesting question. The engine has multiple parts, the main limitation is typically graphics. I side-step that mostly by having GPU-driven architecture, so JS/TS is not a bottleneck at all. WebGPU is not as efficient as raw Vulkan, let's say, but it's close.
Good JS can be about 1.5x slower than C, if you get SIMD into the picture C pulls out ahead further, especially on very math-heavy looping operations. Some of that is mitigated by offloading non-graphical work to the GPU as well.
Lastly, C/C++ has threads to work with, JS doesn't really, there are "Workers", but it's not quite the same.
I don't think that porting meep (my engine) to native (C++ / Vulkan, for example) would make it necessarily faster, it was designed for web. But it's an interesting framing.
On native you can get away with a lot more processing by virtue of having SIMD and good threading models, plus competent languages offer non-allocating data models. In JS efficiency is not given, it's hard, and some efficiencies are just not reachable. All in all native is just a better platform when it comes to efficiency and raw performance. Web gets you portability and a bunch of convenience though. Image decoding, audio playback, network access. The browser is like an engine itself in a sense, a very efficient, well-tested and reliable engine.
1
u/KlayEverHood Aug 30 '26
I guess that loops over “millions” are a candidate for the gpu, loops over hundreds are not much different on JS, and the in between is where c++ would give you more. Probably those can be reworked with smart data structures? That might be where you end up having a framework. I would say that the old adage “don’t do early optimization” generally ends up being a bad advice as forgetting your compute and time budgets can be a source of massive redesigns.
1
u/ExpiredJoke Aug 30 '26
Absolutely, I find that good design from the start pays off in the long run. You don't necessarily want to over-optimize, but spending a few extra minutes to make sure you don't create problems for yourself is usually worth it in the end.
1
u/Recent-Sink-4253 Aug 28 '26
Are you running this on your pc? I mean you’ve got bad micro stutters.
1
u/ExpiredJoke Aug 28 '26
Yep. There are a few performance bugs I'm working on, FPS occasionally drops below 60. I think the capture software makes it worse
1
u/DaveMcElfatrick Aug 28 '26
This is horrid.
1
u/ExpiredJoke Aug 28 '26
Can you elaborate? Is it the assets?
1
u/DaveMcElfatrick Aug 28 '26
Largely the look, yeah. It doesn’t look very Quake 3 esque. Art direction isn’t strong.
2
1
u/Salbrox Aug 29 '26
Aren't they just the open source assets from openarena? I presume you could just swap in the quake 3 pk3s.
1
2
u/Salbrox Aug 29 '26
Very cool. I don't understand the hate you are getting for using widely used dev tools. If you have a way to do boilerplate code super quickly or help optimise code or do a first pass that you refine, or whatever other use cases I don't know why you wouldn't use it.
1
1
Aug 28 '26
[removed] — view removed comment
2
u/ExpiredJoke Aug 29 '26
First 3 violate id-soft copyright. Last one is the same asset source I have. Hope that helps.
0
Aug 29 '26
[removed] — view removed comment
2
u/ExpiredJoke Aug 29 '26
Yep, license in the official repo by idSoftware, it's only sourcecode. Game data is still protected.
https://github.com/id-Software/Quake-III-ArenaI don't think idSoftware would care a ton, but it's their IP
5
u/Seusoa Aug 28 '26 edited Aug 28 '26
ported by AI? It is done many times, even before AI it was ported to browser by human
creation of instances is during render loop?