Tuesday, November 5, 2013

Blog Quest 3: Part 2...






Everyone's a critic


Katamari Damacy quite literally translated to either 'lump soul' or 'chunk spirit'. It's a game rich with color and personality and a fond memory from my childhood. The game originally came out when I was  only ten and has remained in my game collection since then. The game focuses on novelty, ease of understanding, enjoyment and humor, managing to deliver in these areas continuously throughout the game's storyline and gameplay. The game follows the Prince of All Cosmos as he struggles to repair his binge-drinking father's terrible mistake of wiping out all the stars and celestial bodies "by mistake". Your father, while not all so pleased with having a 5 cm tall son, charges you with the task of going to Earth with a magical ball - that allows anything smaller than it to stick to it and make it grow - to collect enough material for the King to re-create the stars and the constellations. A side-story is also present, but isn't as important to the main story. The gameplay consists of rolling around your magical Katamari and gathering as much material as possible with it before it is launched into space and made into a star.

The characters are comical and creative while the gameplay draws you in and keeps you entertained long past the story. But don't take my word for it, go out there and play the game yourself or just watch this short video to get an overview of the game. 






The gameplay is very simple and it is clear that the game doesn't take itself very seriously. This clearly isn't a bad thing at all. The game features a terrific soundtrack and animations reminiscent of what the west imagines Saturday morning cartoons would be like in Japan. 
This blog is going to analyze Katamari Damcy and it's formal elements, breaking them down one by one and focusing on how they work well together in addition to why the game designers might have chosen them specifically to create a fun and immersive experience for kids of all ages. 






Players

Katamari Damacy follows the trials and tribulations of the Prince a 5 cm tall...well I'm not sure what he really is...who will one day inherit All Cosmos (pretty much the entirety of the universe). You play as the prince on a mission to roll up as much as possible on to your Katamari so that your father and the King of All Cosmos may make them into stars and constellations. Katamari Damacy is primarily single-player with the possibility of co-op play with split-screen mode in multiplayer. From the main menu you are free to veer off to the Giant Space Mushroom where you and a friend may engage in play. 

There are two distinct player interaction modes present in the game, the first of which is single player versus game where you as the Prince take on the world at large with nothing but your Katamari. The second interaction mode would be player versus player where you and a friend face off against each other, competing to build the biggest Katamari from everything in the world. 







Objectives

The Prince's primary objective, as delegated by his father, is to make your Katamari as big as is required to turn it into a star and complete the part of the universe that the King so blatantly managed to destroy. Secondary objectives include picking up secret items in the form of gifts such as the camera that allows you to take in-game screenshots. The first is a royal present that contains an item the Prince can wear while many of the others come in the form of the Prince's many cousins who are then used in the multiplayer modes. Other secondary objectives include substantially surpassing the kings expectations of Katamri size as well as various side quests. These include more specific collecting rules such as gathering as many items (swans, crabs or pairs) within a given time or collecting the greatest item possible (a cow or bear). The player may even attempt a score attack mode in a level where the objective changes to making the greatest Katamari possible in the time allotted. In eternal modes, the player's objective becomes to explore the level with absolutely no time limit. 

Objectives in the multiplayer mode includes collecting the most objects in a three-minute time span as the primary objective with knocking items of your opponents' katamaris being a secondary objective. If the player leads by a large amount, they are able to consume their opponent's katamari. 

