
How Doom 2016 Renders a Frame - milen
http://www.adriancourreges.com/blog/2016/09/09/doom-2016-graphics-study/
======
overcast
Seriously, I LOVED this new Doom. Best FPS I've played since Half-Life 2. So
polished, and straight up FUN. Incredible level design, rewarding secrets for
the min/max people, plenty of player upgrades for the role playing people, and
copious amounts of straight insane combat for the action crowd. As far as I'm
concerned, this game is perfect. Multiplayer is a different discussion.

~~~
jakebasile
Definitely a highlight of 2016. I haven't played a more unapologetically
"gamey" video game in a long time. Case in point being the glory kills. Why
does breaking off a demon's arm and beating it across the face give you health
and/or ammo? Who cares! It looks great, it plays smoothly, and it's just
_fun_.

I specifically remember an instance where Doomguy needs to shut down some
power conduit. The doctor on the radio specifies that you only need to shut it
down temporarily and that it can solve the world's energy crisis (by
harvesting the energy of Hell). Without a moment's hesitation the Doom marine
just destroys the power conduit.

You basically play a Rage Elemental.

~~~
PhasmaFelis
I've only played the demo so far, but I like that the first thing we learn
about Doomguy is that he has no patience for questgivers. When you pick up
your armor in the second room, a comm screen comes on and says "Hello. I'm Dr.
[whatever], the director of this facility, and I think that we can work
together for our mutual benefit--" Then Doomguy rips the comm screen off its
mount, throws it against a wall, and moves on.

I also like that, as you say, it doesn't matter why glory-killing demons buffs
you, but some valiant writer _explained it anyway._ (The database entry for
the armor says that it's shot through with channels that absorb and repurpose
demonic energy, or something.) I really appreciate it when someone actually
takes the time to justify game mechanics like that; it helps with the whole
suspension-of-disbelief thing for me.

~~~
firebones
I haven't played the new Doom yet, but having recently watched the sequel to
"Indie Game: The Movie", is the destruction of the comm screen related to the
hate in the movie of current games starting out with so much hand-holding and
obligatory tutorials that break the immersion and thwart the joy of discovery?
If so, gotta love the commentary...

~~~
overcast
What's the sequel to Indie Game?

