Search This Blog

Showing posts with label iD. Show all posts
Showing posts with label iD. Show all posts

Wednesday, January 31, 2018

Lessons Learned from Deus Ex: Mankind Divided (DEMD)


Minor update: In the lower portion I have some errors which were corrected by Sylvain Douce, the Senior Technical Designer @ Eidos Montreal (who made DEMD).  He states:

"Very good piece! One minor things: AI middleware we used for DXHR and DXMD is Navpower ( ), everything else was built in-house."

Also, it's extremely awesome of him to read it, enjoy it, and retweet it! Thanks a lot Sylvain!

---------------------------------------------------

I don't think it's any great secret that I love Sci-Fi, especally cyberpunk dystopian themed sci-fi.   While I find Bladerunner a bit droll, the environment it helped create persists as one of my favorites.  So Deus Ex games have long fit into my inventory of favorites and this game was no exception.  I absolutely loved Human Revolution so it was only natural I'd eventually get around to playing through Mankind Divided.

Now for reference I should mention this was played through on PS4.  This means it almost always is going to be somewhat graphically optimized to improve the speed and provide a fluid experience on a console.

I've decided to do a rather lengthy deconstruction of the game as it pertains to Independent Gamedevs specifically using Game-Guru.  Others may find it useful, your miles will invariably ... vary.

First of all, it bears mentioning this game was developed using the 'Dawn Engine.' created by Eidos- Montreal.

The engine is not without some controversy due to some issues with load times.  Overall though, it's a fairly stable engine that ran relatively well in my instance.  It did, however, seem to lack some of the really high end features that can set apart an engine.  From what I could tell though:

  • It seems to have been developed directly for DEMD as no other games have used it since it's inception in 2014.
  • it has reasonably high graphical fidelity with low framerate cost.  I will discuss this in greater detail below.
  • The AI package used was very good, albeit it's middleware (APEX AI).  There's actually a fair amount of middleware, but that's not tremendously surprising. (SEE ABOVE)
  • The game engine is apparently a heavily modified glacier 2 engine.  For those not aware, that's the 'Hitman' game engine.  I recommend reading the linkthrough for a highly technical summary of what the Dawn Engine encompasses.

That all aside, let's begin our lesson.

Graphical/Lighting tricks

Deus Ex: Human Revolution gave us great gameplay in a fantastic looking game.  Deus Ex: Mankind Divided is no exception.   There are a lot of extremely fancy tricks used to produce great framerates while providing a very impressive visual experience.

The first thing you'll notice, if you're new to Deus Ex, is there is no more 'gold filter'.  This means the scenes feel less cohesive if they're not built specifically to match.  While the gold filter is a bit of a bludgeon, it did give a sense of character to DEHR that is somewhat lost in DEMD.  DEMD however makes up for it in spades by having a significant amount of purpose built coloration in the scenes while at the same time using giving identity to each area.  On one hand they lose the 'Deus Ex' filter but gain individuality in each scene.  It was a reasonable tradeoff.

Gold filter comparison
Modders removed the gold filter and added some fidelity in DEHR, but it also serves as a good example of the type of difference you see between DEHR and DEMD.


I am big fan of using colors to 'unify' the palette so that a scene feels more cohesive.  This technique artistically speaking is useful for helping to help join together disparate textures which I have a massive quantity of due to many different artists providing many different assets for my use over the years.  In my case, I'd have kept the gold filter or color tone map (assuming you are using reshade).  All in all though if you have a ton of custom art in a lot of wildly different locations like DEMD did, it makes more sense to not filter them all through a gold lens.




PBR and resource management.

DEMD uses a physically based rendering pipeline which allows for some really impressive visuals.  While mirrored surfaces don't look particularly impressive, the shine on the floors is really good.  Certain elements of the environment really stand out, notably pipes.  These shiny surfaces help you realize that in terms of our own engine (GameGuru) which recently obtained PBR capabilities we'd want to use them selectively on things that BEST show them off.  While it's nice to have every single thing in your game use it, it simply eats too many resources.  Selectively choosing the best scenes for it (shiny metal, hardwoods, glass, etc) is a much more attractive option than putting it on bland surfaces where you receive minimal visual 'pop' like concrete.  This in turn helps us save vital resources, which is a struggle with a 32 bit engine like Game-Guru.

