Skip to Content
 

NPC AI Mechanics - Movement

6 replies [Last post]
onihero
Offline
Joined: 01/24/2010

Hello,

I wanted to discuss different types of NPC AI mechanics. Particularly when it comes to movement on a fixed board. Their AI when it comes to combat is fairly simple. If their movement brings them into contact with a player's characters, they will always stop and attack.

Imagine movement in the game as being controlled by normal APs. Give these NPC 3 AP each, with a maximum of 3 NPCs on the board at any given point in time. The board is a 15x15 grid. 1 AP to move forward, 1 AP to turn 90 degrees. These NPCs have 3 spawn points on the board equidistant from eachother (players start on opposite ends of the board). The board is not an open space and will have various obstacles that prevent movement through and rough terrain that slow movement.

I am aiming for a very simple and quick way of determining movement for these NPCs. Also need a way that prevents them from a) clumping and b) always heading to the edges of the board.

Here are the different options Ive been playing around with:

1) Roll d6 (Simple, quick, non-interactive). The dice determines the direction and type of movement:
1- move forward.
2- turn right, move forward
3- turn left, move forward
4- turn around, move forward
5-6- spawn more enemies
If NPC encounters and obstacle, stop movement. Im afraid that this type of movement may cause the NPCs to aggregate to the edges of the board. It makes them rather unpredictable as well. Given the type of NPCs they are, that is not a problem. They dont need to be particularly smart or aggressive.

Also, with rolling a D6. I believe that rolling it once for each NPC (even if there are only 3) may bog down the game. If each NPC spawns with a different facing, it wont seem that they all move like synchronized swimmers even if they all follow the same die roll.

2) Pre-designated movement path (Simple, quick, non-interactive). NPCs move on the board along pre-determined paths. Im not sure I like this one at all. Ive seen it used in Arkham Horror and Munchkin Quest and something about it bugs me. First being that it clutters the board with too many colors and symbols. Second being that it is much more predictable. I cant wrap my head around making this work.

The only system of this type that I do like is Battlestar Galactica. I dont see something that deterministic working for a grid map.

3) Card based movement (Moderate complex, relatively quick, somewhat interactive).
a) Card deck with movement icons on it. There is no central deck to the game (like Arkham Horror or BSG) and creating one simply for moving NPCs seems a bit like a waste. However, it could be done and it would allow a number of possibilities for movement beyond the 6 options available on a dice roll. I could have each card with 3 different move determinations on it (one for each NPC), which would prevent the synchronized swimmer syndrome. Still very random. I could also have the cards with simple AI for handling interaction with obstacles listed on the card. Simple iconography showing how an NPC will react if it hits a wall for this card draw.

The more I type this out, the more I like this option.

b) Based on player card plays (increases interactiveness and complexity). During a game turn, players will be playing cards to alter results of actions. I could imprint on each of these cards a movement icon for the NPCs. Whenever a card is played, it "programs" the NPCs to perform that movement. At the end of the players turns, run through the cards that were played and move the NPCs based on the icons.

I like how this allows the players to somewhat determine how the NPCs move. Adds some good interactiveness, even if it does up the complexity and can bog down the game a bit. It adds another layer of decision making to playing cards. It can be made to fit thematically to the game easily.

Those are the options Ive come up with so far. Any other ideas? Comments?

Pastor_Mora
Pastor_Mora's picture
Offline
Joined: 01/05/2010
Hound Mechanics

Well, the NPC movement depends on their role in your game. Are they prey, hunters, occasional aids?

I worked on a game some time ago that made me face a similar question. In that case, the NPCs were hounds (dire wolves) stalking the players in a forest. As I always try to keep the rules simple and the game components few, the AI finally took this form:

1- STALKING: In their turn, each NPC moves 1 square to the direction of player nearest to him (thats an aproximate). This avoids that they wander off and serves to keep the preasure.
2- CHASE: Once a player ends his moves eight squares away or less, they start moving with 1d6 dice speed, and they always take the same route the player did (they smell his trace).
3- HOWL (optional): The turn an NPC starts his chase, all other NPC move 4 squares directly to the chasing NPC by the shortest route.

The outcome is that NPCs scramble around a single player and unless he has some quick legs, he's doomed. He may also lure them to another player or reach a special place they cannot follow him through (hanging bridge). The drawback is that once they scramble together, they tend to stay together. To solve it, I used an Event Card to pop-up a free rider (Wandering Wolf) that moves the farest NPC token to the same square the player is in (it moves the next turn).

