Tech Analysis: Uncharted 2 • Page 3

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...

Comments (118)

Comments for this article are now closed, but please feel free to continue chatting on the forum!