pbr example
Check out the subtle nuance of those textures and their PBR materials!

The reflections used localized cubemaps which are definitely available in Game-Guru so that's a nice addition on Lee and Preben's part which will allow us to create beautiful reflections  on pipes and mirrors.

Transparencies on light planes

DEMD cleverly uses light planes with alpha-transparencies to create the illusion of 'dust' in the air.  The game supposedly has volumetric density for the engine, but I suspect they de-tuned it for the PS4.  If that's the case, at least it's given us a specific example we can draw from.

Streams of light
Those streaming beams of light look more like vertical 'planes' from head on.

Take for instance the above picture.  I walked back and forth and noticed several clear planes (2 dimensional flat objects in a 3d space).  Now granted, it was probably algorithmic or volumetrically done but we can reproduce the same effect with this basic texture for our plane in Game-Guru:


Poorly drawn image by yours truly
Yeah, I got lazy and made the last line too wide.
So basically what we have here is a series of blank spaces that are alpha masked completely open.  Then I took the 'filled' areas, put in a white to grey gradient, then created an alpha mask off those as well.  This gives us a semi-transparent 'beam' of shadowed area.  So we basically get the OPPOSITE effect of what we see above.  Give it a try with your own plane.  I'll probably put one of these on the store (for free) once I correct the mistakes made in the above file.

Flares on lights that  get a lot of attention

In the opening area of the main game you begin in Adam Jensen's house, which acts as a sort of technical demo for the game.  In that location if you look up you'll see a significant amount of studio lighting but notably they use a flare decal that is facing the player.

lightflares example
Those are circular lights with a line-shaped flare.
 We can achieve this same effect using a decent flare and the player_facing.lua script that is included with game-guru.  One thing that DEMD did really well though was it's occlusion; when you are NEAR a corner the flare switches off subtly so that it looks seamless.  Overall, a fairly simple but nice looking effect is achieved.

Baked lighting 90% of the time. 

These days, a lot of games really rely on  dynamic lighting.  It's fancy, it looks nice, and it's GPU intensive.  It also has clear limitations which are another topic for another time.   Deus Ex uses an updated older technique, notably Tiled Lighting that's baked in.  This allows high speed renders of scenes where the light is not likely to change and also allows the artist a great degree of control if they're willing to invest the time.

DEMD Prague outdoors static lighting example
You start to see it everywhere the more you start looking for it.

Unfortunately Game-Guru cannot do dynamic lighting very well and as such it leaves us in a pickle a lot of the time. However in DEMD they do a LOT of baked lighting and it shows.  This game is virtually a showcase for 'how to do static lighting the right way'.  Color choices are not obtrusive, are placed to provide windows with indoor light.


Jensen's apt indoors static lighting example
The red circle shows where the light is, outside (approximately 30ft behind the wall).


Note the placement of the light and how it streams in through the window.  It bakes cleanly onto the surface and gives it a nice 'early day' feel.   This same technique can be done with Game-Guru, rather than relying on 'sunlight' - we pre-bake static lights outside of a window to provide the building interior with realistic lighting.

Clever transitioning

One interesting element I think is worth mentioning is, as the heading suggests, 'clever transitioning'.  While many levels simply pop you to a loading screen, moving about the main city of Prague gives you a varied scene (depending on where you are going to or coming from).

Jensen looking bad AF on a train
The screen changes perspective several times and the characters all move around to provide a sense of 'aliveness'.
The only downside is the animation is repetitive, but that makes sense given it's literally just a facade over a loading screen.  While I realize loading screens are effectively the devil I thought it was worth mentioning it.  I don't have an answer for Game-Guru in that respect as our loading system is vastly different but I think it at least underscores the need to give people something to look at other than the basic 'Game-Guru loading screen'.   The best answer is probably something like the other loading screens in Deus Ex, which effectively consist of a picture and some information for the player to read.

Have a mini-game 

The hacking mini-game remains mostly unchanged from DEHR but really felt at home in this game. While it's a lot of extra work, at the same time it can really provide a payoff for the player who needs some variety in their game beyond the usual 'shoot or sneak' methodology.

Dat hacking minigame bro
Oh no, only 2 seconds left! ABORT! ABOOOOOORT!