The objective categories covered in Katamari Damacy include capture (gathering items in the environment) and exploration (discovering everything in the level as in eternal mode). Smaller objective categories include chasing (chasing creatures in a level or being chased if you're too small) and alignment (where you align items rolled up in the optimal orientation).






Procedures

The starting action in Katamari Damacy is the globe menu from where you may navigate to various options and game modes. You use the standard D-pad and analog sticks paired with the 'X' button to move around and select whatever you want to expand on. The progression of action here can be found through the control scheme where Katamari Damacy chooses to go with a "tank style" approach with the dual sticks. A 'charge and roll' move may be performed by flicking each stick up and down repetitively and a 'quick turn' can be accomplished by depressing both analog sticks. The shoulder buttons are used here to activate look mode from which you can view your surrounding from where you currently are in the world. With the jump move you can launch the Prince up in the air to and beyond the height of his current Katamari in order to look at your surroundings from a different vantage point.

There are no special actions in the game because although there are special objectives, the basic gameplay mechanics, controls and, most importantly, procedures remain the same throughout the game. As far as the resolving action goes, no special action needs to be taken to complete the level, instead, you just wait for the time to run out as dictated by the system procedures. However, one of the side quests requires the player to decide and select when to end the level. Procedural limitations include not being able to roll over object bigger than the Kartamari and not being able to roll to places that are not accessibly to the Prince. Also, in certain situations (like jumping off a table), the limitations include not being able to get back to the platform you were previously on, unless you consume that platform altogether. 







Rules

The rules in Katamari Damacy have been implemented as system procedures. They define the objects and concepts, restrict player actions and determine the effects of these actions. There are explicit rules like the time limit and system procedures such as the AI which is limited in what it can do, what it responds to and how it will interact with the player. Even collision detection may be considered a system procedure in that it works when the Prince collides with another object. Rules defining objects and concepts encompass the Katamari itself as an object the Prince pushes to pick up various items. Most of the objects are simple and represent those from the real world. The time limit, physical boundaries (areas the Prince may not go), and when paths are blocked by obstacles are all examples of rules restricting actions.

Rules determining effects can be seen through the most basic mechanic of picking up an object when you choose to roll over it. An attempt to roll over a big object will cause the Prince to bump up against it and might even knock some items on the Katamari loose. Small animals run away while bigger animals attack the Prince. In this way, proximity to these objects behaves as a rule that determines what happens when within a certain distance of the object.  






Resources

Although all objects in the game can technically be considered resources, small objects are especially valuable and can be collected without throwing off the orientation of your Katamari. Time is the other crucial resource in Katamari Damacy as you need all the time you can get to create the biggest ball possible. 


Conflict

With its simple gameplay and minimal story, some of the only conflict present in Katamari Damacy comes in the form of obstacles, opponents and dilemmas. Obstacles that stand in the Prince's way are large items that may not be added to your Katamari right away due to its relative size. Another important obstacle to note would be the actual terrain upon which the Prince runs around. Often time the terrain can go up and down or have certain areas that stand in the way of the Prince achieving his objective due to their size or shape. Opponents in the game are mainly animals who will chase and attack you if they are bigger than your Katamari in an attempt to try and eat you or hurt you - either way they conflict with your objective by knocking items off and preventing progression. Dilemmas are one of the core mechanics in Katamri Damacy and are one of the many reasons that the game is so fun. The primary conflict in the game stems from deciding where to go when you begin and in what direction to continue rolling your Katamari. Additionally, what objects to pick up right away and which to avoid as well as what areas you should visit and which ones you should stay away from out of fear of being chased by bigger animals. 





Boundaries

Boundaries in Katamari Damacy are especially interesting as they remain dynamic throughout gameplay and are constantly evolving based on perspective. The size of your Katamari dictates what is a boundary and what you may roll over and collect. When your Katamari is too small you may not be able to roll over steps or fences and might bump into larger objects. However, as your Katamari grows, you will automatically be able to explore new areas of the level by rolling over bigger objects and consuming them. At the same time, however, boundaries also exist in preventing you from reaching certain areas of the level if you're too big. Many passage ways and narrow streets will be blocked off when you're too large to go through. 


Outcome

The outcome of meeting the King's objectives is moving on to the next level. This is the sequence of the entire game as you will complete a level and move on to the next one until all levels are complete and the King of All Cosmos has essentially re-built the stars and constellation he managed to destroy. The outcome of successfully completing the game will be to find out how the story ends as you will be rewarded with the ending cutscene. The outcome of failing a level is simply to try again. The outcome of finding a present is having a new item available to use as you move on through the game. Most of these are outfits and decorations as well as characters that are made available to the player in multiplayer mode. Through this system, the player may opt to set a personal best by replaying the level again and again with no real consequence to failing. This makes sense from an enjoyment point of view as the game is made solely for casual humorous play. 







In Conclusion

Katamari Damacy is an excellent video game with a simply concept and brilliantly crafted formal elements that work well together to create an addictive experience. The objectives are plentiful with side quests and special items bringing you back to replay this unique adventure again and again. Part of the brilliance of the game is the manner in which it determines which objects will be able to stick to the ball and which ones the Prince will bounce off. The colors, the music, the animations and the characters bring the game full circle and make it as funny as it is enjoyable. The challenge stems from comprehending the physics behind rolling a giant ball all around town and getting used to where you can and can't go. One of the most captivating details is the interaction of the Prince with the environment he is in and learning the rules that bind gameplay. The game designers really have thought of everything in this game - from the decision of how the rules are portrayed in the level to how the camera is going to work for the Prince to have an overview of everything. without being crushed by the ball itself. I can't see how this game couldn't have been fun to create. 

All the game elements have been laid out here in perfect harmony to create a truly unique and memorable experience for the kid at heart. I feel like the creators went above and beyond in reaching their goal of making Katamari Damacy a novel title that will be remembered a long time after all of its sequels are gone. This game is proof that fresh and original ideas have a strong presence in the gaming industry and that "playing it safe" may be financially sound but won't be remembered fondly as the years go by.








Saturday, November 2, 2013

Designing a game item: Part 2...






Take me down

Burnout Paradise is a remarkably fun game that combines competitive racing with car mashing to create a surprisingly immersive experience that keeps the player wanting more. The premise of the game is simple. Win races to earn money and experience that helps you unlock more areas and buy more cars. It is a fast-paced high-octane joy ride from the beginning right to the very end. There isn't much of a story here, just lots of fun to be had, over 70 cars to try out and multiple race modes to test your expertise at driving on the roads of Paradise City. 

For Burnout Paradise, I would choose to design power-ups that come in the form of orbs along which enhance the player's driving abilities in one way or another. The 4 specific power-ups I'd like to add include SHIFT, RAGE, AGILE, and BURNOUT. Of course the idea of power-ups can be taken to whole nother level allowing for strategic game play in a game that's primarily focused on speed and destruction.

This blog will explore the implications of having such power-ups, how these items will work, what each does and how to use them appropriately. For those of you who may be unfamiliar with the rules of the road, take a look at the following review to get a glimpse into a place where the grass is green and the girls are pretty.







Overview

The power-ups in the game would work like power-ups do in most racing games. They would be scattered across roads encompassing the playing field and may be picked up at the user's discretion. The trick here is that the power up may be stolen via takedown or on the open road before the player can get to it. The power-up will be designed to looks like a floating orb bobbing up and down at various checkpoints throughout the race. Once the player sees the orb he may pick it up or drive around it should he wish to do so. The orb will constantly change color until picked up at which point it'll disappear in being consumed by the player or an opponent. Opponents may not use power-ups but will be able to pick them up in an effort to prevent the player from consuming them. For this reason, power-ups will be placed more strategically around the game world and taking shortcuts guarantee the player a power-up. The opponent AI will not be inclined to pick up a power-up but will do so on random occasions. 

Once picked up, the HUD will display an icon representing one of the four possible power-ups (SHIFT, RAGE, AGILE or BURNOUT). This is completely random and will not depend on which color the orb may be when the player is picking it up. If the player performs a takedown on an opponent that has acquired a power-up, they will immediately consume this power-up. If the player is already in possession of a power-up when this happens, he will automatically switch out his power-up for the opponent's. On the other hand, if a player is taken down, he will immediately loose his power-up to the opponent and may obtain it once more if he exacts revenge. Should the player choose to not use his power-up before he hits another, it will be replaced by another random power-up upon coming into contact with a new orb. Once the player crosses the finish line, an unused power-up is taken completely out of play and can't be used when simply cruising the streets. 

There will initially only be one power-up available to the player and as he progresses in the game (unlocking new cities), he will also unlock new power-ups in races. When the player first begins he will not be given any power-ups in races but will once he moves on to his first big city. The changing colors of power-ups (orbs) on the playing field will be represented by the colors of the power-ups currently available to the player. A player should be smart about using different power-ups with different vehicles. The effects have every chance of multiplying their benefit based on what car type is being used in the race. I will talk about every power-up in the order it is unlocked for the player to use. 





AGILE

Agile is an ability found in many racing games and most recently in GTA 5 where time slows down for a moment allowing the driver to carefully manouever his vehicle to avoid obstacles and traffic in most cases. Burnout Paradise is made to be a game all about speed and destruction, agility doesn't even come into the equation. But what if it did. What if turns could be made with finesse and traffic could be weaved through without problems or causing a huge accident that sets you back a few positions from first? Wouldn't it be nice? Well, with the Agile power-up you can do just that. Slow time down to make that tight turn or to land that stunt jump perfectly without flipping you car or even to avoid a takedown. It's your call, just make sure you use it before it runs out.

Often when playing Burnout Paradise I found myself noticing shortcuts when it was simply too late to turn in time. Now, with Agile, it's a lot easier to just activate your power-up which gives you increased handling and shift your way across 4 wide lanes to get to that shortcut that puts you ahead of your opponents. Of course it's inevitable with such a fast-paced game that you're eventually going to run into anything from oncoming traffic to a railing or a traffic island in the middle of the road. If you have the fortunate foresight to see yourself hitting these obstacles you can simply get Agile and get right out of their way preventing major accidents that slow you down. Agile is most useful with high-speed exotics and mostly motorbikes that get knocked over quite easily and quite often.






RAGE

Rage is powerful and very effective especially in a game like Burnout Paradise. When picked up and activated, Rage initiates a red saturation of everything in the player's view. Anything you now hit will not do any damage to the vehicle and will only serve to get rid of anything in your way. As you tear up the streets, traffic, opponents and cops will simply be propelled away as you blaze through to the finish line. Rage, like Agile, is controlled by time and only lasts a short while allowing you the competitive edge to get ahead in a race or to not have to worry about pesky traffic getting in your way to glory. The best part about Rage is that it doesn't break momentum and allows you to continue on at the same speed you're going at. This means that takedowns don't hinder your velocity at all getting you further ahead faster.

In addition, hitting obstacles accidentally won't be a problem anymore. Essentially, Rage gives the player the opportunity to blaze through the race for a short amount of time, not having to worry about anything that slows you down. In essence, this focuses your attention on driving straight and getting right from point A to point B. Rage is especially helpful when you' need to takedown an opponent but their speed happens to match yours preventing your from performing a take down from behind. Now, you can simply activate Rage and blast right through knocking the rival off the race track altogether. Rage is also a great way to build up your boost quick earlier on in the game. It is important to remember that Rage is most effective with bigger cars but is beneficial for motorbikes that are easily swayed by traffic and often get thwarted because of their speed and size.






SWITCH

This fun power-up gives players the advantage by moving them up an extra position when they take a player down. The way this works is that when a player is behind another and takes him down, he does not only gain his position, but switches positions with the player in front of him essentially making it easier to get to first place. Of course, this power-up may only be used once and will disappear once it has been used to advance. When the switch takes place, the car in the position the player is switching to is shown before the player is teleported there automatically. This helps support the game's positive feedback loop and gets the player where he needs to be faster. If the player takes down the opponent in first place, he remains where he is. Of course, when the player is taken down, he immediately loses his power-up and can't switch. 

This mechanic is pretty straight-forward and is mainly created to help players trailing behind to catch up and get the advantage they need to possibly win the race. As this power-up is strong and gives the player a large advantage, it is introduced later in the game, after RAGE. This power-up stresses takedowns and gets players to ravenously hunt down their opponents in order to gain the extra advantage available with Switch. It focuses the player on dodging traffic, handling well and taking their opponent down. Overall, it adds to the player's satisfaction in finally catching up and taking down the rival that's been plaguing you the whole race through. 






BURNOUT

Burnout is possibly the most useful of all power-ups and is introduced late in the game. On activation, this power-up immediately begins re-filling your burnout meter completely and affords you unlimited boost while replenishing your bar. This mechanic essentially lets you slide right by and take that lead with ease. That is, if you know how to control a car at such high speeds. If you choose not to boost while Burnout is active, you can just allow it to refill your boost meter. If you do choose to boost while it is filling you up, there's absolutely no effect on draining the meter and you can continue using your boost until it's been completely replenished. 

Burnout is best to use when your nitrous is nearly empty and isn't the best power-up to make use of when you're topped up. With Burnout, the player is essentially given the ability to boost constantly for longer period of time. If used correctly, this can allow the player to blaze ahead of the competition one nitrous tank after the other. It is specially helpful when the player hasn't done much to build up their meter and could really use the extra boost. Be warned though, Boost is a powerful item and if used continuously will make the car unstable and increase the sensitivity of the handling when travelling at breakneck speeds in addition to blurring the player's surroundings preventing them from seeing the playing field quite clearly. 

Burnout is the only power-up that will not be stolen when you've been taken down in order to allow you to get back to your position in the race after you've been set back due to a crash. 






In Conclusion

When coming up with a lot of these power-ups I had to think how they would enhance the game and in what way they would change the experience for the player. I believe that they would introduce an interesting dynamic in which players would be able to be very strong for a short amount of time giving them a competitive edge when pit against highly skilled opponents. I also feel like they are a fun way of boosting the game's base mechanics of speed and destruction. With a couple of the power-ups I had to really think about whether to keep them available to players after a takedown and how long they would last for or where they should be placed on the track when the race begins. I can imagine that this is what runs through the heads of game designers when figuring out what mechanics to implement and which to leave out. At the end of the day, every player chooses their own personal experience and especially with power-ups it is important to always remember...

"With great power comes great responsibility."










Navigation in the Insomniac Engine...





Point A to Point B

We all know that AI is an important aspect of gameplay and that the focus of this type of behavior is to simulate humans as closely as possible by creating the illusion of characters being intelligent. This week's lecture took us on a trip to Insomniac studios where we learnt about how navigation of NPCs is done in the Insomniac Engine and how this creates a more immersive experience for the player. There were a lot of topics covered throughout the talk which focused on level navigation becoming an increasingly necessary component for fun in games nowadays. 

Reddy Sambavaram speaks about the evolution of the AI Navigation in several of Insomniac's games including Resistance and Resistance 2, Ratchet and Clank Future: Tools of Destruction and A Crack in Time, etc. This blog will mainly go over the talk and discuss in some detail the engine designers' methods of navigation within their games. The information on this blog comes from Reddy Sambavaram's talk on Navigation in Insomniac Engine at GDC 2011, the slides of which can be found here.







Overview of Navigation

The gaming industry is constantly striving to give players an immersive experience and well designed enemy AI is crucial to this goal. Of course, in order to have great AI, they need to be able to seem like real players walking around in a living breathing environment. Navigation plays a critical role in emulating human behavior within NPCs. With that said, enemy AI has changed drastically across its history from heavily-scripted to much more dynamic and innate sensibility and characteristics. One of the primary objectives for Insomniac in improving their navigation systems was to relieve the game and level designers from having to be consciously mindful of movement and navigation capabilities of the NPC and to build the world around this. 

Typically, navigation comes in the form of commands to the NPC telling them to go from a specific point to the other or to navigate their way to a particular goal. Of course restrictions are then placed upon the navigation at the same time as animations are played in order to enhance the realism of NPC movement. Spawn locations are also calculated based on where the player is and how he is playing. Insomniac quite often re-designs their single-player levels to support multiplayer modes and navigation plays a helping hand in restricting gameplay sections for the NPCs. Navigation has its own world representation to optimize processing and many approaches have been used in the past including the 2D grid-based approach, level designer point and connection placement, sphere or box-based approach and most recently a navigation mesh placed over the level's former mesh. Let's not forget A* which is very popular among those in the industry, being used to find paths from point A to point B when there are obstacles in the way. AI navigation is most certainly not a solved problem yet but is aggressively evolving. 

Typically, the navigation system is given a query and then finds the path, smooths the path and gives its output of this path to the steering system which then works around dynamic obstacles and feeds the final output of velocities to the animation system and then the rendering system which figures out what needs to be displayed on the screen and when. 






Stepping Stones

With Ratchet and Clank: Deadlocked, Insomniac made use of way-volume representation which was hand-made by the designers using volumes as nodes for an A* graph. Connections were present between these way-volumes which helped guide the NPC from one box to the next. When they moved to the PS3, Insomniac employed navigation meshes for Resistance: Fall of man. Their workflow at this time began with the designer who would lay the nav-mesh out in Maya after which tools would convert them into convex poly meshes for runtime. The polygons were treated as nodes in A* if they shared an edge. This, however, was a huge bottleneck on the PPU which was struggling to support 8 NPCs at any given time using navigation. Furthermore, LODs were placed so that if an NPC was within a certain distance, the AI would resolve to a much cheaper version of the behavior.

Going into Resistance 2, Insomniac knew they had to fix their PPU bottleneck and remove the AI LOD restriction. The designers wanted to lay down the navigation mesh on a much finer level, up to 3 times as fine meaning that 9 times the nav-mesh poly load would be their target. They needed to create 8 player co-op and they needed navigation to support it. This was a challenge in itself. Firstly, to fix the bottle neck, they moved the processing of the nav-meshes to the SPU. They separated the nav-mesh into differently colored clusters. They also decided that a simple triangle approach would work much faster than using convex polygons. Since the meshes were hand laid, it was common to see giant thin, long triangles as well as small, tiny ones. Tri-mesh and tri-edges were used as nodes in the A* algorithm due to the lack of uniform meshes which meant the shortest path wasn't always being found. 

Insomniac then put in hierarchical pathfinding which came with its own baggage in which the high-level path didn't always imply a lower-level path as the possibility of it being just 2 disjoint meshes was always there. Around this time path caching was introduced so whenever a query came in, a check was made to find the start and the end points within the successful path in the previous string. Most of the time there was a hit which meant that they were spending less than 10% of their time finding a path. Path finding was therefore the least of their worries as far as the entire navigation system was concerned. Since most of the queries were within local range, hierarchical path finding didn't really buy them much time in their games and so they got rid of it. As a result, much more computation was spent in finding the path while using A*. In order to create a better approximation of the cost, the best point on the edge was also calculated for the path to go to which meant smoothing didn't have to do much. Furthermore, they parameterized path-queries allowing the AI to specify their abilities and allowing certain NPCs to use selective nav-meshes within the system.








In their endeavor to push all the processing on to the SPU, Insomniac batched all the nav queries and ran it full-frame deferred on the PPU. All data access was then isolated to be pushed to the SPU. They created a nav spu job which included finding a point on a mesh query with some restrictions and finding a path between the start and the destination in addition to computing the obstacle processing data for steering behavior. Then hand-optimized assembly routines were used to make it all much faster. Apart from this move to the SPU, they changed their string pull algorithm which posed some issue with huge enemies who had a 2-meter tolerance radius around them causing them to cut across the edges where collision would stop them in place. They proceeded to modify the smoothing which then picked up the slack for the issue and maintained a tangent tolerance instead of the standard string pull algorithm. 

By design, NPCs had to mostly run all the time with Grims (zombie enemies) running somewhere around 8 meters per second - this posed an issue in which they not only had to go to the local bend point in the path but also had to orient themselves to the next bend point in the path. They weren't slowing down enough which gave AI designers quite a bit of trouble when attempting to communicate this to the animation system. The NPCs were not looking good in the scene and so a bezier curve was introduced at the bend point causing them to not only "arrive" at the bend point but also giving them time to face the next bend point appropriately. The NPC would then target the midpoint of the curve rather than the bend point causing them to run in a naturally smooth manner. Insomniac maintained a very lightweight steering approach which was done partly to have lots of NPCs on the screen at a time, especially for 8 player co-op. For each obstacle, escape tangents were calculated and given to the steering system which output the closest direction facing the bend point that didn't fall in between any 2 escape tangents. The only issue this created was that if there was no tolerance between the obstacle and the boundary edge, the NPC could potentially get stuck. So for every escape tangent, a sweep check was calculated. If the character ran into a boundary, the engine flagged the least significant bit of the tangent angle so the steering simply added 90 degrees to it. This worked well for Resistance 2.

At the end of Resistance 2 when profiling and fixing the navigation system, the team noticed that quite a lot of queries for finding a valid point on a mesh were coming out with similar data on the mesh from frame to frame. They spent hardly any time doing the A* or path-finding in their navigation system, 80% of the time was spent on obstacle treatment. Statistically, one obstacle was found in at least 3 other NPCs' paths. With Grims, there were spikes when 100s of them would run through a narrow corridor hiking the performance wherein which every enemy was seeing every other enemy as an obstacle. Since all the Grims shared the same threshold tolerance they had to maintain from the boundaries, the team introduced a special "Grim cache" in which every Grim obstacle would look around the boundary edges and cache the closest distance to the boundary for each one. 






Resistance 3

All the caches introduced at the end of Resistance 2 begged for a formal roll-out into the system including the Grim cache. So the SPU processing was split into 3 passes. The first accumulated all obstacles in all paths, the second gathered the nearest boundaries for obstacles and the last pass ran through all the paths once more looking at all the obstacles and their boundary edge threshold tolerance computed in the previous pass, effectively flagging the tangents appropriately. They also explored a rendering solution experiment and came up with target scanning which was used to maintain NPC tolerance. Essentially, they thought of rendering the nav-mesh and clearing the rendered texels for the obstacles. The texel density used was one-fourth of the NPC's tolerance; this approach had to be discarded for two very important reasons - there was no budget for it and, more importantly, the gameplay would dynamically shrink the tolerance. A different approach was taken - whenever they wanted to maintain tolerance away from the poly, they took the nav-mesh, shrinked the boundary edges and re-computed the polys for every NPC. 

Any navigation system supports custom edges which doesn't fit well into the navigation mesh solution. These custom links could be jumps, ladders, teleporting, etc. which connect different areas of the nav mesh. Traditionally a designer would place points across the mesh and link them up - this was unfriendly to changes as a small adjustment would cause the nav mesh to be re-laid and re-connected. This is also not in tune with the way a designer thinks. So designers were allowed to place boxes in various parts of the level and as long as the front-facing side of the box intersected the nav-mesh, they were fine. This was much more tolerant to level changes. Every triangle had (apart from its own edges) custom clue edges. This blended really well with the A* approach in which the NPC walked the triangle edges instead of the triangles themselves. No tweaking was required to support these custom clues. Essentially hybrids could then scale buildings and jump over walls without the need for designers to script all of this. 

The manner in which other NPCs would use these custom links became a big part of their personalities. NPCs using custom links could modify the link's cost while other NPCs saw the modified cost till they were freed. Some NPCs used the custom links while others did not. Other than this information, custom NPCs had special metadata which would give them animations to walk across their custom link. This lead to NPCs using alternate paths in gameplay and finding various ways to get to the player when multiple enemies were in action. Later, the team at Insomniac made the decision to shaderize their code. The theory behind this was that the team didn't want to process any of the unused code in the memory which is a premium on the SPU. They would rather use it for data processing. And so they split their processing into 5 shaders with a core SPU nav driver layer which orchestrated the shaders and also acted as a data communicator from one to the other. These shaders were: point on mesh, A* and smoothing, find obstacles on each path, obstacle mesh interaction and flag path obstacle tangents. The result was an abundance of memory returned for data processing. 







Nav mesh generation

In Resistance and Resistance 2, the level designer would make the custom nav mesh in Maya but this had a fragile tools pipeline which was a time sink as far as designers and QA was concerned. The in-built level editor was separated from Maya which didn't have the context on which to build the nav mesh. So a reverse pipeline was created in which parts of the level could be exported into Maya providing context to lay the nav mesh polys. After Resistance 2, the ability to lay down triangles in the level editor was added, making a huge difference for the designers. Now Insomniac has moved to a controlled auto generating scheme because traditionally creating a nav mesh was such great time sink for designers that the same nav mesh was often used for various enemy types and sizes. They integrated "recast" by Mikko Mononen into their system after cleaning it up and making some dependent parameters and exposing only a few to the design. 

In essence, the process worked by taking the rendered geometry and voxelizing it into a voxel grid. Then navigatable voxels were built by filtering smooth rendered voxels and eroding them. Watershed partitioning took place after this and the catchment basin's contours were traced with some filtering. All this was triangulated/tesselated to generate the new nav mesh. However, the step where filtering takes place had some issues due to noise in the render geometry when rasterizing it into the voxel grid. The designers were expecting a smooth navigation mesh but the automatic generation scheme wouldn't allow for this and instead created an undesired artifact over certain uneven terrain. The designers had to be given enough power to control the generation scheme to create what they wanted while still managing to auto generate the nav mesh. Since tools to lay down triangles in the level editor were readily available, they took advantage of this and re-purposed the tool, allowing designers to make custom override polygons. After filtering on the rendered voxels took place with the scene geometry, the custom override polys were injected and the voxels of the NPC height above and below were keyed before being re-rendered. This smoothened out the noise in the rendered mesh giving designers the nav mesh they expected. This ability could be re-purposed to give designers the freedom to not make nav meshes in certain areas by not re-rendering after the voxels had been cleared. This afforded designers more control while maintaining the auto-generation of the nav mesh which was key as Insomniac aimed to push mesh generation to run-time.

In order to this, the team is now pushing for a solution to cutting out punching holes around the obstacles in the nav mesh as well as automatically generating a nav mesh for any dynamic areas in the level which have settled. They want NPCs to pick up and navigate into the newly added segments of the level. To cut down the cost they will use rendered geometry to create the nav mesh itself. Also, in order to keep this processing on the SPUs, they will break the world into 8x8 meter tiles and chunk up the NPCs into 3 or 4 categories. There will then be three different nav mesh dimensions getting rid of all the tolerance computing being done. The plan is to generate one tile at a time on the SPU.






In Conclusion

With the evolution of navigation on the rise in the gaming industry there is a lot left to figure out and even more left to aspire towards for next-gen consoles. Insomniac worked to make sure that their game and level designers were given plenty of creative freedom to do as they wish with the tools and techniques given which seems to be a leading trend with most game companies nowadays. While it used to be all about the manner in which the programming power would limit the intricacies of game design, it is now become about how much an engine or system can pull off in a title without hindering the game design. 

Navigation is growing to simulate human behavior better and better as the years go by. Nav meshes are a topic of great interest and discussion in the industry and seem to be the future in AI that makes games far more immersive for players, drawing them into unique encounters with NPCs. One day we'll get there, we're just a few steps away.









Emotional Contagion: Part 2...






The Road to El Dorado

Uncharted is a fantastic action-adventure platformer that charts the journey of Nathan Drake, the descendant of the explorer Sir Francis Drake, as he seeks out the lost treasure of El Dorado with the help of journalist Elena Fisher and his good friend Victor Sullivan. The protagonist is voiced by none other than Nolan North who brings Drake to life as he traverses dense jungles, decrepit caverns and dangerous waters in an attempt to find Sir Francis Drake's long lost treasure. The action is captivating, the world is beautiful and the story gets you hooked from the moment you sit down to listen. 

What got to me most about this game is how well it is structured to be an adventure for the player. I was still a teenager when I got my hands on it and as soon as I began playing I felt as if I was meant to be in the shoes of Indiana Jones. At no point did the action let up and as the gameplay progressed and the story continued to take me through multiple twists and turns, there was never point that I felt bored. I was rooting for Nate the whole time which lead me to believe that it was my responsibility to find Drake's Fortune and solve the mystery surrounding this treasure.

For those of you who have never played Uncharted before, here's a quick trailer of the events that take place as Nathan Drake hunts down the lost treasure of El Dorado.






Please fasten your seat belts, we're about to take off.


Taking names

Right from the get go you automatically know that Nathan Drake is a bonified badass. He's the epitomy of who every 12-year-old wants to be and every 20-something geek tries to be. He's athletic, can hold his own in a gunfight, talented, smart and has a tuft of hair that makes ladies swoon. When I first played Uncharted, for a few moments I could forget about who I was and step into the shoes of Nathan Drake the charismatic treasure hunter who isn't afraid of cracking a few skulls to get to where he needs to be. The game world itself looks amazing and Nathan Drake is nothing shy of a beautiful man. I say this because a lot of games that were popular at the time had the main protagonist as an unbelievably strong entity with incomprehensible powers and weapons that were imaginary to say the least. While this was all fun and games, Drake's Fortune was an adventure waiting to be had and I wan't going to be one to disappoint.

As the game begins, you are immediately thrown into the thick of the action fending off pirates trying to takeover your boat and Sir Francis Drake's journal with it. The player is almost immediately introduced to the gameplay mechanics having to fight for your life, taking cover and shooting at the so-called "bad guys". The way the enemies dress helps you differentiate them from those who are on your side. Even later in the game when the militant enemies are introduced, it is clear that their choice of attire is meant to outline them in the field of battle. Whether they're wearing loose tanks with khakis and flip-flops or military-grade uniforms with camo and combat boots - anyone with a gun is usually not your friend. The enemy AI is pretty good in Uncharted and made me feel like they were determined to get rid off me and have the treasure for themselves. This grew into motivation to play well and use the cover and shoot system in an effective manner in order to survive the pirates gunning to shoot me down. This was especially apparent as the enemies got smarter later on in the game to the point where I would fin myself dying repeatedly because I didn't play the game the way the designers meant it to be played. 

Personally, I'm the kind of player that runs out guns blazing and make a huge scene letting everybody know who I am and where I'm from. This strategy helps me gauge how large the playing field is, where I can hide, where the enemies are hiding, how long do I have before they shoot me down and what enemy types am I dealing with. In Uncharted this strategy seemed to work for the first half of the game, but as it progressively got difficult, I knew that I couldn't always use this strategy. Many times I would run through with the intention of dying just so I could figure out what I needed to know. Yes, the game can be difficult but it flows smoothly and is at no point impossible. It made me feel like a strong challenge was present and that a lot of people were relying on me to be smart and not head-in with brute force. I enjoyed the feeling of tension present in most battles and also liked that these moments were well balanced out with platforming and easier enemy groups that restored my confidence in my abilities. 






Thrill Seeker

So, apparently, Nathan Drake is invincible and has the dexterity and flexibility of the world's greatest gymnasts. I'm not trying to bash the game, I'm just suggesting that although Drake is the closest I've come to playing a human in a video game, he does have those "talents" that are unbelievably impressive and make the game feel a little unreal at times. Now I'm used to the protagonist being able to do a lot more then swing on vines, make incredible jumps and roll land without a scratch on him, but when Drake did so it seemed as though there were times when he was struggling too - whether by the grunting noises or the time it took to scale the face of a cliff. It is clear that he is human but surprisingly agile; I suppose most treasure hunters have to be. Still, there were times when Drake would fall off the edge and I would quite literally hold my breath hoping he was still alive. There were a lot of times when I completely forgot that I was only playing a game and that I could simply restart at the very next checkpoint. 

With that said, I was often tense to get from one checkpoint to the next and make sure that I did so with my health in tact and a sufficient amount of bullets at hand. The ammo can be considered plentiful in the game but the realism is really portrayed in the manner Drake picks up the enemy's weapons in order to reload and stock up. This adds fluidity to the pace of the game and make it feel like a real adventure where you must salvage your supplies and make sure you plan well before you decide to engage 10-15 enemies in combat. I was impressed by the realistic lack of guns you could carry and how scarce ammunition could be at times forcing me to make smart use of what bullets I had left or to think on my feet when I was out of ammo and had only my fists and the element of surprise to engage an enemy.

One of my favorite mechanics of the game's AI is the way in which they call out to where you are so that everyone will turn and shoot at you as soon as you've been detected. This pushed me to the edge of my seat and had me extra cautious when turning the corner or preparing to stealth attack an enemy at the off chance that I may be seen and the alarm bells would go off. There was many a time when frustration with the game set in after I would spend stretched of time stealthily making my way through the level to take down an enemy and a slight movement or glitch would let them know exactly where I was leading to my inevitable death. The idea of the colors fading out as you're losing health is a photo-realistic effect that held great value for me as I could at any point tell what my health was and knew whether to back away and hide or push forward to kill the final enemy before I could take a breather.  






Mastermind & Platformer

As with any adventure, Uncharted is littered with puzzles here and there that need to be solved with the help of Sir Francis Drake's trusty journal which will unlock a door, swivel a platform and lower you to the next step in your journey to finding the lost treasure. These puzzles are never really too challenging but need a good amount of thought to figure out, especially if you're like me and are well aware that puzzling is not one of your strong suits. I would get stuck once in a while especially because the puzzles are not in small contained areas but span large halls and abandon rooms requiring you to jump from one area to the next to turn a lever or push a pedestal in order to open the door. The challenge that comes from figuring out how to interpret the journal is even more rewarding. Once that finally piece clicks into place and the floor rotates descending into the abyss of mystery, there is nothing more righteous in the world.

I remember feeling the huge amount of satisfaction and pride in being able to navigate through a puzzle and unlock where I needed to go. Even at times when trying to figure out where to go can be a bit of a task, it was gratifying to figure it all out and get to where I needed to be. Yes, there were times when I wasn't sure that I had gone the right way, but that's the beauty of linear games - they're designed so that even veering off the path will bring you back sooner or later and the level designers of Uncharted did a fantastic job of making sure that players either knew where to go or were brought back to any fork in the road where a wrong turn was made. 

The platforming is smooth and responsive and it it usually very clear where to go. The designers do a good job of pointing out the boundaries of the level or restricting access to make sure a player doesn't go somewhere he isn't supposed to. Scripted events were some of the most exciting parts of Uncharted and is where the game's movie-like feel really shone. When things a rolling boulder is chasing you down or when you need to get out of a room before it collapses there's a really tension in the air and the soundtrack does an amazing job of reflecting the mood and tone of the action. Many a time I would be genuinely nervous to push a button or get to the other side of a bridge because I had no idea what was waiting. However, it was this feeling of unknown and the need to know how the story unravels that lead me to keep going and find out whether Drake would ever discover the treasure.





Twists, turns and complications

The story behind Uncharted is captivating, enthralling and had me wanting more by the end of it. There was many a time when, like most gamers, I would try to predict what would happen based on my experience with game stories in the past. Unfortunately, I was usually wrong and had no problem with this at all. One of the most shocking moments is when Drake discovers the mutated descendants of the Spanish people who came into contact with the giant gold statue and has to escape before they tear him to pieces. I did not see that coming at all and was pleasantly surprised that the game took a turn for the worse. Even when Navarro was able to steal the statue and kidnapped Elena, I wasn't sure what was going to happen or what Drake could do to stop him. But I kept playing and knew that the game had to end on a good note - I just didn't know what note that would be. 

Of course there were times when I knew exactly what was going to happen, but even then the writers didn't portray it in a cheesy or corny manner - instead they depicted well and treated the plot point in a manner in which they knew the player would be able to predict the outcome. This was quite impressive to me and kept me playing to find out more and see where it all came together. The gameplay complements the story and sequences such as the speedboat race to the end was well scripted and had me engaged at all times. I grew quite fond of the characters, especially Sully who seemed like he knew what he was doing and was always there to back up Drake if he ever got into trouble. Eddy, Elena, Navarro and Roman were all casted very well and made me feel like these were real personalities with whom Drake was interacting.







In Conclusion

Uncharted: Drake's Fortune is a whirlwind of an adventure that took me through jungles, caverns, old dilapidated Spanish ruins and the deep dark underground in the search to find the lost treasure that Sir Francis Drake strived to keep hidden. This game made me want to be an explorer and go out seeing the world and all it had to offer. It made me want to dare to be great and regret nothing. Nathan Drake is an absolutely fascinating character with a lot of traits I wanted to have growing up and even though I saw the game through the eyes of a 15-year-old, it is still an impressive piece of art that is so well made that it combines great story-telling with immersive gameplay to form what looks like a movie and plays like a game. 

Uncharted was an amazing experience that still takes me back to my days of imagining I was more than I ever thought I could be - dressing up like a treasure hunter and running around the house jumping from couch to couch because the floor was hot lava. This game brought me back to my childhood and allowed me, for a brief 8 hours, to be the kind of person people make movies about.