About

Remote Shepherd is the capstone project for Long Shot Games, a group of five graduate students in RIT's Game Design and Development masters program. The game allows the player to step into the shoes of a group of vigilantes who have decided to put their skills gained as Marine Scout Snipers to use in cleaning their city of criminal organizations. This blog will track both the ongoing design and development of the project.
Showing posts with label AI. Show all posts
Showing posts with label AI. Show all posts

Tuesday, April 12, 2011

Animation State Engine and Expressive AI


Now that we have some animations the AI can start to look more interesting. No longer do they merely stop at the goal and wait to move to the next goal; they actually do something at their goal now! To further that end I developed an animation state engine. This is basically a finite state engine with each state representing an animation, and the edges representing transitional animations. It allows the AI and animation systems to be separate, and the AI system to merely tell the animation system which animation state it should be in next, and the ASE will handle picking the appropriate transitional animation and determining when to play and when to stop animations. Each agent also has a map of animation categories to specific animations, meaning different agents can easily have different "Walk" or "Idle" animations without the ASE or the AI system caring at all.

Two Paths Diverged in the Park (With Apologies to Robert Frost)

We've had the nav mesh and path finding in for a while, I just haven't had time to make a post about it. Here's what our nav mesh looks like currently:
Right now it's only the actual dirt/concrete/DG/whatever paths in the park, it doesn't include grassy areas yet. There are plans in the future to mesherize the grassy areas as well, but we need some way to assign terrain modifiers to polygons so that AI knows what kind of terrain it is walking on. The other thing you will notice about the nav mesh is that it is all triangles, instead of n-gons. This is unfortunately a shortcoming of Havok, it refuses to read anything but triangles. This means more polygons than strictly necessary, and also it means that our centroids kind of make a wobbly line. That being said, it works pretty well, and the local avoidance gets the AI to alter it's path and keeps them from looking like they are in one big line.

Friday, March 25, 2011

The World is Not A Round, Spherical Place

AI characters need a way to get around the world, and we considered three ways to let them do this. The first was local avoidance, but this can very easily devolve into dithering unless the level is specifically designed to prevent it. As such we decided to do actual path finding, the only decision left being whether to use a node graph or a navigation mesh. We decided to go with a navigation mesh based on the recommendations of this article. I'll summarize the relevant points here.

Sunday, March 20, 2011

Not The Man I Used To Be

As you know, Remote Shepherd has had a reboot of sorts. What this means for AI is essentially starting over on character design. Previously we had five types of AI planned for the first level (the Market Mission): three different kinds of shopkeepers who would resist the debt collector to varying degrees, regular people just out shopping, and the debt collector himself. While all the designs for the AI characters were finished I had fortunately only implemented the shopper in code.

Behavior trees and finite state engines for the original AI characters

In addition to the problems Eric mentioned in his post, the original design of the second and third missions was incredibly vague in terms of AI and behaviors, and trying to come up with AI to fit the environment and narrative wasn't working ("So what'll be the NPCs be doing in Mission 2?" "Uhhh"). With the new park environment we have a much larger pool of behaviors that people might engage in in that space, and the hard part became trimming the list to behaviors that served our gameplay purpose: to act as a red herring. This trimming is just a prioritization though, not a deletion of any behaviors. The game will also need AI characters that are not red herrings, but are there to flesh out the environment and make it seem realistic and alive. The three characters (in addition to the unique target characters) that we have prioritized are: The Reader, The Walker, and The Jogger.

Sample of behavior trees and finite state engines for The Reader, The Jogger, The MobGuy and The BodyGuard

Monday, January 10, 2011

AI Prototype

One of these dots is feared by the rest

The AI Flash prototype is quickly starting to function more like what we want in the game. In this latest iteration we have three features being demonstrated: fleeing, contagious fear and behaviors. Clicking on an empty space in the world simulates a gunshot in the real game, creating fear in nearby agents. The frightened agents flee towards safeplaces (SP). As they run past non-frightened agents they transfer a little fear to them. One frightened person running past another won't cause the other to run, but many frightened people running past them will. In this system a well placed shot can even cause a panic as the fear continues to spread.

The red encircled dots are frightened and
running to a safeplace


The other aspect of our AI system that is being demonstrated (though harder to capture in screen shots) is the behaviors. Basing the agents behaviors on our planned first mission, one of the agents is a debt collector, and the rest of the agents are debtors. The debt collector wanders around the world space, while the debtors try to avoid the collector while also wandering randomly between the waypoints (W). Identifying the debt collector involves exactly the kind of process we are hoping to elicit in the actual game: the player must observe the world and look for disruptions in a pattern, in this case look for agents who seem to be having their normal path to a waypoint disturbed; the collector is likely to be near them.