gamasutra_ ming-lun chou's blog - a brain dump of what i worked on for uncharted 4
TRANSCRIPT
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 1/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://www.gamasutra.com/blogs/MingLunChou/20160511/272458/A_Brain_Dump_of_What_I_Worked_on_for_Uncharted_4.php
Our Properties: Gamasutra GameCareerGuide IndieGames GDC Vault GDC IGF
GAME JOBS
UPDATES BLOGS EVENTS CONTRACTORS NEWSLETTER STORE SEARCH GO
BIZ/MAR KETING
PROGRAMMING
ART
AUDIO
DESIGN
PRODUCTION
Latest Jobs
View All RSS
May 12, 2016
Insomniac Games
Flash Developer
Insomniac Games
Senior Engine
Programmer
Insomniac Games
Gameplay Programmer
Insomniac Games
Engine Programmer
Insomniac Games
UI Programmer
Insomniac Games
Senior Gameplay
Programmer
Latest Blogs
View All Post RSS
May 12, 2016
Biofeedback and
Gaming: The Future Is
Upon Us (Seriously)
How To Create Game
Worlds
A Brain Dump of What I
Worked on for Uncharted
4 [8]
2015/2016 US Video and
Computer Game
Industry Overview
(Report)
Educational Games: The
Big Picture Part II
Press Releases
May 12, 2016
Blogs
A Brain Dump of What I Worked on for
Uncharted 4by Ming-Lun Chou on 05/11/16 02:22:00 pm
8 comments
The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community.
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.
Original blog post
This post is part of My Career Series.
Now that Uncharted 4 is released, I am able to talk about what I worked on for the project. I mostly worked
on AI for single-player buddies and multiplayer sidekicks, as well as some gameplay logic. I’m leaving out
things that never went in to the final game and some minor things that are too verbose to elaborate on. So
here it goes:
The Post System
Before I start, I'd like to mention the post system we used for NPCs. I did not work on the core logic of the
system; I wrote client code that makes use of this system. Posts are discrete positions within navigable
space, mostly generated from tools and some hand-placed by designers. Based on our needs, we created
various post selectors that rate posts differently (e.g. stealth post selector, combat post selector), and we
pick the highest-rated post to tell an NPC to go to.
SEAR CH
GO
ALL CONSOLE/PC S MARTPH ON E/TABLET IN DEPEN DENT VR/AR SOCIAL/ON LINE
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 2/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://www.gamasutra.com/blogs/MingLunChou/20160511/272458/A_Brain_Dump_of_What_I_Worked_on_for_Uncharted_4.php 2
PR Newswire
Full Swing Golf receives
Golf Digest Editor's
Choice…
Square Enix Holdings
Co., Ltd. Announces
Financial R…
Notice of Differences
between Consolidated
Financial…
View All
Games Press
‘Puzzlepops!’
Out Now on iOS –...
Cooking Fever released
on
Windows Store!
Riff Racer Blasts out of
Early Access and into...
Empire Universe 3 –
Fire at Will in the
New...
nDreams to co-fund and
publish first VR game
by...
View All RSS
Calendar
View All Submit Event
Consumer Virtual
Reality
Vancouver, Canada
05.14.2016
Playcrafting Spring
Expo
San Francisco, United
States
05.14.2016
2016 PlayX4 Game
Show in South Korea,
Game Exhibition
Il-San, South Korea
05.19.2016
2016 PlayX4 Game
Show in South Korea,
Game Exhibition
Il-San, South Korea
05.19.2016
About
Editor-In-Chief:
Kris Graft
Blog Director:
Christian Nutt
Senior Contributing
Editor:
Brandon Sheffield
News Editors:
Alex Wawro
Advertising/Recruitm
ent/Education:
Pocco Jimenez
Contact Gamasutra
Report a Problem
Submit News
Comment Guidelines
Buddy Follow
The buddy follow system was derived from The Last of Us. The basic idea is that buddies pick positions
around the player to follow. These potential positions are fanned out from the player, and must satisfy the
following linear path clearance tests: player to position, position to a forward-projected position, forward-
projected position to the player.
Climbing is something present in Uncharted 4 that is not in The Last of Us. To incorporate climbing into the
follow system, I added the climb follow post selector that picks climb posts for buddies to move to when the
player is climbing.
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 3/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://www.gamasutra.com/blogs/MingLunChou/20160511/272458/A_Brain_Dump_of_What_I_Worked_on_for_Uncharted_4.php 3
Indie Games
Game Career Guide
Blogging Guidelines
How We Work
Gama Network
If you enjoy reading this site,
you might also want to check
out these UBM Tech sites:
It turned out to be trickier than I thought. Simply telling buddies to use regular follow logic when the player
is not climbing, and telling them to use climb posts when the player is climbing, is not enough. If the player
quickly switch between climbing and non-climbing states, buddies would oscillate pretty badly between the
two states. So I added some hysteresis, where the buddies only switch states when the player has switched
states and moved far enough while maintaining in that state. In general, hysteresis is a good idea to avoid
behavioral flickering.
Buddy Lead
In some scenarios in the game, we wanted buddies to lead the way for the player. I ported over and
updated the lead system from The Last of Us, where designers used splines to mark down the general paths
we wanted buddies to follow while leading the player.
In case of multiple lead paths through a level, designers would place multiple splines and turned them on
and off via script.
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 4/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://www.gamasutra.com/blogs/MingLunChou/20160511/272458/A_Brain_Dump_of_What_I_Worked_on_for_Uncharted_4.php 4
The player's position is projected onto the spline, and a lead reference point is placed ahead by a distance
adjustable by designers. When this lead reference point passes a spline control point marked as a wait point,
the buddy would go to the next wait point. If the player backtracks, the buddy would only backtrack when
the lead reference point gets too far away from the furthest wait point passed during last advancement.
This, again, is hysteresis added to avoid behavioral flickering.
I also incorporated dynamic movement speed into the lead system. "Speed planes" are placed along thespline, based on the distance between the buddy and the player along the spline. There are three motion
types NPCs can move in: walk, run, and sprint. Depending on which speed plane the player hits, the buddy
picks an appropriate motion type to maintain distance away from the player. Designers can turn on and off
speed planes as they see fit. Also, the buddy's locomotion animation speed is slightly scaled up or down
based on the player's distance to minimize abrupt movement speed change when switching motion types.
Buddy Cover Share
In The Last of Us, the player is able to move past a buddy while both remain in cover. This is called cover
share.
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 5/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://www.gamasutra.com/blogs/MingLunChou/20160511/272458/A_Brain_Dump_of_What_I_Worked_on_for_Uncharted_4.php 5
In The Last of Us, it makes sense for Joel to reach out to the cover wall over Ellie and Tess, who have
smaller profile than Joel. But we thought that it wouldn't look as good for Nate, Sam, Sully, and Elena, as
they all have similar profiles. Plus, Uncharted 4 is much faster-paced, and having Nate reach out his arms
while moving in cover would break the fluidity of the movement. So instead, we decided to simply make
buddies hunker against the cover wall and have Nate steer slightly around them.
The logic I used is very simple. If the projected player position based on velocity lands within a rectangular
boundary around the buddy's cover post, the buddy aborts current in-cover behavior and quickly hunkers
against the cover wall.
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 6/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://www.gamasutra.com/blogs/MingLunChou/20160511/272458/A_Brain_Dump_of_What_I_Worked_on_for_Uncharted_4.php 6
Medic Sidekicks
I was in charge of multiplayer sidekicks, and I'd say medics are the most special among all. Medic sidekicks
in multiplayer require a whole new behavior that is not present in single-player: reviving downed allies and
mirroring the player's cover behaviors.
Medics try to mimic the player's cover behavior, and stay as close to the player as possible, so when the
player is downed, they are close by to revive the player. If a nearby ally is downed, they would also revive
the ally, given that the player is not already downed. If the player is equipped with the RevivePak mod for
medics, they would try to throw RevivePaks at revive targets before running to the targets for revival;
throwing RevivePaks reuses the grenade logic for trajectory clearance test and animation playback, except
that I swapped out the grenades with RevivePaks.
Stealth Grass
Crouch-moving in stealth grass is also something new in Uncharted 4. For it to work, we need to somehow
mark the environment, so that the player gameplay logic knows whether the player is in stealth grass.
Originally, we thought about making the background artists responsible of marking collision surfaces as
stealth grass in Maya, but found out that necessary communication between artists and designers made
iteration time too long. So we arrived at a different approach to mark down stealth grass regions. I added an
extra stealth grass tag for designers in the editor, so they could mark the nav polys that they'd like the
player to treat as stealth grass, with high precision. With this extra information, we can also rate stealth
posts based on whether they are in stealth grass or not. This is useful for buddies moving with the player in
stealth.
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 7/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://www.gamasutra.com/blogs/MingLunChou/20160511/272458/A_Brain_Dump_of_What_I_Worked_on_for_Uncharted_4.php 7
Perception
Since we don't have listen mode in Uncharted 4 like The Last of Us, we needed to do something to make
the player aware of imminent threats, so the player doesn't feel overwhelmed by unknown enemy
locations. Using the enemy perception data, I added the colored threat indicators that inform the player
when an enemy is about to notice him/her as a distraction (white), to perceive a distraction (yellow), and toacquire full awareness (orange). I also made the threat indicator raise a buzzing background noise to build
up tension and set off a loud stinger when an enemy becomes fully aware of the player, similar to The Last
of Us.
Investigation
This is the last major gameplay feature I worked on before going gold. I don't usually go to formal meetings
at Naughty Dog, but for the last few months before gold, we had a at least one meeting per week driven by
Bruce Straley or Neil Druckmann, focusing on the AI aspect of the game. Almost after every one of these
meetings, there was something to be changed and iterated for the investigation system. I went through
many iterations before arriving at what we shipped with the final game.
There are two things that create distractions and would cause enemies to investigate: player presence and
dead bodies. When an enemy registers a distraction (distraction spotter), he would try to get a nearby ally
to investigate with him as a pair. The closer one to the distraction becomes the investigator, and the other
becomes the watcher. The distraction spotter can become an investigator or a watcher, and we set up
different dialog sets for both scenarios ("There's something over there. I'll check it out." versus "There's
something over there. You go check it out.").
In order to make the start and end of investigation look more natural, I staggered the timing of enemy
movement and the fading of threat indicators, so the investigation pair don't perform the exact same action
at the same time in a mechanical fashion.
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 8/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://www.gamasutra.com/blogs/MingLunChou/20160511/272458/A_Brain_Dump_of_What_I_Worked_on_for_Uncharted_4.php 8
If the distraction is a dead body, the investigator would be alerted of player presence and tell everyone else
to start searching for the player, irreversibly leaving ambient/unaware state. The dead body discovered
would also be highlighted, so the player gets a chance to know what gave him/her away.
Under certain difficulties, consecutive investigations would make enemies investigate more aggressively,
having a better chance of spotting the player hidden in stealth grass. In crushing difficulty, enemies always
investigate aggressively.
Dialog Looks
This is also among the last few things I worked on for this project.
Dialog looks refers to the logic that makes characters react to conversations, such as looking at the other
people and hand gestures. Previously in The Last of Us, people spent months annotating all in-game
scripted dialogs with looks and gestures by hand. This was something we didn't want to do again. We hadsome scripted dialogs that are already annotated by hand, but we needed a default system that handles
dialogs that are not annotated, which I put together. The animators are given parameters to adjust the
head turn speed, max head turn angle, look duration, cool down time, etc.
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 9/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://www.gamasutra.com/blogs/MingLunChou/20160511/272458/A_Brain_Dump_of_What_I_Worked_on_for_Uncharted_4.php 9
Jeep Momentum Maintenance
One of the problems we had early on regarding the jeep driving section in the Madagascar city level, is that
the player's jeep can easily spin out and lose momentum after hitting a wall or an enemy vehicle, throwing
the player far behind the convoy and failing the level.
My solution was to temporarily cap the angular velocity and change of linear velocity direction upon impact
against walls and enemy vehicles. This easy solution turns out pretty effective, making it much harder for
players to fail the level due to spin-outs.
Vehicle Deaths
Driveable vehicles are first introduced in Uncharted 4. Previously, only NPCs can drive vehicles, and those
vehicles are constrained to spline rails. I was in charge of handling vehicle deaths. There are multiple ways
to kill enemy vehicles: kill the driver, shoot the vehicle enough times, bump into an enemy bike with your
jeep, and ram your jeep into an enemy jeep to cause a spin-out. Based on various causes of death, a death
animation is picked to play for the dead vehicle and all its passengers. The animation blends into physics-
controlled ragdolls, so the death animation smoothly transitions into physically simulated wreckage.
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 10/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://www.gamasutra.com/blogs/MingLunChou/20160511/272458/A_Brain_Dump_of_What_I_Worked_on_for_Uncharted_4.php 1
For bumped deaths of enemy bikes, I used the bike's bounding box on the XZ plane and the contact position
to determine which one of the four directional bump death animations to play.
As for jeep spin-outs, I test the jeep's rotational deviation from desired driving direction against a spin-out
threshold.
When playing death animations, there's a chance that the dead vehicle can penetrate walls. I used a sphere
cast, from the vehicle's ideal position along the rail if it weren't dead, to where the vehicle's body actually is.
If a contact is generated from the sphere cast, I shifted the vehicle in the direction of the contact normal by
a fraction of penetration amount, so the de-penetratiton happens gradually across multiple frames, avoiding
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 11/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://www.gamasutra.com/blogs/MingLunChou/20160511/272458/A_Brain_Dump_of_What_I_Worked_on_for_Uncharted_4.php 1
positional pops.
I did a special type of vehicle death, called vehicle death hint. They are context-sensitive death animations
that interact with environments. Animators and designers place these hints along the spline rail, and specify
entry windows on the splines. If a vehicle is killed within an entry window, it starts playing the
corresponding special death animation. This feature started off as a tool to implement the specific epic jeep
kill in the 2015 E3 demo.
Bayer Matrix for Dithering
We wanted to eliminate geometry clipping the camera when the camera gets too close to environmental
objects, mostly foliage. So we decided to fade out pixels in pixel shaders based on how close the pixels are to
the camera. Using transparency was not an option, because transparency is not cheap, and there's just too
much foliage. Instead, we went with dithering, combining a pixel's distance from the camera and a
patterned Bayer matrix, some portion of the pixels are fully discarded, creating an illusion of transparency.
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 12/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://www.gamasutra.com/blogs/MingLunChou/20160511/272458/A_Brain_Dump_of_What_I_Worked_on_for_Uncharted_4.php 12
Our original Bayer matrix was an 8x8 matrix shown on this Wikipedia page. I thought it was too small and
resulted in banding artifacts. I wanted to use a 16x16 Bayer matrix, but it was no where to be found on the
internet. So I tried to reverse engineer the pattern of the 8x8 Bayer matrix and noticed a recursive pattern.
I would have been able to just use pure inspection to write out a 16x16 matrix by hand, but I wanted to
have more fun and wrote a tool that can generate Bayer matrices sized any powers of 2.
After switching to the 16x16 Bayer matrix, there was a noticeable improvement on banding artifacts.
Explosion Sound Delay
This is a really minor contribution, but I'd still like to mention it. A couple weeks before the 2015 E3 demo, I
pointed out that the tower explosion was seen and heard simultaneously and that didn't make sense. Nate
and Sully are very far away from the tower, they should have seen and explosion first and then heard it
shortly after. The art team added a slight delay to the explosion sound into the final demo.
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 13/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://www.gamasutra.com/blogs/MingLunChou/20160511/272458/A_Brain_Dump_of_What_I_Worked_on_for_Uncharted_4.php 1
[View All Jobs]
Insomniac Games —
Burbank, California,
United States
[05.11.16]
Flash Developer
Insomniac Games —
Burbank , California,
United States
[05.11.16]
Senior Engine
Programmer
Insomniac Games —
Burbank , California,
United States
[05.11.16]
Gameplay Programmer
Insomniac Games —
Burbank , California,
United States
[05.11.16]
Engine Programmer
Traditional Chinese Localization
I didn't switch to Traditional Chinese text and subtitles until two weeks before we were locking down for
gold, and I found some translation errors. Most of the errors were literal translations from English to
Traditional Chinese and just did't work in the contexts. I did not think I would have time to play through the
entire game myself and look out for translation errors simultaneously. So I asked multiple people from QA to
play through different chapters of the game in Traditional Chinese, and I went over the recorded gameplay
videos as they became available. This proved pretty efficient; I managed to log all the translation errors I
found, and the localization team was able to correct them before the deadline.
That's It
These are pretty much the things I worked on for Uncharted 4 that are worth mentioning. I hope you
enjoyed reading it. :)
Related Jobs
Loading Comments
TECHNOLOGY
PORTFOLIO
Black Hat
Cloud Connect
Dark Reading
Enterprise Connect
Fusion
GDC
GTEC
Gamasutr
a
HDI
ICMI
InformationWee
k
Interop
Network Computing
No Jitter
Tower & Small Cell
Summit
COMMUNITIES SERVED
Enterprise IT
Enterprise
Communications
Game Development
Information Security
IT Services & Support
WORKING WITH
US
Advertising
Contacts
Event Calendar
Tech Marketing
Solutions
Contact Us
Licensing
8/17/2019 Gamasutra_ Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
http://slidepdf.com/reader/full/gamasutra-ming-lun-chous-blog-a-brain-dump-of-what-i-worked-on-for 14/14
5/12/2016 Gamasutra: Ming-Lun Chou's Blog - A Brain Dump of What I Worked on for Uncharted 4
Terms of Service Privacy Statement Copyright © 2016 UBM, All rights
reserved
| |