As you may see, I don't endorse extra game components just because I cannot think of a simple way to handdle stuff. So IMHO an extra deck wouldn't do it. I also agree that rolling twice the dices per turn to fill up for the absent party will bog the game.

Notice that the board tracks are very important to keep distances to target always unequal. Do not use crossroads with 4 corners, and loops around a central area should be an odd-number perimeter.

Keep thinking!

PS your NPCs look like zombies.

onihero
Offline
Joined: 01/24/2010
Thanks for the help!

Thanks for your input.

I agree that making a new deck simply to handle the AI is a bit too much to do. As well as the dice rolling bogging things down.

Using a 'logical approximation' of actual movement (by stating that the NPC moves in the direction of the nearest player) seems a bit difficult to implement. Such as when two players are equidistant from the NPC, which does it choose? Who ultimately makes the determination of path taken? You could leave it up to the other player to make the decision (or the last/next player) but that leaves room for argument between players about the movement choices.

I cant really think of a way to keep distances unequal. The board is a simple grid design, eventually the situation will crop up.

I believe this is what has led to systems like Arkham Horror.

I really like your chase. Very thematic for them being hounds.

Hmm...

The NPCs that Im going with are either intelligent (but not necessarily goal oriented, so simply wandering around is not a problem thematically) or semi-intelligent (and aggressive). Thematically both would work. What they are exactly will depend on the mechanic.

Not zombies ;) I believe that there are enough good zombie games out and coming out as it is, with probably about 50 more in the works.

Thanks for the input! Very helpful.

DogBoy
Offline
Joined: 12/15/2009
It depends....

Hi, I've given a little thought to this question previously, although your scenario is different to the ones I've considered.

The answer will depend a lot on what your NPCs are supposed to be "trying to do". Are they aliens pursuing and attacking the players? Animals in mating season going about their own business? Zombies milling around aimlessly until they happen to chance on a human? All of these ought to have very different behaviour.

I have designed an original (I believe) mechanism for randomly milling NPCs which controls any number using a single die roll, and avoids "synchronised swimming". With some additional work it can probably be made to provide unambiguous and random responses to obstacles as well, all within the single die roll. If you are definitely interested, and willing to credit me with the mechanism design in the event that you use it, let me know :-)

hoywolf
hoywolf's picture
Offline
Joined: 01/27/2009
Cycle Movement

I do like your last option, having movement cards on your player cards.

I have an idea to help with the swarming issue, its not complicated; but how you want to move them is up to you still.

I suggest having starting points for the NPCs (all equidistant from each other), and during the course of the game they are either "On" or "Off." If they are on, then their movement will lead them towards their goal, but given different effects or accomplishing a goal they will be turned in a off status, which just means heading back to their starting point. This should help against the synchronized swimming syndrome. As they will swarm towards one area, but then when they are done, they will split up again.

Your NPCs can been color coded so you know which NPC will go where when it needs to, and you can have its game piece be like a Rook in chess, you can play it upright or upside down (representing the on and off status).

I would think that your NPCs are like a monster that can only haunt for X amount of time before it needs to head back and recover/sleep. Or like in the examples of the hounds, they will chase for a while, get their kill then return home.

Hope this helps.

onihero
Offline
Joined: 01/24/2010
NPC AI Movement

Weve decided to go with the last mechanic listed. Where the NPC units move based on cards played during the player's phases (in reverse played order). Players will only play up to 2 cards a turn each (and usually less, as the resources needed to play cards and the cards themselves are sparse so as to minimize the randomness of card draws affecting play). This gives the NPCs a good range of movement and lends and added level of decision making to the play of cards during the rounds.

hoywolf, your ideas are pretty much what we came up with as well :) We always had the idea of spawning points on the game board where these NPCs will appear when a "spawn NPC" card is played. The board itself has 4 separate modular pieces, each will always have a spawn point on it. They will not necessarily be equidistant though, as part of the gameplay involves initial map layout.

When spawned, the NPCs will face different directions (as indicated by the spawn point on the board). That will prevent 'clumping' problems and 'synchronized swimming'. The icons on the cards played will have simple mini-programming involved as well to dictate behavior when encountering obstacles.

Thanks for jogging my mind :)

hoywolf
hoywolf's picture
Offline
Joined: 01/27/2009
Great

I do agree that your card base movement was a great idea.

Keep us updated, I'd to hear more about your NPC movement mechanic :)

Syndicate content


forum | by Dr. Radut