If you click on a link and make a purchase we may receive a small commission. Read our editorial policy.

Tech Analysis: Uncharted 2

DF humbled by Naughty Dog's coding power.

The original Uncharted had a simple, but unrefined solution. It was double-buffered, with no v-sync. Put simply, the game is generating a new frame while the old one is still on-screen. If the new buffer isn't complete by the time the frame is supposed to render, it simply displays the unfinished image (creating a torn frame), purges the buffer and repeats the process. It can look ugly when the engine is under stress, but it ensures the fastest possible response from the controller, and ties in perfectly with the 100ms response time I measured for Uncharted.

V-sync can be deployed in a double-buffer situation, but there's a nasty side effect: if the complete frame isn't ready to be displayed, you'll wait until the next screen refresh to see it. During this time the GPU is effectively idle. It's a poor use of resources and it can be very impactful on the frame rate; the game will literally "switch" between 20FPS and 30FPS when the engine is under stress. Metal Gear Solid 4 is perhaps the most noteworthy example of the use of v-sync double-buffering and its impact on performance and controller response. Check out this FPS graph from Metal Gear Online, which uses the same engine:

Metal Gear Solid 4 is v-synced and double-buffered - image consistency takes precedence over frame rate and controller response. Uncharted 2's solution is far more effective.

Uncharted 2 is more ambitious. It aims to eliminate GPU idling and to maintain v-sync; effectively Naughty Dog wants to have its cake and eat it. Instead of flipping between two frames, it employs triple-buffering, holding one frame in reserve. Rather than produce a torn frame, it'll display the reserve frame instead.

The result is that we get the visual performance we always wanted from Uncharted... You get those spectacular visuals, and you get them without a single torn frame in the whole game. It's not really a case of being difficult to program as such, though there are memory implications; the trick is in doing so without impacting performance. As you can see from the level FPS graphs on all the Uncharted 2 vids in this feature, Naughty Dog has achieved it. Compare and contrast with Resident Evil 5 on PS3, which uses exactly the same triple-buffer technique but still has performance issues and the additional controller lag up against the double-buffered Xbox 360 version.

So kudos and various "big ups" to Naughty Dog for pulling it off. But to bring the discussion full circle, there has to be a cost for this level of advanced processing - and the price in this case is that the controller is less responsive. For the sake of visual quality, it's a price well worth paying, and we can demonstrate that in a pretty conclusive fashion. Check out this interesting "what if?" exercise. It's a montage of action from the original Uncharted, with a twist. Using a bit of our own coding magic, we can eliminate all the torn frames from the game's output. In effect, we can simulate Uncharted 2's v-sync on Uncharted 1 video to show the difference.

Check out how Uncharted: Drake's Fortune would've looked if it were v-synced. The result is a massive improvement in image consistency, well worth the small bump in controller latency.

So, it's game, set and match to Naughty Dog with Uncharted 2. The demo code alone demonstrates a hugely impressive utilisation of the PlayStation 3 technology, and the final retail version is bound to offer up even more technical delights. But of course, the real magic here goes beyond the basics of the coding achievement. There's still so much of the game that remains... Um, uncharted. Very little of the single-player mode has thus far been revealed, but what we have seen has been supremely impressive.

More than that, Naughty Dog prides itself on employing Hollywood level production values on all aspects of its game: Uncharted scored highly thanks to its great storyline, its wonderfully realised characters, and the notion that there was a new, exciting spectacle seemingly around every corner. All evidence points to this same philosophy being in effect in the new game, but taken to the next level.

To draw out that Hollywood analogy, Star Wars wouldn't be Star Wars if George Lucas didn't have the technological resources of his satellite effects shop, ILM, on tap. There's a similar relationship between the Naughty Dog dev team and its own technology-centred group, the Worldwide Studios ICE Team. What we have here are creative games people working with acknowledged technical experts, both set on creating the very best piece of entertainment that they can.

Over and above everything I've talked about in this feature, it's this combination that has me most excited about the final game and even before the first reveal back at GDC in April, it was that Naughty Dog philosophy that convinced me that Uncharted 2 would be my personal game of the year. In just a few weeks, I'll find out if I was right...

Will you support the Digital Foundry team?

Digital Foundry specialises in technical analysis of gaming hardware and software, using state-of-the-art capture systems and bespoke software to show you how well games and hardware run, visualising precisely what they're capable of. In order to show you what 4K gaming actually looks like we needed to build our own platform to supply high quality 4K video for offline viewing. So we did.

Our videos are multi-gigabyte files and we've chosen a high quality provider to ensure fast downloads. However, that bandwidth isn't free and so we charge a small monthly subscription fee of £4.50. We think it's a small price to pay for unlimited access to top-tier quality encodes of our content. Thank you.

Support Digital Foundry

Find out more about the benefits of our Patreon

About the Author
Richard Leadbetter avatar

Richard Leadbetter

Technology Editor, Digital Foundry

Rich has been a games journalist since the days of 16-bit and specialises in technical analysis. He's commonly known around Eurogamer as the Blacksmith of the Future.

Eurogamer.net logo

Buy things with globes on them

And other lovely Eurogamer merch in our official store!

Explore our store
Eurogamer.net Merch