Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
D3wasm 0.4 – Doom 3 in WASM (continuation-labs.com)
322 points by nkjoep on Sept 28, 2022 | hide | past | favorite | 149 comments


Something Doom 3 handled amazingly is how computers are controlled in first person.

As your crosshair approaches the screen, it turns into a mouse cursor, and you can control the computer as you would a regular desktop PC. It just feels so natural.

I'm surprised that this wasn't copied more by other games. Probably because it doesn't work as well on consoles with a controller.


Kind of like real life as well. I always lower my weapon or item whenever I approach a terminal or a touchscreen in an elevator.


Strange, I always shoot the computer first - only if it is invulnerable to bullets do I know it’s actually important.


Same approach I take with NPCs.


With this character's death, the thread of prophecy is severed. Restore a saved game to restore the weave of fate, or persist in the doomed world you have created.


Me? I am old school and just clip right through some surfaces.


If I understand your description right, I think Prey (the Arkane one) does the same thing. It does feel pretty awesome and natural; really helps you feel like you're in a corporate world with touchscreens everywhere.


The new(-ish) Prey comes close, but if I remember correctly, it still sometimes locks on to the screen you're controlling, taking you out of the action.

In Doom 3, you're still in control of your first person character, which is awesome.

Try it in the demo linked above, if you skip the cutscenes you can find a screen within the first minute of gameplay or so.


The Duke Nukem Forever 2001 leak handles in-game display interactions in a functionally identical way. Not discounting parallel discovery (or even that it was first) but id software and Apogee/3D Realms had a relationship.


They did something similar in Prey 2017.


I know it's 18 years old game by now, but in my mind it's the first wave of "next gen" games (normal maps, unified lighting, etc..) so it's still kind of amazing seeing this running at 60fps on a paltry laptop (razer blade stealth) and on linux in a browser at that!

edit: scratch that, thing runs even on phone at 60fps


> I know it's 18 years old game by now, but in my mind it's the first wave of "next gen" games

Oh man that makes me feel old. I remember first playing this on my tiny 12" powerbook from 2004... and back then It felt like a heavy weight that shouldn't quite be running on that machine.


Oh, God - I, too; experienced DOOM 3 for the first time on a PowerPC Mac...not exactly a pleasant experience.

I was an early adopter of the first Intel MacBook; and let me tell you - the difference (once we had a Universal Binary) was like riding a horse vs. driving a car.

Other than Final Cut Express and Logic Express performance, I found DOOM 3 to be one of the first major signs that Intel was meant to be and here to stay.


Well, on MBP M1 (Ventura) it drops from 63 to 15 sometimes (levels loading?).


doom3 is a masterpiece of gaming. it represented a radical shift in how 3d was used in games, hardware shift, light shift in terms of how to light and reflect light in an environment. in terms of game design this is the pinnacle of the genre. it is to this day my favorite FPS by far.

beautiful talk by carmack https://www.youtube.com/watch?v=Q1q49GxsPWM&t=4s&ab_channel=...


I don't know... it's definitely a masterpiece of rendering technology, but IMHO not as a game. Compared to classic Doom or the Quake games, it took too long until the action started, and everything felt so slow and sticky! It was the first Id game I couldn't really get into, and the first I didn't play to the end.


This was the first (only?) game that legit had me jumpy. I remember one part of the game where I was in this room and a monster walked across the window, saw me, then came around and started pounding on the door. Each time the door dented a bit more until it gave out.

I don't think I saw a game before Doom3 that was quite like that.


The problem is that the whole "all doors close, light turns off, monsters spawn", or the lighter version of "door opens behind, monsters come from it", or sometimes "monsters teleport behind you" was the entirety of the gameplay. The first few times it made me jump, but then it just became boring. Pretty soon you could predict when it'd happen, too.

The other cheap trick was to make half of all maps so dark you need a flashlight, but make it so that you couldn't use a weapon while the flashlight was out. IIRC the very first Doom 3 mod was the one that fixed that, and it was called simply "duct tape".


The classic Alien vs Predator (I think?) had me literally falling out of the chair when a facehugger jumped at me :)