~~~
firebones
"Indie Game: Life After"
[http://www.imdb.com/title/tt5998218/](http://www.imdb.com/title/tt5998218/)
Currently on Netflix.

I liked this one a lot--it was much more reflective, and a lot of it was
really an examination of how social media and gaming culture affect the
creators both negatively and positively. For instance, rather than just touch
on the soundbite part of Phil Fish flippantly saying "Japanese games just
suck!" in a panel discussion, they pull back and show a much more thoughtful
response from Jonathan Blow on the differences between versions of Zelda, and
how now games feel obligated to hold your hands, remove discovery, keep you on
the rails. Similarly, how criticism affected Edmund McMillen, creator of Super
Meat Boy.

The best parts, though, are the more atmospheric elements: the workstations
and tools, the thought processes behind game mechanics, and the deeper themes
and commentary built into games.

The original "Indie Game" was much more of a linear storyline following the
developers, and this one isn't like that.

~~~
overcast
Just got done watching this, it was painful. Embarrassing behavior by a lot of
them, during that Zelda talk scene.Seriously around 15 minutes, of drawn out
scenes, with Edmund ranting? Felt like all of the stuff left on the cutting
room floor, slapped together to cash in on the success of the first one. Which
I thoroughly enjoyed. To each their own I guess.

------
shmerl
It's a shame it's DRMed with Denuvo trash, and doesn't work in Wine because of
that (of course they could release it for Linux and DRM-free to begin with,
but it's probably too much to expect from today's Bethesda / id).

I'd rather wait for Shadow Warrior 2 (upcoming native DRM-free Linux release).

~~~
6thsurvivor
I guess you also don't watch cinavia protected movies, because it ruins the
experience for you, and rather watch Sindel for the nth time?

~~~
ChrisClark
Way to completely miss the point and put words into his mouth. He's just sad
he can't run it in Wine, even if he legally owns it.

~~~
shmerl
Luckily I don't own it, since it's unplayable for me anyway and I'm only
buying DRM-free games. Just commenting on reports of those who tried to run it
in Wine (expecting it to work because it's using Vulkan, and Wine already
supports Windows Vulkan), and failed because of DRM.

------
Gravityloss
The source list includes this nice presentation:

[http://advances.realtimerendering.com/s2016/Siggraph2016_idT...](http://advances.realtimerendering.com/s2016/Siggraph2016_idTech6.pdf)

It's cool how it's presented so openly, like a scientific project.

------
jerf
"And then it does that up to 120 times per second."

I still get floored by our computing power sometimes.

~~~
jblow
Yet phones, which only need to draw text and flat bitmaps, are laggy and stall
all the time.

~~~
vvanders
As someone who's lived in both spaces(GameDev and Phone UI/UX engine
development) there's certainly similarities but there's also some pretty stark
differences.

For instance you're given no guarantees for execution time on a phone. That
slice of time that Sony/MS takes for their overlay that's mandated to no less
than x% of a frame? Doesn't exist on Android/iOS. The OS is welcome to wake up
some background process(or another app on Android) and steal away one of your
cores.

From a development side you just don't have the same resources to dedicate to
performance on phone development that you get in gamedev. Combined with a
culture that doesn't value performance as much(hello Java) that's why you see
different results. Google/Apple is targeting the guy in his garage who wants
to put out something in ~3 months. Rarely do you see the development times
that games have and that is where the divergence happens.

~~~
iainmerrick
Another difference (when it comes to games programming) is that Android phones
in particular are incredibly varied, and the GPU drivers are often _really
bad_ so moderately non-trivial code can easily crash the whole phone. The
upshot is that you have to code very carefully to a small subset of OpenGL ES,
which limits the clever stuff you can do do improve performance.

For example, trying to share your GL context across multiple threads is a good
way to crash or hang your Android app, even though in principle it's supposed
to work.

Windows hardware is also very varied, but it seems like desktop Direct3D
drivers are relatively good compared to mobile GL drivers. (OpenGL drivers,
unfortunately, are also really bad on desktop.)

------
mungoid
If you use Nvidia Nsight you can see this exact same stuff happening every
frame. Pretty nice tool to use if you ever wonder whats going on in your gpu
every frame. We use it frequently for our simulation work.

~~~
chrisseaton
What do you mean by 'actually'? The fact that you can use a tool to do it as
well doesn't mean anything the article says is wrong.

~~~
mungoid
I never said anything in the article was wrong. I liked the article. The
'actually' part was just a bad habit typo I hadn't noticed until right now so
I fixed it ;-)

------
enimodas
I wonder if he was able to do this analysis with the original binary, or that
he used the very recent (2 days ago) crack that removes the denuvo "anti-
tamper" system.

~~~
yuriks
This kind of thing is just done using a graphics debugger. It runs fine on the
original binary:
[http://i.imgur.com/GmeqKT5.png](http://i.imgur.com/GmeqKT5.png)
[http://i.imgur.com/TXksZJj.png](http://i.imgur.com/TXksZJj.png)

------
JoelBennett
Neat write-up. I had no idea screen space reflections were a thing.

~~~
joakleaf
Actually, this was sort of a thing already back in the 90s...

There is an alpha of Duke Nukem 3D (LameDuke) which had some screen space
reflections. As I recall, the game crashed when you look up or down on the
reflections, likely because of a pixel read beyond screen boundaries.

Discussion here:
[https://forums.duke4.net/topic/1329-lameduke/](https://forums.duke4.net/topic/1329-lameduke/)

~~~
tripzilch
IIRC, and I don't know if it's the same with this alpha version, but I
remember messing around in a level editor for the original Duke Nukem 3D, and
mirrors were done simply by having an adjacent room with mirrored geometry :)

(and, I assume marking the wall between as a mirror so it knows to also render
the dynamic objects mirrored--but I don't know for sure, I was quite young and
didn't have a lot of success with this level editor because I didn't
understand it fully)

------
Razengan
I'm a noob regarding 3D engines/hardware and have a question: Why haven't we
moved engines to the 3D hardware?

Like, why can't we have a high-level engine running on the GPU itself, updated
through drivers, and just feed it a monolithic file containing the game
level's entire geometry, for example?

So that developers can say, here's the world, here's the textures, here is the
models for monster A, monster B..and then just update each model's location
and the camera position every frame?

~~~
ajuc
We do upload everything, when it fits and makes sense. But with streaming and
level of details - you dont waste hardware on invisible or barely visible
stuff, so the visible stuff can get more details.Of course you can hit
bandwidth limit or maintaining what's visible can use too much cpu, so it is a
tradeoff. But usually opimum is not "just gpu".

Also postion is not enough, but that's details.

~~~
Razengan
What I mean is, why don't GPUs _come with_ the equivalent of id Tech or Unreal
Engine or CryEngine on the hardware?

Seems to me that if a certain tech is used across multiple games, couldn't it
be factored out into the hardware itself?

~~~
ajuc
GPU is bad at many tasks, has no direct access to disk, way less memory, you
would have to build cpu in, and add interfaces to network, disk, sound, input
devices. And why? The tech is already factored even between engines -
libraries exist. The part of engine that benefit from being on GPU is uploaded
there already just not in factory,but when you start a game, so it is
customizable, so you can run new engine on old card.

------
iammyIP
The id tech5 engine for rage was already very impressive and ran extremely
well on my mediocre machine, while still looking beautiful. Felt like my
computer suddenly was twice as capable.

I wonder why the article mentions this: "Unlike most Windows games released
these days, DOOM doesn’t use Direct3D.".

Implementing Direct3d today seems a waste of development time to me and a
useless self-restriction to a platform. Why would anyone do that? Is there a
source that compares release titles of direct3d games vs opengl/vulkan on
windows?

~~~
theandrewbailey
Most big time game dev targets consoles in addition to Windows. Each console
has its own incompatible graphics API. When there is no business imperative to
support PCs that don't run Windows, "useless self-restriction" is irrelevant.

From what I've heard, Direct3D (up to 11) and OpenGL work somewhat similarly,
as will Vulkan and Direct3D 12. If a dev has already abstracted their engine
to support a console (or two, or three), supporting another PC graphics API
isn't that big of a deal, until driver bugs appear. Which they inevitably do;
that's why new drivers appear suspiciously close to big game releases.

~~~
iammyIP
Yes, i somehow had the impression that ps4 used opengl, but they use some own
cooked gl fork. So my point is more about pc games i guess, since opengl runs
on all major oses. The only reason for d3d seems to be the xbox.

~~~
Narishma
PS4's API has nothing to do with OpenGL. It has more in common with Vulkan and
D3D12.

~~~
iammyIP
Indeed ps4s GNM seems to be more oriented to dx. So what? Consoles are a
boring target anyways.

~~~
Narishma
It doesn't have anything to do with DX either. It's a custom low-level API
that's an evolution of the PS3's libGCM. As I said, it's closest counterparts
on PC would be Vulkan or D3D12.

------
Amanjeev
Is it worth playing online? I play solo (couch) but was wondering if it is any
good to get PS online subscription for this.

------
AJRF
Doesn't this kind of breakdown make the explanation more complicated? Maybe
it's my idiotic brain but I think of everything in terms of that one scene and
can't extrapolate the Information to various scenarios.

~~~
pfranz
I'm thinking the target audience is other game developers.

Most modern game engines have most of the features they talk about (the
article really good about linking to sources), but those pieces are organized
in a different manner so you end up with different restrictions, changes in
performance, or scalability to different hardware / scenarios.

The novel thing here is how they put together the pieces, not the pieces
themselves. Most cutting edge articles are about a specific technique, so it's
really good to see how it all fits together in an article like this.

~~~
AJRF
Yeah I think it's just my gaps in knowledge that make it hard to follow,
thanks for the explanations :)

------
tbrock
Oh wow, I had no idea id had another hit on their hands. I just finished
reading "Masters of Doom" and was craving some of the classic doom gaming
experience that I had growing up.

------
resist_futility
Anyone know of good examples of source code applying these sort of techniques
together?

------
edgartaor
And still some people says video games are not art.

~~~
Retra
Who says this?

~~~
ShirtlessRod
Didn't you read? "Some people", the most pernicious of all groups.