Often I found myself in a higher sense of tension from the hacking minigame than the actual game itself.  Sometimes even the threat of discovery while hacking (the world doesn't just stop while you're hacking) provided it's own 'sinking feeling' while you were ferociously attempting to subvert system nodes to bend an non-compliant computer to your will.  While the additional 'sink' of adding a mini-game is seemingly unnecessary, it also adds a lot of play value to a game.

A living city

I have a good friend who also is very into Deus Ex; he's actually the one who first pointed me at Human Revolution, even bought my copy back when I was flat broke.

I asked him what he thought of Mankind Divided, without spoiling anything.  He replied "it's a great game, they really did a great job of making it feel like a living city."

I felt that was worth mentioning here given how spot on his analysis is.  This game really does a great job of making you feel like you are in a living, breathing, ALIVE environment.  Each area has tons of sandboxing and detail which makes every single space different and independent.  So how did they do it?

Lips on a building!
The red light district, for instance, really takes it's name to heart.

Well, foremost - each area is it's own 'scene'.  It's as if they built one overarching area, built the major components, then filled in the rest with minor story pieces.

Meow
This room exemplifies the microcosm within macrocosm feel.
 
There's a world of microcosms within the macrocosm of the individual 'global' level and it really provides this deep sense of uniqueness to each specific room.  The stories for these rooms aren't anything significant most times.  Often they are simply something as simple as 'this is the asshole gang dealer who doubles as your local black market shop' room.  Other times small rooms take massive twists and turns, such as the crazy cat lady who ends up having her own miniature story that makes her a much CRAZIER cat lady.

While often the rooms are 'revisited' for story purposes and such you can pretty usually boil them down to a basic, simple story.   Obviously the indy dev can't afford the time to write a massive, engrossing story for each sub-mission in their game.  Which apparently, neither can AAA devs.  Which brings me to my next point.

Secrets are simply unexplored areas 

In my "Lessons learned from Doom's Level Design (part 1) (part 2) (part 3) (part 4) " I discuss use of secrets and their necessity for gaming.  It's something that helps reward a player for investing even more time in their game than absolutely required.  I mean let's face it, most people play games to feel rewarded, to enjoy the satisfaction of accomplishing a challenge.  Deus Ex rewards this in spades by ensuring that every single hidden area is replete with it's own set of rewards ranging from extra ammo to hidden secret rifles.  I still remember being in the ARC headquarters level and going down literally 5 or 6 stories on tiny rails just to find a hidden rifle.  It was an insane amount of detail for a single secret, but these are the types of things players remember.

ARC: the throat secret gun
I was being literal in the literal sense.  That yellow dot is where you start at before worming down to the gun.


Try to use your dead ends and open spaces to provide the players with additional reward for looking at your hard work.  Open up your single alleyways into branching paths that lead them to interesting rooms that really are just there to provide life and depth to the game.

Open ended level design

Deus Ex games have been renowned for their  open ended level design but it's worth discussing, at least briefly here how it was implemented in DEMD.  DEHR had a fair amount of 'open-endedness' to it, but I think in this case DEMD gets the upper hand.  You literally had piles of avenues to perform different possibilities.  Missions had more than one failure or success condition and you often had branching trees that could spell serious disaster later on.

I remember in mission one, I was helping out an agent (Singh).  You are to save his life at the end which is no small feat as you're attacked by masked assassins in a sandstorm.  It is, in short, a train wreck of a situation. Keeping him alive is incredibly difficult.

Dubai: sandstorm
I'm sure you'll see him if you just keep staring long enough.
 I did this, but only to have him die later in the game because I neglected one small sub-objective on that same mission of disabling a communications tower.  This causes him to get killed while undercover as his cover was blown.  Little things like this are like a spaghetti plate of decisions, which require lots and lots of planning.  That means writing things down.  Which also means, you guessed it, a design document - and we all know that's basically the same thing to an indy dev as garlic to a vampire.  Sure, it won't kill you... but it's damned uncomfortable.

Multiple answers to singular problems.


Moreover level design is incredibly fluid; you have lots of answers to single problems.  This means you often have the choices of going in loud by shooting everything in sight, hacking your way in via a console, taking rooftop access stealthily, running through vents to come up behind your foes, or a myriad of other alternate choices that often boil down to 'get from point a to point b'.

Palisade bank
There are about a dozen ways in and a dozen ways through the 'uncrackable' Palisade bank.