During the LAN party era my friends and I played the crap out of that series. The engine wasn't as sophisticated as what iD et all were doing, but worked perfectly fine for the gameplay. We'd spend hours trying to one up each other in deathmatch.

Another gem of a game I think a lot of people overlooked that has some similarities is Natural Selection 2. This is a sort of aliens vs space marines FPS and RTS hybrid. It never really blew up but still has a community.


My friends and I only bot bashed. NS2 was much desired but fell flat for us.


Only game I ever played where I remained unmoving in one corner for half an hour and was not bored.


Something I loved about that game was that stopping didn't make you safe - if you stopped for too long the aliens would come and find you. This lead to a intense experience where you had to keep going - even when terrified - because stopping was even scarier.


I think it might even be argued its rendering techniques either weren't that revolutionary, or turned out to be dead ends.

Don't get me wrong, it's a technical masterpiece, but one of execution rather than innovation.

It's main feature was dynamic lighting and shadows, which it accomplished with dynamic lights, normal maps and stencil shadows.

Dynamic lights and normal maps were nothing new even back then, I remember multiple titles using them, but not this well and not to this extent.

Stencil shadows were kind of unique, they worked by extruding the geometry from the light's perspective, and figuring out what was inside the light's shadow by counting front and back faces.

Unfortunately, since they used geometry, they looked really blocky and sharp, with no smooth edges unlike shadow mapping.

Imo they looked kind of bad, a step down from the beautiful pre-rendered lightmap shadows we enjoyed years before.


Yeah, the Doom 3 engine reflects sort of the last echo of the road Carmack hoped graphics cards would go down. But everything went down the other road.

From memory, what Carmack was advocating for in this period was like an updated version of SGIs hardware, fixed function and able to chew through a staggering number of simple triangles per second. Complex renderings would be built up by compositing lots of passes. Stencil shadows reflected that tradeoff. But shadowmaps with an increasing number of tweaks proved much more practical, and design wise no penumbra is indeed a tough one to swallow. And then GeForce came along and pretty much ended any debate on commplex shaders vs lots of simple triangles.

Using stencil shadows today, or their shader described equivalent, might be an interesting aesthetic choice for a horror game though.


I think the original Half-Life used stencil shadows - I guess that was the most advanced option available in 1998? Counter-Strike on the other hand rendered a grey circle sprite under players (looked okay enough - approximated the vague shadow you get when under multiple light sources).


Unfortunately the game didn't end up shipping with shadows despite shadows being on the box art screenshots.


I think early versions did but it was supposedly removed because shadows were cast through walls in multiplayer (which was unfair). The code is definitely still in the engine, behind a cvar which isn't exposed to players.


It's also a game that arguably was directly limited by its advanced rendering techniques; the number of enemies on screen at any one time rarely exceeds four IIRC, corpses vanish almost immediately to reclaim resources, most environments are quite small with few open or large spaces to explore. Id had to ship something that could actually run on customer computers of the era.

This is in sharp contrast to Half Life 2 released at a similar time, which had far more enemies and NPCs on screen at one time as well as much much larger maps to explore. I think in some ways Half Life 2s visuals have honestly dated better despite the less ambitious technology - the larger and more varied maps its lesser performance requirements permitted help a lot.


Doom 3 wasn’t the same kind of game as Doom and Quake were. Serious Sam was more on that line - Doom 3 was an entirely different game type even though it had the same lineage.


This is true, but unfortunately the game is a plodding horror linear corridor shooter with bare threads of sloppily integrated immersive sim/System Shock-style elements like NPC logs and safe codes, except all the supporting elements that facilitate player agency are removed.

It looks nice, when you can see what's happening, otherwise it's a collection of good ideas and tech executed badly.


Same for me, it looked nice, but never got into Doom 3. On the other hand the new Doom games, especially Doom Eternal, go back to the roots and are one of the best FPS games out there, at least for single player that is...


to this day it is for me the only fps that i felt was art. almost like a very good movie. better lit than most of what hollywood produce now. sound design was awesome, it had so much style and atmosphere, and it was really minimalist to an extent that each interaction was important each enemy was a strugle. defintly different from all the other doom games hence why it was never as popular as the others but there was so much depth in its shadows than it reminded me of how great composers use silence in music

