Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News - Blog: Analyzing the systemic AI of Far Cry

#1
Blog: Analyzing the systemic AI of Far Cry

<div style="margin: 5px 5% 10px 5%;"><img src="https://www.sickgamedev.win/wp-content/uploads/2017/10/blog-analyzing-the-systemic-ai-of-far-cry.jpg" width="800" height="450" title="" alt="" /></div><div><p><strong><em><small>The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community.<br />The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.</small></em></strong></p>
<hr />
<p>[embedded content]</p>
<p id="2322">Some of the biggest challenges facing modern game development can be found in open-world game design: how to build large, vibrant and interesting locales for players to explore. Artificial intelligence can often by adopted to address this challenge by creating interesting and dynamic environments that enhance the overall experience for the player. In this article, we take a look at the methods and design decisions behind the ever increasing game worlds in Ubisoft’s <em>Far Cry </em>series.</p>
<p><img src="https://www.sickgamedev.win/wp-content/uploads/2017/10/blog-analyzing-the-systemic-ai-of-far-cry.jpg" /></p>
<p id="a120"><em>Far Cry</em> is renowned for an open approach towards problem solving: allowing players to explore the world in a manner that suits them. Originally starting out as an open — albeit linear — gameplay experience, the series has became increasingly more adventurous in its design; with maps not only increasing in size but also with the introduction of more interactive environments and wildlife. The latter proves really exciting, given that it can completely change the dynamic of gameplay — which could prove inspirational or even fatal when you’re in the thick of the action.</p>
<p id="7aef">However, achieving this level of engagement and interaction can be rather demanding: given designers need to balance the players sense of importance and agency, while ensuring they’re not bludgeoned repeatedly and offered some respite. Similarly, there’s also the implementation issues faced in managing open world assets: given it’s not computationally feasible nor responsible to leave thousands of non-player characters roaming the Rook Islands or the vast mountain ranges of Kyrat.</p>
<p id="ecb4">So how does it all work? The answer of course, is with a little bit of AI ingenuity through smart directors. This is an increasingly popular way to manage large open-world environments, with much of it stemming from the pioneering works found in <a href="https://www.youtube.com/watch?v=WbHMxo11HcU" rel="nofollow noopener" target="_blank"><em>Left 4 Dead</em></a>. Turtle Rock and Valve’s survival shooter focused on the distribution of enemy characters within close proximity of the player and <em>Far Cry </em>follows suit. So let’s look at the design tricks behind their AI implementation.</p>
<p id="787f">The original <em>Far Cry</em> launched back in 2004 is an action heavy first-person shooter that gave the illusion of open-world gameplay through its large albeit limited areas and maps. Meanwhile, 2008’s <em>Far Cry 2 </em>was the first in the series to truly embrace the notions of open world play and more importantly, <strong>systemic design</strong>: the ability to have a range of independent systems and mechanics that can be combined in fun and interesting ways. The opposing human factions, reactive and aggressive wildlife, combined with vehicles, environmental effects and more are intended to for players to exploit for their own personal gains. But it didn’t quite pan out: <em>Far Cry 2</em> is a bit of a frustrating experience, largely because these systems were not properly balanced or constrained.</p>
<p><img src="https://www.sickgamedev.win/wp-content/uploads/2017/10/blog-analyzing-the-systemic-ai-of-far-cry-1.jpg" /></p>
<p> </p>
<p id="de0a">However continued development of these systems lead to their adoption in 2012’s <em>Far Cry 3, </em>where they had reached a level of maturity that improved the experience overall. The systemic framework in <em>Far Cry 3</em> achieves what Ubisoft themselves refer to as <em>“The Anecdote Factory”</em>: a system that would create weird, wonderful and individual gameplay experiences you would talk about with you friends. This could range from unexpected tiger attacks to luring tigers from nearby jungle growth into enemy bases whilst flying a small gyro-copter and dropping C4 explosives.</p>
<p id="a3a4">Meanwhile 2014’s <em>Far Cry 4</em> attempted to improve upon what <em>Far Cry 3</em>achieved while also addressing some of its criticisms: notably the balance of this systemic framework operating in and around a linear narrative.</p>
<p id="572e">The vast majority of this systemic framework is reliant upon non-player character (NPC) AI: ranging from the enemies, to the civilians, to allied fighters to the animals that prowl the open-world maps. It just needs to know where and when to put them in the world.</p>
<p id="5dd1">The scale of the world of <em>Far Cry 3 </em>is very impressive: with the Rook Islands of the estimated to be around 300 square miles in size. That’s a lot of ground to cover, and given you would need thousands of non-player characters within that space to make it interesting, you suddenly have a difficult design problem to solve. Not just in ensuring characters are in locations that present interesting opportunities for players to explore, but how best to manage these characters in a resource constrained piece of software.</p>
<p> </p>
<p><img src="https://www.sickgamedev.win/wp-content/uploads/2017/10/blog-analyzing-the-systemic-ai-of-far-cry-2.jpg" /></p>
<p> </p>
<p id="7b34">This leads us to <em>Far Cry</em>’s dirty little secret: that at any point in time, the game is only maintaining active non-player characters within less than 500 metres of the player, with enemy characters and animals being added and removed to the world as the player moves around. This is actually quite pragmatic, given that leaving large numbers of characters in the game at once is highly expensive: wasting not just memory needed to store these NPCs, but potentially CPU cycles to continually update the state of these characters during play. The game isn’t interested in managing hypothetical situations such as a tiger attacking a gazelle 3 miles north west of the player. The resulting encounter system of <em>Far Cry 3 </em>and<em> 4 </em>operates on a simple principle: if the player didn’t see it, it didn’t happen.</p>
<p id="1671">The NPCs within the game are designed to react and behave in a context-driven fashion: to attack, evade or explore areas of the map based on what’s happening around them. This is driven by finite state machines (FSMs), a topic we’ve covered at length in our videos on <a href="https://www.youtube.com/watch?v=BmOOrh5lq7o" rel="nofollow noopener" target="_blank"><strong><em>First Encounter Assault Recon (F.E.A.R.)</em></strong></a> and <a href="https://www.youtube.com/watch?v=Oz04rH542l8" rel="nofollow noopener" target="_blank"><strong><em>Batman: Arkham Asylum</em></strong></a>. Many of these NPCs, be they enemies, civilians or animals, are designed to react to nearby stimuli in an appropriate fashion. Their responses are reliant upon a rich navigation mesh that is embedded into the game world, with smart object nodes placed in areas of interest that can trigger specific animations. While they know how to react intelligently, it does not factor whether any other non-player characters are in proximity. In fact, enemy NPCs are rather limited tactically, which becomes more apparent when you play the likes of <em>Far Cry 4</em> in the online cooperative mode. Despite this, they’re still a cracking shot and a separate damage director system manages their shooting capabilities based on the number of NPCs in the scene. Thus ensuring you don’t get killed by six headshots at once from 100 metres away.</p>
<p> </p>
<p><img src="https://www.sickgamedev.win/wp-content/uploads/2017/10/blog-analyzing-the-systemic-ai-of-far-cry-3.jpg" /></p>
<p> </p>
<p id="2a43">In order to maintain decent performance – given that these games not only have to run efficiently on PC but also between console generations — the director AI enforces constraints on the number of systemic elements that are active at any point in time. This includes the number of enemy NPCs, but also animals and items such as vehicles given the additional computational load they bring with them. In fact, in <em>Far Cry 3</em> the numbers are really limited: with only 12 NPCs max in the world at once and up to 20 animals, with vehicles also limited to around 2 or 3 types at any point in time. The relevance of these characters are measured frequently: with the director moving or deleting characters if it’s apparent they’re too far away and won’t ever catch you. If you’re running in a particular direction, the system will spawn enemies in front of you: factoring not only your heading but your current speed: thus ensuring they don’t pop-up in front of you.</p>
<p id="8b8d">This system was enhanced for <em>Far Cry 4</em> to become to create more interesting and varied events. Placing the NPCs in the world is one thing, but placing them in specific configurations related to one another can result in the player becoming involved in more engaging experiences. As such,<em> Far Cry 4</em>introduced a dynamic encounter method that procedurally generates events within proximity of the player: such as enemy NPCs in combat against Kyrat’s wildlife. This pays attention to your current objectives, sometimes putting them in the way, or focusses on completed tasks, like having a recently captured output come under attack again by the local militia.</p>
<p> </p>
<p><img src="https://www.sickgamedev.win/wp-content/uploads/2017/10/blog-analyzing-the-systemic-ai-of-far-cry-4.jpg" /></p>
<p id="4cd7">The use of dynamic director systems has become increasingly popular for open-world game environments: with titles such as <em>Saint’s Row IV,</em> <em>Titanfall</em>and <em>The Witcher III: Wild Hunt </em>all adopting these in some fashion or another, with their own unique design problems to solve. But this isn’t the only innovations that the <em>Far Cry</em> series continues to make, with the more recent entry <em>Far Cry: Primal</em>, introducing companion AI in the form of tamed animals. This is in fact an extension of the AI system used for the tiger companion in the Shangri La sequence of <em>Far Cry 4</em>. We’ll be returning at a later date to talk all about how that works and the design problems Ubisoft’s developers overcame to make it a reality.</p>
<p id="8290"><strong>Far Cry 4 is available now on </strong><a href="http://amzn.to/2q1qyU6" rel="nofollow noopener" target="_blank"><strong>PC</strong></a><strong>, </strong><a href="http://amzn.to/2q1qfsq" rel="nofollow noopener" target="_blank"><strong>Playstation 4</strong></a><strong> and </strong><a href="http://amzn.to/2purDmw" rel="nofollow noopener" target="_blank"><strong>Xbox One</strong></a><strong>.</strong></p>
</div>
Reply



Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016