This depth of level design is a big draw for this game type, allowing players to really dig in and pick how they want to do things.  Sometimes you just want the pure visceral thrill of unloading a 28 round magazine from a fully automatic pistol into some poor bastard who dared to wander too close.  Other times hitting people with tranquilizer darts in the neck out of sight of others is the better tactical choice.  These types of dynamics often aren't so much planned as they are a result from thorough level design and planning with a focus on building multiple avenues of approach for a single objective. 

Intelligent AI design

The AI in this game is something else.  There are a lot of times where you feel like you want to really get in there and mix it up and find yourself dealing with attacks from both sides.
While a lot of this has to do with level design (alternate routes, enemy placements, the location of an enemy taking the shortest route to your location) it also has a lot to do with an intelligent system that is attempting to find the best way to kill you.  It's impressive and not easily duplicated.  Maybe one day we'll have that depth in Game-Guru, though at this point in time your best method will be use of lots of navigation nodes and good enemy placement.

Wrapping up

All in all, I found myself least interested in the main story, which is the unfortunate side effect of having an impressive game with great mechanics.  I can't think of anything about the game I really hated.  Everything played well and it served as a great teacher to a willing student.  I highly recommend you give it a run through and see what you can learn from it too!

Addendum: 


There's a pick up objects script you can use to create a similar style to Deus Ex found here:
https://forum.game-guru.com/thread/207801?page=16#msg2562166

Monday, January 18, 2016

Lessons Learned from Doom 1: PT 2 - Romero's *New* Level Design.

Warning: Long post/Profanity ahead.
This is an update post based on this:

http://gamegurureport.blogspot.com/2015/12/lessons-learned-from-doom-1-pt-1.html

John Romero made a replacement e1m8 level.  I messaged him on twitter, let him know I did a review of his Doom 1 level design rather recently... and he replied indicating that he might be interested in further review.  So rather than make some impromptu write up over this weekend while I was grinding for a Cicada 2A in Mechwarrior Online (which I play a considerable amount of) - I decided to give this thing a proper run through.  I cannot understate my excitement here.  A god of gamedev not only knew I existed but had read a post of mine on his work.  Further, he had redone a level I absolutely hated.  I always felt E1M8 was sort of a weak conclusion to what was otherwise an EPIC first chapter of Doom.  It's no secret I love that first episode, having gamed it to oblivion over the past 20 years. 

I WAS NOT PREPARED.

Let me make this abundantly clear; I went into this thing knowing how John Romero recommended playing it:  Old school - start with a pistol, no mouselook, no jumping, no cheats (of course) and in my case - ultraviolence difficulty.

I also kept my usual setup:  smoothdoom + textures and 'fast' enemies.  Doom64 weapon graphics (except the pistol; original pistol is the best!), blood sprites, gore sprites, weapon shell casings.. etc.  Mouselook and a crosshair because I don't think I can send myself that far back in time.  No sound because I don't have that luxury at the moment.  So that's an added difficulty I impose on myself as well.

Yeah, this should be fine.  No problem.


I quickly learned how mistaken I was.  Romero was NOT fucking around.  Not a single - damn - bit.

This is literally the first room and probably my fourth or fifth death.

 Remember this?  Well - 20 years later, it happened.

So ... I had to turn fast monsters off.  I was simply getting mauled with that setting on with no gear to speak of.  I tried again and... dead.  Even on standard ultra-violence with just a pistol I was having difficulty.  Luckily I had a recent save from a play-through where I'd stopped on E1M7.  


Ready to go, clearly this will be enough (I hoped).

Side note: You'll notice the weapons 6 and 7.  That's because on this play through I wanted extra weapons like the BFG and Plasma rifle - so I used the cheat code on E1M1 to get them.  However, for the sake of the old school, I swore not to use either.  Bear in mind up to this point I'd been playing just fine with my fast monsters/etc.

 Yep, that did the trick.

So at this point, I'm realizing he really was going for broke.  I'm not going to rehash 'old dogs learning new tricks' or some other trite bullshit.  It doesn't do him the justice he deserves.  

Romero clearly wasn't up to par - he was beyond it.  Gods, after all, don't age.

Around this point I noticed the monster count in the mapper.  291 enemies - that's... pretty substantial alright.  Someone's clearly going to make me earn the 'beat this level' achievement.  Fine.  Let's do this.   On top of that, I was trying to get good shots of the level design.  I noticed he'd kept the map texturing consistent with the old episode of doom.  The Brutalist Architecture was in prime form and every corridor gave me a renewed respect for someone who clearly hadn't diminished in the slightest.

This map, no kidding, is GIGANTIC.  The outdoor area is mindblowing for a doom map.

Refined principles of lighting, design and traps showed that Romero had designed not something for the masses to enjoy.  This was something for himself to enjoy - he just deigned to share it with us.  

 No matter how painful that gift is, we still love it.


Secrets were well placed; they provided a welcome refuge against the literal onslaught of hell-hordes which constantly required piles of brass and a bullet hose to cleanse and purge.  
 
This one, in particular, gave me a wicked grin.  The berserker pack on this map is wicked fun.

Brutal and effective.  The invisible pinkie splits in half quite readily.

One thing that really stood out here was that this map supports a variety of playstyles.  I for one, take a fast but conservative method.  I'm not a big fan of those speed-runs that just get you through the map as fast possible.  I want every ... SINGLE ENEMY DEAD.  Weapons can be anything you want; he's got it setup that if you want shotguns, you use shotguns.  Chainsaws? Fine.  Fists?  Go for it.  Inventive use of barrel explosions?  You betcha.  Whatever you want, this map has it in spades.  It only asks for one thing:

I know this lady.  She's a harsh mistress... but I know what she likes - blood.

Heaping buckets of blood, specifically.

So now for some more critical elements I've picked up while blasting my way through this map:
 
  1.  Romero clearly had an itch to redesign E1M8 - I'm just spitballing here but this is the kind of thing that reminds me of an itch that had never been scratched just right and for whatever reason deemed now was the time to get it right.
  2. He uses a lot more Doom-3 style surprise teleports where the enemy appears behind you and you're left wondering how the hell they got there.  This was a frequent cause of my demise.
  3. Secrets are difficult at times to find and easy at others.  His old tricks of texture maps being slightly off or an out of place color seem cleaner and more efficient.  There are a few that you'll only find if you bang on every wall with a hammer or check the map for obvious wall differences.  A certain one in particular ran me in loops for 30 minutes reloading saves until I finally figured out the right way to make a switch appear.
  4. The sense of awe on this map  can only be known by playing *IN* the game.  I mean it's something to behold, literally.  The colors, the SIZES of the rooms.  The outdoor area - there are many times I just stopped to soak it in.  It's something rarely matched in modern games - let alone a map made in a 20 year old engine.
  5. The use of enemy position on this was far greater than previous work that I've seen.  This was some kind of devil-bastard child of Peterson's traps with Romero's level design.  
  6. One thing I realized here that Romero had that Carmack never did - Romero coded; he was adept at it.  He also did a lot of other things - but eventually ended up doing level design.  Carmack never had that breadth of experience.  It gave him an incredibly powerful but narrow view of game development.  To me, that explains why the life fell away from iD after John Romero's departure.  Carmack is a coding god in his own right - but without the force of energy and passion behind the game you end up with something very rigid, clean, precise - and boring.  Romero's levels are anything but.
  7. Item placement is handled at first with a sort of liberal aplomb but it's actually very well managed; at times you feel like you're starving for an item and then realized `if only I'd have found that secret, this wouldn't be happening`.
  8. Use of color is expertly done with natural contrasts occurring regularly - browns and blues, reds and blacks (See below).
The redesign of this room gave me cold chills on the first glimpse of it.  I knew what was coming and was anxious, happy, thrilled, and fearful all at once.  Note the cell count hasn't wavered.  I stuck to my promise and cleared this bastard using only what I'd earned to this point.

I'm not sure how to wrap this up, honestly.  I'm going to be absorbing what I can from this asymmetric masterpiece for at least the next few weeks.  It will *ABSOLUTELY* take the place of E1M8 for me - in perpetuity.  It's easy to see this was how it should have been.  I can literally forego the rest of the Doom saga - to me - this is all that's needed.  It brings to a close the best episode of the best FPS game I played as a kid.  I am humbled to have witnessed something like this in my lifetime.  It's akin to Leonardo Davinci coming back to life and adding another painting to his original works.  Or, if you're an Ayn Rand fan - it's a bit like hearing Richard Halley's 'Fifth Concerto'.

I truly hope that Romero keeps working on more games; a talent like this should not be wasted.  It's something that can only be gleaned by thousands upon thousands of hours of gameplay, testing, design, and full understanding of  game development as a WHOLE by living through every piece of it.  The world is better off for it, in my very humble(d) opinion.

For now, I am happy to have witnessed and perhaps learned something myself from it.  He's given me a lot to think about, that's for sure.

Monday, December 7, 2015

Lessons Learned from Doom 1: PT 2 - Tom Hall's Level Design.

As mentioned in part one: Lessons Learned from Doom 1: PT 1 - Romero's Level Design.

I love the first doom game.  I've played it every way you can imagine, in every engine you can imagine.  I've played remakes, total conversions, the original hundreds of times - spent years of my teenage life deathmatching and playing co-op.

While I feel John Romero's levels are the pinnacle of what the original Doom can muster level-wise, I still have a huge amount of respect for Tom Hall's level designs.

If you've read the classic "Masters of Doom" book (which you really should) - you understand that Tom's desire for Doom was a bit grander in scope than what we actually got.  A bit slower paced, a bit more realistic with a lot more flexibility and options.  More characters, etc.  You can get a feel for that from the 'Doom Bible' which effectively is the technical design document for Doom that was ultimately scrapped in favor of what they ended up with.  Here's a link for those of you who haven't read it: Tom Hall's Doom Bible

Tom Hall was primarily responsible for the levels of episode 2.

The opening screen of E2M2 - note the structural differences between this and Romero's.

Here again right off the bat you see a big difference in color/lighting.  The tones are flatter, more muted.  They're greys, browns, blacks and yellows.  It's all very rational and very sane.

Tom's work is very representative of what you could consider a 'logical' style.  It's far less abstract than Romero's work but is still exceptionally good - especially in a modern context.  His work was similar to Romero's in use of texture, color, lighting... but he clearly had a completely different process.  Whereas Romero's levels gave you a sense of indoor/outdoor and this massive overarching awe at the implied size of it - Tom literally built these huge ass indoor levels.  I mean HUGE.
Courtesy of doomwiki

This is literally the second map.  The SECOND!  It's titanic.  On top of that, on the north part of the map you see what Tom really invented as a genre - the box maze.  You can literally get lost in piles of endless boxes.

Turn left and wait a sec, where the fuck am I?

The combination of rather bland colors and lighting actually work really well in this context; they provide a sense of loss of direction; everything blends in without being so similar that you completely feel hateful at the lack of texture (like Sandy Peterson's levels).  Tom also loved the monster trap - something he did in exquisite detail.  If you ran full speed down a corridor without looking you'd easily trigger a huge horde of monsters and usually your demise.

This is actually one of the smaller swarms.

Remaining observations are as follows: Tom loves secrets; in fact his levels far and away had more secrets than any others. It wasn't uncommon to find levels that had 10 or 12 secrets on them.  You really had to work to find them too; while some were fairly obvious, others took a while of hunting around just to get the feel for where they were.  Often, it was for a meager bit of ammo, just enough to keep you going.  This is in contrast with Romero's 'big win' method of secrets where a secret almost always gave you a huge boost.

Completing one of Tom's levels gave a real solid sense of accomplishment - like you really worked to earn it!  This was one of the better features of his design.  I didn't really like the fully indoors feel of his work which unfortunately left things feeling closed off.  But the mazes and monster hordes really did create an awesome experience which I believe has influenced many more modern games in a very impactful way.  A lot of what Tom did was based around a notion that this game was going to be different and then he got a rude awakening when the design had moved on without him.  As a result his levels have a different feel and rightfully so.

There's a doom mod that attempts to recreate the experience he intended called 'The Tei Tenga incident'.  It's worth a look if you've never seen it:

Definitely has the feel of one of Tom's levels.

So what can we say we've learned from Tom?  Similar palettes, box mazes and monster traps are all going to find their way into my game.  An avid fan of the secret, I think I'll have to make sure a few more make their way into my levels.

Ciao for now!


Wednesday, December 2, 2015

Just an FYI - I'll be doing a writeup/review of something interesting in regards to game design and theory in the next few days.
Keep your eyes peeled.

Hint, it's about Romero.