https://fabiensanglard.net/doom3/renderer.php at the technicql level there were some cool advances and the game in its production definitly felt like a leap forward that only a few game matched after (i could say mgs 4-5 and death stranding are close ones, final fantasy 15 while very weak story wise had others, but definitly no fps did what doom3 did)


I got super annoyed at enemies popping in behind me out of thin air, too. Felt like a cheap way to surprise the player, and it got old really fast.

Doom 3 as a game sure looked cool, though. The flashlight blew my mind back in the day.


Stencil shadows were not particularly influential, everything now is either lightmaps or RT. If anything I'd argue that The Chronicles of Riddick: Escape From Butcher Bay did what Doom 3 did technology-wise (stencil shadows, normal mapped models and environments) and used it better since the lighting tech had real impact on gameplay systems other than "you can't see". Butcher Bay even released before Doom 3 did, on console hardware no less. Having played Butcher Bay before Doom 3, the latter was an deep disappointment.

Also I wouldn't put light reflection in the list of idtech 4's achievements if we're talking more than one bounce, it literally does not do that. idtech 2 did, precalculated of course.


> and used it better since the lighting tech had real impact on gameplay systems other than "you can't see"

Yeah, I always was perplexed by that tendency in Doom3… I mean, I get that lighting calculations aren’t tracing the effects of light past the first surface it hits, but does it have to be black when there’s no lights hitting a surface? Couldn’t they have done a cheap approximation of “ambient light” based on how many lights there are nearby, and use that light level as a minimum for totally occluded surfaces?

I remember reading that the choice to use black was literally a performance optimization because the renderer got to fully skip drawing surfaces that were fully occluded and it saved some render time. Then I also read that it was a design choice to give it a more panicked environment because you couldn’t see what’s in the shadows… but it always looked clunky to me, seeing fully black areas when there’s clearly a lot of reflective scattering surfaces around.


Have you ever played Prey (2006)? It used the same tech, had some extra capabilities like walking on walls and ceilings, and was probably even more intense in the body horror department


You forgot about the portals. It had portals before Portal. It also features some pretty cool weapons and other mechanics. Pretty cool game. Too bad Human Head never got to finish the second one


> It had portals before Portal.

