Scoundrel Studio
  • About
  • Media
  • People of Aionos
    • Victoire, Inirion Police Sergeant

Tag Archives: AI

Title Screen and more AI

Posted on March 25, 2016 by ScoundrelCidAdmin

Hey Guys,

It’s been a while since my last post on the site, but it’s because we’ve been hard at work on People of Aionos! Enough progress has been made so that I can update this blog more often.

First off, I would like to share this jawbreaking background for the title screen of People of Aionos.

Title Screen of People of Aionos

 

Wow. It shows the city of Inirion, the capital and biggest city on the remote world of Inir Fog. What was once a small mining city under Republic rule has grown into a full metropolis. The city can be separated into three distinct sections:

  • The rich and influential citizens live in the Upper Rises, far above the dust storms that frequently hit this region of Inir Fog. Up on the mountain, the air is dry and warm, and people wander happily along its sky bridges, enjoying the promenades’ boutiques, restaurants and green areas.
  • The heart of Inirion, and the source behind for its steady growth, is the Industrial Sector where the precious ores found in the surrounding mountains and canyons are transformed and shipped to every corner of the Empire. The Industrial Sector is relatively well protected from the dust, as it rests at the feet of the Inirion Mountain.
  • Finally, the rest of the population lives at the base of the skyscrapers, in an area of Inirion that is often hit with dust storms: the Dust Pillars.

Apex Game Tools Logo

Secondly, the AI of People of Aionos has undergone a major overhaul since our last post. We used to have a behavior tree system that runs with RAIN AI and everything was running fine until I tried expanding the system for more complex behaviors. The behavior trees were getting huge, harder to maintain than necessary and some performance issues started to creep up when having multiple NPCs.

So I looked for an alternative and stumbled upon the Utility Theory that made making choices for an AI easy. Decision Flex has a great implementation of it for Unity. But once I had my AI’s choice made, I had to implement those behaviors and decided to code my own Behavior Manager for it. It acts like a State Machine, where the current state is decided by Decision Flex.

Unfortunately, using Decision Flex and dropping RAIN AI still left me without a pathfinding system to guide my NPCs around the map. So I turned to an alternative- that I had dismissed earlier because it used grids instead of navmeshes- Apex Path. Ever since I’ve been working with it, I have found Apex Path to be fast, reliable, easily customizable and it allows for easy Dynamic Avoidance, which I couldn’t get with RAIN AI.

Until next time where I will discuss the different ways of getting People of Aionos Pixel Perfect with multiple resolutions.

Cheers!

Posted in AI, Apex, People of Aionos, RAIN | Tags: AI, Inir Fog, Inirion, People of Aionos, RAIN, Title Screen | Leave a comment |

AI : Perception

Posted on June 10, 2015 by ScoundrelCidAdmin

 

Hey guys,

During the development of People of Aionos‘s AI system, I came across quite a few problems to solve and I thought I’d share what I’ve learned in case anyone runs into the same kind of trouble. I will write a series of blog posts, among the game’s updates, about different bugs I’ve encountered putting together a game AI with Unity, starting with AI Perception.

An AI perception system simulates the real senses of a person, usually sight and hearing, and transmits the relevant information to the decision system. Both senses need a way to detect if something of interest, mainly the player, is in range of the NPC, but the desired object has to be in the Field of View (FoV) and the Line of Sight (LoS) of the NPC to be seen. We can solve this in Unity by three different ways : Colliders, List or some 3rd party solution.

 

  • Colliders : With this option, you simply attach a sphere collider, as a Trigger, to any NPC and write a script that reacts on the OnTriggerStay function. Unity’s tutorial section has a good tutorial on it right here. This option is quick to implement and doesn’t require a lot of code, but I have found a problem with it while testing People of Aionos on an older computer.
  • Lists : With the Lists solution, you have to keep centralized arrays or lists of every possible object that might be of interest to an NPC (Player, Munitions, Sounds, etc…). Once this is done, it’s a simple matter to search, in the Update function, the content of those arrays and to test each object for distance, FoV and LoS. This option requires more time to develop and requires more code to manage than the colliders option, but it was my solution to the performance issues faced with the colliders.
  • 3rd party solutions : There are plenty of great and usable solutions on the Unity’s Asset store. Most of them include another AI system in them, like navigation, decision making and communication between NPCs. I will not go through the entire list of solutions and tell you which is the best as I have found this choice to be a matter of personal taste between code clarity, support, functionality, API’s, documentation, etc… But I will point out something to consider for any of these solutions : Yes, they will do a lot of the hard work for you, but some modifications to your code might have to be done in order to make them work properly and they will require time and energy to master.

PoA Timo perception

I personally toyed with all 3 of these options before finding the right one for me. I started with what I found in every tutorial online, using colliders. Sadly, while testing People of Aionos on a weaker system than my personal computer, I’ve found that perception colliders attached to multiple NPC’s at the same time, 15 or more, incurred huge slowdowns and performance issues. It took me days to track down the source of the problem and discover that all of the sensory colliders close together caused the performance dip. During this search I learned a lot about optimizing an AI along the way, which I am soon going to share with you in another post.

Since colliders were not a possible solution, I’ve decided to test out centralized lists and 3rd party options. I have found the list solution to work easily and without any performance issue and this solution was satisfactory for months, that is until I needed more complex AI decision making options. I tried a State Machine, but it wasn’t a realistic option, so I turned to Behavior Trees which worked marvelously. Finally, it’s while searching for a solution for my Behavior Trees in the Unity store that I stumbled upon Rival Theory’s RAIN. After some getting used to, I switched my NPC’s perception system to RAIN’s, which has great performance, visualization and support.

Rival Theory's RAIN Logo

I’ll be back next week with another post about the progress made on People of Aionos and a little bit more about its universe.

Posted in AI, RAIN, Unity | Tags: AI, Perception, RAIN, Unity | Leave a comment |

Recent Posts

  • Let’s make a Great GIF – Part 2
  • Let’s make a Great GIF – Part 1
  • Title Screen and more AI
  • AI : Perception
  • Back with more People of Aionos

Recent Comments

  • Title Screen and more AI - Scoundrel Studio on People of Aionos
  • AI : Perception - Scoundrel Studio on People of Aionos
  • Back with more People of Aionos - Scoundrel Studio on Victoire, Inirion Police Sergeant

Archives

  • May 2016
  • March 2016
  • June 2015
  • May 2015

Categories

  • AI
  • Animation
  • Apex
  • GIF
  • People of Aionos
  • RAIN
  • Screenshot
  • Uncategorized
  • Unity
  • Website

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Pages

  • About
  • Media
  • People of Aionos
    • Victoire, Inirion Police Sergeant

Archives

  • May 2016
  • March 2016
  • June 2015
  • May 2015

Categories

  • AI (2)
  • Apex (1)
  • People of Aionos (3)
  • RAIN (2)
  • Screenshot (2)
    • Animation (2)
    • GIF (2)
  • Uncategorized (1)
  • Unity (1)
  • Website (2)

WordPress

  • Log in
  • WordPress

CyberChimps WordPress Themes

© Scoundrel Studio