Not entirely accurate. Narbacular Drop, the first prototype for Portal (that caught Valve's attention and they hired the devs to recreate the tech in Source engine) was released a year before Prey, in 2005.


I actually deleted the line I had written about Narbacular Drop. You're technically correct, which is the best kind of correct, of course, but Prey was stuck in a development hell for what, 10 years? It had portals in the 90s!


Portal Rendering style engines were invented in the early 90s. I think several people had roughly the same idea at the same time in academia, as well as industry.

Descent was based on a portal and cell renderer that used a unit cube with limited orientations as the cell. This let them simplify and pre tabulate some of the rendering math.

The PVS precalculation done for quake levels is effectively a portal renderer.

Unreal's software renderer needed portal rendering to limit overdraw, so the engine was based around it.


Those portals are baked into the maps. I think we're specifically discussing dynamic portals, where the player has the ability to bridge any two spaces at runtime.

Descent can't do that.


The way the underlying engine works is what's significant, not that it's a dynamic game design element. Descent levels are just a graph of cubes where a portal rendering algorithm runs per cube instance in a flood fill that spreads from the camera origin until there's no more unclipped portals visible on the screen. You could totally make a portal gun mechanic in that engine, they just didn't want to. Well beyond the hatches that open and close, which do case an end to the portal rendering cell walk when closed.

There's nothing particularly novel about Portal (the game) style portals in rendering. Racing simulators did the exact same thing for rear view mirrors for decades prior. It's just another transform in the scene graph clipped to a subscreen area.


We are still not talking about rendering. Rendering portals is trivial, and as you say, is the basis of nearly all 3D engines as a means to figure out what to draw. But that info is compiled as the visibility graph into the game map data structure and cannot be modified in realtime.

Narbacular Drop is like, literally the first 3D game ever released that allowed dynamic creation of portals at runtime.


I am aware of what you're saying. Please reread what I wrote a bit more carefully and charitably. Dynamic portals are not a precedent worth talking about.


> Dynamic portals are not a precedent worth talking about.

Dynamic portals are literally the topic of this specific thread of comments. Here's the bit I originally replied to:

> [Prey] had portals before Portal.

Then you showed up conflating dynamic portals with compile-time map rendering, and now you're saying that dynamic portals, the very subject of this discussion, aren't worth talking about, because static portals, the preceding tech, existed earlier, even though dynamic portals clearly introduce fundamental design space as popularized by the critically-acclaimed game Portal.

The word "render" appears in your reply to my first comment six times, which is a lot in a discussion that is not at all about rendering.

Please correct any misunderstanding here on my part.


> Then you showed up conflating dynamic portals with compile-time map rendering,

I did not. Reread.

"Dynamic Portals" as you term them are nothing more than the combination of a transformation matrix and a screen space clipping region in the context of a recursive approximate depth first renderer, a combination that was utilized by MANY MANY games before the one you're apparently cheerleadering. And this is exactly what I'm talking about, but you're failing to catch the specifics of what I'm actually saying out of apparent defensiveness over this one game.


You still don't understand what a dynamic portal is, what it does, or why it's distinctly more useful than compile-time portals.

You are still stuck repeating "renderer", even though rendering is still not the topic of discussion here.

No amount of recursive matrix transformations will net you the gameplay design space of actual dynamic portals.


edit: nevermind, it's just not worth trying


I think I remember an old game CD having screenshots of Prey from the 1990s - in .pcx format no less!


Half-Life 2 came out around the same time and I think had better graphics, story, and realistic physics.


ehhh... Doom 3's limitations were painfully obvious when it launched. The shadows and pure blacks were a nice stylistic workaround for handling only a single light source, but later levels went crazy with filling the world with glowing fog to make larger rooms even remotely usable. It felt more like an elaborate tech demo than a game at times.

It was a significant leap, but it was the right time for it. In less than a year you saw other games doing the same thing or better - they had clearly been working on it as well. Doom 3 was just the first to come out, and Carmack did a lot to spread knowledge about it immediately (as he frequently does, which is wonderful).


A tech demo you say. Obvious. Doom, Doom2, Quake and Unreals and nothing more than FPS clones of the same concepts to sell engine features to third parties.


I'm not claiming that's their goal, but yes, Carmack often seems more interested in his craft than the end product. Which I very much enjoy, and the computing world benefits from. I wish more game companies were like that.

As to views on the end product as a whole: opinions differ, ridicule seems unwarranted.


The Doom 3 demo scared the crap out of me the first time I played it, that scene in Mars City Underground. It still does in some way.


It was the last true generational leap in PC gaming. It took consoles at least 5 years to catch up. Something we'll never see again now that all AAA games are exclusively built for console limitations, with PC ports as an afterthought.


Not really. It took less than a year for the Xbox version to release.

That same year Quake 4 launched using the same engine on Xbox 360.


Death Stranding is, in my opinion, another such leap.


seems not that long ago "can it run doom" was the benchmark, now we are already up to doom 3.


Still waiting for Crysis.


Yeah doesn't take much these days. I played with dhewm on a surface go, and performance was amazing for a dinky 6W cpu even with the high dpi display.


Depending on if you are talking about a recent iPhone, it may be faster than the laptop.


I'm getting ~15 FPS on this demo, which is roughly the same FPS I got on my potato PC when Doom 3 launched. Really brings me back.

I'm used to seeing Doom running on all kinds of platforms, but it's inspiring and humbling to see Doom 3 - a game I have vivid memories of being in awe of - running in a browser. It really highlights how far tech has come when I wasn't looking. In many ways, my old eyes don't see much different from Doom 3 high end graphics and the graphics of modern games.


> It really highlights how far tech has come

I remember seeing primitive Flash versions of Half-Life, Quake and Return to Castle Wolfenstein running in a browser ten or so years ago and I thought that was amazing.


Very impressive! Few minor artifacts with shadows and the fps counter shows 63, but otherwise, works great on Firefox on my 2021 M1 MBP.

On a sidenote, I unironically love the dialogue in this game - it's so bad it's good:

Guy 1> I'm tired of running damage control every time he makes a mess.

Guy 2> Right, you're the control. And if that fails, I'm the damage.


Personally, I love cheesy dialogue in games like this.


The same author also did a port of Arkane's Arx Fatalis to WebAssembly. Interestingly, both Doom 3 and Arx are now owned by Microsoft with the Zenimax acquisition, so it would be interested to see these two games on the frontpage in a gaming section when you open the Edge browser.

https://wasm.continuation-labs.com/arxdemo/


That's because both engines are under a libre license. Check Arx Libertatis.


It will be interesting to see how this game's legacy will ultimately be viewed. For the first decade or so after its release, it got a lot of flak for certain design choices, like the limited access it gives the player to the flashlight, that don't seem like such a big deal anymore.


Note that they remastered the game in 2012 as "Doom 3: BFG Edition", and that included the ability to use the flashlight while holding weapons.

I think Doom (2016) and Doom Eternal are far more successful as Doom games than Doom 3. Like the original 90s games, they're fast-paced, with wide-open combat areas and hordes of enemies on screen at the same time. The technical choices they made with id Tech 4 meant that a game like that wasn't really possible with the hardware available in 2004.

Maybe they just shouldn't have called it Doom? But its design as a slow-paced horror game, what with all the tedious monster closets, doesn't compare well to Resident Evil 4, which came out only a few months later.


It’s more the genre change from action to horror. Serious Sam felt more like a Doom sequel than Doom 3 did.


Well, if you paid attention, Doom 1 and 2 were "horror" too (the amount of "creatures from hell", mutilated bodies hanging around as decoration, enemies exploding into giblets of bloody meat etc. are pretty sure giveaways), but the technical limitations of the time prevented them from being as scary as Doom 3.


"Horror" is more than just the setting, it's mainly about the gameplay. Doom 1, 2 and eternal are more action than horror. You have lots of relatively "weak" ennemies to kill. The blood and gore just intensify that "happy trigger" feeling. Rooms are bigs, allowing you to move freely to avoid projectiles.

Doom 3 on the other hand is different; you very rarely have more than one enemy to beat at a time. That single enemy can absolutely shred you if you are not very careful, you have to consider each engagement carefully. The darkness and blood are tuned to intensify that "fear" feeling. Rooms are very small, limiting your ability to dodge, almost to the point of inducing claustrophobia.

Painkiller was released almost as the same time as Doom and was way more action oriented, even tho it contains its fair share of gore.


> "Horror" is more than just the setting, it's mainly about the gameplay. Doom 1, 2 and eternal are more action than horror. You have lots of relatively "weak" ennemies to kill. The blood and gore just intensify that "happy trigger" feeling. Rooms are bigs, allowing you to move freely to avoid projectiles.

It might be just me being overly frightening but I clearly remember 14y old me playing Doom at night with my headphones on and begin scared as fuckin hell when something appeared out of nowhere making guttural noises.


If memory serves, Doom is sorta bimodal.

If you know how to strafe, and get to the point that you are habitually doing it almost every second of play, Doom is an action game where you are grossly overpowered compared to your opponents, more or less. To even slow Doom guy down you need tight corridors to cut his maneuverability down and enough enemies to clog him up even so. In open space the only real threat is being plinked away by the undodgeable hit scan weapons; high level play with speedruns involves a lot of managing that and hoping for decent luck. The non-hitscan weapons for them are, to quote a popular Youtuber, super easy, barely an inconvenience, which ironically makes the "weakest" enemies actually the most dangerous in the game in most places.

If you don't know how to strafe, which was very common at the time since we were all new to 3D spaces and even the ones we had used before may not have had a "strafe" option, Doom becomes much more a horror game. As others are saying about how Doom 3 gives you the choice of "seeing" or "shooting", but not both, Doom without strafing gives you the choice of either dodging or shooting, but not both. Shooting becomes a contest of nerves because you're committed for a second or two... to dodge an incoming missile involves turning, then moving. And that move is either "forward", vectoring into the oncoming missile, or backwards, vectoring away but heading away from your field of vision.

I remember both modes now, both playing it back when Doom I was the only release and I played the shareware, and I saw the "strafe" option and had no idea what it was or why I would use it, and playing in later years when strafing was simply part of my 3D "vocabulary" and I did it instinctively. It's almost two different games.

I suspect even at the time, the developers of Doom weren't used to strafing either, and in a weird way it has contributed to its classic status. If they were it would have been balanced much differently.

The same things that make it a gaming classic that people are still playing to this day are also gross violations of the current state of the art of game design and balance... the reader is invited to conclude from that statement whatever they like.


Part of it was that keybindings were still in flux at the time. Strafe actually appeared in Wolfenstein 3D already, but the way you did it was by holding Alt while pressing left/right arrow; you used the arrows without Alt to turn around (and using the mouse to turn was very uncommon back then). The original Doom inherited that.

It wasn't really a good setup even in Wolf3D, but it took some time for the gamers to figure that out, and for those findings to percolate as the defaults in newer games. Even Quake (1) didn't have mouse look + WASD enabled by default. I think part of the inertia was that arrow keys were so ingrained as navigation by design (they're arrows!) that abandoning them just didn't make sense.


> I suspect even at the time, the developers of Doom weren't used to strafing either,

I don’t know if that’s fair. Doom had a timer in it and was built to have speed running in mind (even if that term hasn’t yet been coined).


IIRC certain secrets are basically only available via strafing so the general concept was known.

There are other moves that developed much later.


Certainly the developers knew about it in general, or they wouldn't have put the controls in. My contention is that even they hadn't yet fully internalized just how useful it is. By the time of Quake it's clear that it had gotten to the hardcore, and by now of course it's just part of playing 3D games. But it took time for everyone to realize it. 3D was a pretty big jump. I'd say that the "bug" that strafe + forward was faster than either alone, which was pretty common for a long time in 3D games, reflects that. There's no reason to have that bug or leave it in if you have deeply internalized strafing as a viable option. It happened precisely because it was viewed as an exceptional case rather than the way that almost everyone would be running around all the time.

I'd also observe that biologically, "strafing" is fairly hard, and the idea that you can strafe at the exact same speed you can run forward, safely, for long periods of time, is absurd. What we have instead is faster turning than keyboard controls offer, and more flexibility in general, but not literally the ability to "strafe" at 90 degree angles. It's an adaptation to limited 3D environments. (Strafe + forward gives a more realistic 45 degree angle of shoot to movement. I think in reality that would still be a fairly extreme thing to maintain all the time, but it's closer to realistic. 90 degrees is just absurd.) As it is implausible, it is perhaps not surprising it took a while to become popular.


I don’t think biological realism was the key criteria in 90s computer games.


Strafing was in Wolf3D too. In fact I think it was intended as the core mechanic for defeating the Episode 1 boss.


No circle strafing though.


Yeah, especially the first time when one of those near-invisible bitey things sneaked up and started gnawing on you, you were in for a pretty good scare...


That was intentional but it’s still a point about atmosphere and not game play.

Doom 3 plays very different to Doom 1&2.


Yes, but it's not that simple. Doom 3 is pretty "horror" compared to any other Doom game. I would put in the same basket as Dead Space games.

Doom (2016) and Doom Eternal gameplay is much closer to Doom 1 and 2. Both are very "push-forward" shooters.


The later Dooms overdid the platform jumping part. Not that the originals didn't have that, but the trickier jumps were generally only necessary to reach fancier pickups, secrets, and secret levels.


That’s true, it’s more the gameplay shift (jump scares, less enemies on screen at once, no power fantasy) than the aesthetic shift.


I remember playing around with the Serious Sam level editor. A buddy of mine made a map that was just a small hut in the middle and monster generators scattered over the next hill. Endless mindless hordes of monsters came over that hill and you and your buddies just needed to hold out as long as you could. Pretty amazing for, what, 1999?


Downloading the duct tape mod was practically a requirement.


The flashlight mechanic really gave it a nice horror vibe the originals were missing. Like do you want light? Or do you want to kill things? Choose!


The originals had a lot of horror vibe. It might not seem like it nowadays because players are used to it and there's many mods like Brutal Doom trivializing the content, but original Doom was scary. There was no other game like it at the time, and the growls of the monsters, the flickering lights, rooms getting dark when you grab a key and monster closets opening, body horror elements on walls and decorations. Doom 3 felt actually milder, it just was more annoying with the darkness everywhere.


I played the originals back in their day as a wee lad, and while it was scary -- and aaah the old lights-go-out-when-you-grab-the-macguffin trick -- I don't appreciate it in the same way that I did with Doom 3. The latter seemed to take a lot of inspiration from Resident Evil/Alone in the Dark. The original Doom was just lots of cheap traps.

In any case, while I like Doom 3 I am glad the series didn't go in that direction afterwards. When lukewarm Quake 4 came out I was beginning to worry that id had lost its touch... luckily Doom 2016 saw a return to form.


Doom 3’s flashlight also took away one element from the original: a dark room was a place you really didn’t want to enter, but had to in order to progress.

I think it was E1M3 or something that had a large room whose lighting slowly pulsed at about half a hertz. With about 15 demons, that room was fucking unpleasant. In Doom 3, you’d just whip out your flashlight — no biggie.


Doom 3's design suffered due to its programming innovations. Since the game developers wanted to show off the real time lighting, they opted for a horror like design that showed off the tech. It kinda drove it away from the thing that made the original Doom games fun - fast paced fps action


This is really cool - was too afraid to play this game as a teenager, but it's great to see it in this context!


Yeah, D3 wash such an adrenaline rush


One background article on Doom3 renderer. I'm sure there's more from Carmack himself. https://fabiensanglard.net/doom3_bfg/renderer.php


Dr. Malcolm Betruger: Amazing things will happen here soon, you just wait.

Took a while but he was right.


How long until Linux runs in WASM, with Doom running in it on Wayland?



There's several regularly updated Linux emulators running in WASM here: https://copy.sh/v86/ I don't know if doom runs in any of them, but it would be slow.


But that's emulating x86 code, as opposed to running Linux-ported-to-WASM directly.


That would require WASI to cover a lot more than it covers now.


Fails to load in firefox 105.0.1 (64-bit ArchLinux) for me.

    WebGL warning: <Create>: WebglAllowWindowsNativeGl:false restricts context creation on this system. d3wasm.js:1:156185
    Failed to create WebGL context: WebGL creation failed: 
    * WebglAllowWindowsNativeGl:false restricts context creation on this system. ()
    * Exhausted GL driver options. (FEATURE_FAILURE_WEBGL_EXHAUSTED_DRIVERS)
    Uncaught TypeError: GLctx is undefined


Supposedly a firefox bug. Try about:config => webgl.force-enabled = true


FWIW, working on Firefox Dev Edition on 64-bit Arch for me.


This is a total mind blow. Consistently got 15-30+ FPS.

It's early, but this is the future. No need for a console/native build, just pop open a browser and jump in.


I don't think it is the future - but not because of the technology. Things in the browser have proven hard to monetize, unlike app stores/steam/consoles which have been built to enable selling.


The smart players will just run a custom headless browser in a glorified nix box with a console-like case and price it at a premium. Profit would be insane.


Is there a console command to go straight into the action instead of having to wait through the long intro cutscene? I want to try shooting some things.


You can use the Home key to skip cutscenes. Click on "show help" for more alternate controls


This may be some kind of malware. I ran it till the game downloaded and started playing. Suddenly I noticed that my mouse cursor was no longer visible. After restarting the computer the mouse cursor is still missing. I've tried this twice now, including turning off the power. The mouse still works and I can click and scroll but the cursor is not visible.


How are graphics calls handled? WebGPU?


According to the project page [1], WebGL. WebGPU is still in development, it's the successor of WebGL and not yet supported by stable browsers.

[1] http://www.continuation-labs.com/projects/d3wasm/


This port uses WebGL. There are no games out there yet that are using WebGPU in production, it's only available in Origin Trial. It goes live by default in Chrome February 2023.


Works well on MBP16 M1 Pro.

What's the best version of Doom 3 these days to use on Apple Silicon?


Dhwem3 has a native macOS M1 (arm64) version that runs well: https://github.com/MacSourcePorts/dhewm3/releases


From the awesome terminals and PDA that didn't grant you a break from the demons.. Doom 3 still remains a wonderful immersive experience. Replaying it last year was really surprising to me; it's still great.


Runs great on M2 MBA! How do I skip the dialogue and go full screen?


The naming is strange though. It could be Diablo 3 or D3.js.


Ooof, performance on an Mac Studio was not great, ~30-60fps


Is that an unladen MacStudio?


An African or European MacStudio?


I see what you did there...


I don't get it


It's from Monty Python and the Holy Grail.


Weird, was mostly 60FPS on a 2019 MBP.

Just couldn't press INSERT/HOME to actually get anywhere when necessary :(


If you hold the function key (‘fn’) and press the left arrow it works. Macs map fn+arrows to home, end, pgup, and pgdown.


Dear god, I was just thinking that it's about time we have Doom 3 running in a browser. Good job. In fact, 8 am going to try it right now


Oh yeah, I remember that intro.

When I think of Amazon/Tesla, I always associate it with early 2000s era science-fiction videogames.


Just hangs at loading the demo data (after clicking new game and choosing a difficulty) for me.


Network tab showed that game data was loading for almost 10 minutes, maybe that's the case.


Nah, it threw a js exception. Tbh it's probably a me problem, been a while since I updated chrome. Tried it on my phone and it loaded up fine in about 3-5 minutes.


So is WASM basically just going to be about video games? And graphics rendering?



I wondered as I clicked, "why would someone want a limited application set for WASM? Wouldn't it be better if more—Oh yes, I see."


Yeah WebAssembly enables casual gamers, gamers on Macs (especially on newer M1/M2 devices with limited game compatibility natively) and students on Chromebooks to jump into a game in a low friction manner. And this isn't even mentioning being able to reach mobile devices, which represents the largest portion of revenue in the games industry today.

Couple this with the fact that developers won't have to pay a 30% fee for distribution on the web, and you have the recipe for the next big games platform that's hardware agnostic by default. Very disruptive stuff.


Mac users already have Rosetta, they don't need any limited gaming platform. And Chromebooks have native Android and Linux compatibility (plus Wine and Steam), so the WASM gaming would be useless for them compared to native GL/Vulkan rendering thru MESA under ChromeOS.


I used emscripten to make physics and math software written in Fortran available to my JavaScript program. I would've used wasm, but it was in poor shape back when I wrote the software. There are a lot of things besides games and graphics written in C/C++ that can be used in JavaScript as a result of emscripten and wasm.


Speaking as someone working on a webassembly port of a non-video game software for a living: yeah maybe.

It's certainly the use-case that received the most love.


I used an emscripten app that dumped vtables from Linux .so files - I thought that was much easier than having to download something.


Well, that would be great, yeah. But the other web APIs (everything except WASM, WebGL and WebGPU) still have a long way to go to provide the same functionality as native APIs that are relevant for gaming. Currently the web equivalents are a massive PITA to work with. The web platform needs something like the DirectX or Proton initiatives to make it viable for games, WASM and WebGPU alone are not enough.


I have no idea why this is getting downvoted. Floh is, among other things, the author of Sokol, which is a set of cross platform libs suitable for game dev. Sokol has "native" support for the web, which means you can write your app against Sokol and don't have to deal directly with these painful web APIs.

I've personally used Sokol for a number of projects and it has been great. You get something much leaner and meaner compared to the Emscripten port of SDL, which otherwise seems to be the "default" when people do these things.

https://github.com/floooh/sokol


WASD + WASM = <3


Is there a full screen option that I'm missing?


There’s an X-plane app for iOS. It’s fully flyable, 35,000 real-world airports, full instruments and nav aids, etc. $5 per month.


Sorry, but what does X-plane on iOS have to do with browser Doom?

Also some of the planes in mobile Xp are terribly simplified (A320), the controls suck and the clouds render in pink on iPad Mini 6.


fullscreen? f11 seems to be disabled


looks great




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: