Tagged Questions

The design and/or logic of how an in-game entity makes decisions about its behavior.

3k views

Predicting enemy position in order to have an object lead its target

In my 2D game I have AI turrets that should assist the player by automatically firing towards enemies. I would like to make them fire intelligently and lead their target instead of just targeting an ...
21k views

New to creating AI - where to start? [closed]

I am new to game programming and am trying to make a basic 2d top-down space game with 2 space ships that fight each other. I am doing well with the user controlled space ship, but have no idea how ...
8k views

How does one prevent homing missiles from orbiting their targets?

I am developing a 2D space game with no friction, and I am finding it very easy to make a homing missile orbit its target. I am curious about anti-orbiting strategies. A simple example is a homing ...
4k views

How to lead a moving target from a moving shooter

I saw this question: Predicting enemy position in order to have an object lead its target. My situation is a little different though. My target moves, and the shooter moves. Also, the shooter's ...
19k views

How does Dwarf Fortress keep track of so many entities without losing performance?

In Dwarf Fortress you can have hundreds of Dwarves, animals, goblins, etc in game at any one time, each with their own complex AI and pathfinding routines. My question is how does this not produce ...
3k views

Looking for a good technique for character movement in hack&slash game

I'm making hack&slash game and I want my characters move like for example in Torchlight, Diablo, etc. Currently I generate set of nodes for all walkable areas of a floor. When I click somewhere ...
6k views

How to calculate shot angle and velocity to hit a moving target?

I am developing a 2D Android game and I am making an aiming algorithm for AI projectiles to hit enemies either following a path, or free moving. At the moment it just calculates where the target will ...
2k views

Is there a simple way to stop enemies standing in the same spot?

So: top-down game, my enemies chase the player, when they get within a certain distance they stand still and fire. If they're all coming from the same direction they all end up standing in the same ...
12k views

Decision Tree vs Behavior Tree

What are some differences between Decision Trees and Behavior Trees for AI Game Development? When would you use one over the other?
3k views

Target Tracking: When to accelerate and decelerate a rotating turret?

Say I have a moving circular target defined as: Vector2 position; Vector2 velocity; float radius; And a rotating turret (mounted on a moving vehicle of some kind) defined as: Vector2 position; ...
5k views

Enemy movement in straight line to player in chase game

I'm creating a game where the enemies spawn randomly on a map then move towards the player every frame at a random speed. The map has no obstacles so the enemies should always move in a straight line. ...
6k views

What makes a computer opponent feel alive?

Are there any recommended blogs or whitepapers that talk about making the AI in an RPG game feel more real? (Specifically in turn based combat.) I know something must be out there, but I am only ...
13k views

Complex Game AI for Turn-based Strategy Games

I'm doing some research for a turn-based Strategy game project and looking for good resources on this topic. The game is a typical war game where countries can fight each other, deploy units and have ...
5k views

How to implement behavior in a component-based game architecture?

I am starting to implement player and enemy AI in a game, but I am confused about how to best implement this in a component-based game architecture. Say I have a following player character that can ...
2k views

Behavior Trees :: Actions That Take Longer Than One Tick

From what I understand on Behavior Trees, each Behavior should be a short goal oriented Action that could be done in a few iterations. So for example, below is an image of a Behavior Tree: Now let ...
5k views

How to build a “traffic AI”?

A project I am working on right now features a lot of "traffic" in the sense of cars moving along roads, aircraft moving aroun an apron etc. As of now the available paths are precalculated, so nodes ...
3k views

Algorithm to shoot at a target in a 3d game

For those of you remembering Descent Freespace it had a nice feature to help you aim at the enemy when shooting non-homing missiles or lasers: it showed a crosshair in front of the ship you chased ...
3k views

Open Source AI Bot interfaces

What are some open source AI Bot interfaces? Similar to Pogamut 3 GameBots2004 for custom Unreal Tournament bots or Brood Wars API for Starcraft bots etc. If you could please post one AI bot ...
702 views

What behaviors should go into making a “non-perfect” AI combatant?

When making an npc combatant, it's easy obvious what to do to get a robot deathmachine by optimizing combat tactics, timing and attack types, but harder (and more interesting in a fight) to get an ...
623 views

Finding the correct speed for AI to turn to reach goal

I have a ship that travels at max speed maxSpeed and can turn rotationSpeed degrees per second. The ship always moves in the direction it is facing which means that the faster the ship is travelling ...
6k views

Are there any games that contain a machine learning AI? [closed]

Can anybody here give a reference to commercial AAA games that implement a machine learning AI?
2k views

How to implement an intelligent enemy in a shoot-em-up?

Imagine a very simple shoot-em-up, something we all know: You're the player (green). Your movement is restricted to the X axis. Our enemy (or enemies) is at the top of the screen, his movement is ...
4k views

Moving around/avoiding obstacles

I would like to write a "game", where you can place an obstacle (red), and then the black dot tries to avoid it, and get to the green target. I'm using a very easy way to avoid it, if the black dot is ...
836 views

Showing range on hexagonal grid

Here is the situation. I have hexagonal board,and a unit on it,with speed or move value 4.Diffrent terrain has a diffrent cost.When i click on the unit,game should show me a move range. My solution ...
893 views

How do I make complex AI manageable? [closed]

In the past, I've used simple systems like finite state machines (FSMs) and hierarchical FSMs to control AI behavior. This pattern falls apart very quickly or any complex system. I've heard about ...
6k views

How to utilize miniMax algorithm in Checkers game

I am sorry...as there are too many articles about it.But I can't simple get this. I am confused in the implementation of AI. I have generated all possible moves of computer's type pieces. Now I can't ...
365 views

Ways to make my game world bigger without slowing users CPU

I've been developing my first game for a little while now, but I've found that I want to make the game world MUCH bigger. It's currently about 300*300 tiles, but has creatures and bad guys running ...
635 views

Space Invaders-type game: Keeping the enemies aligned with each other as they turn around?

OK, so here's the lowdown of the problem I'm trying to solve. I'm developing a game in PyGame that's a cross between Space Invaders and Columns. I'm trying to make the motion of the enemies similar ...
3k views

AI for solving a Match 3 game

Is there a known good way to have a "computer" opponent play a Match 3 game? It doesn't have to be fancy, or even considered fair. If the AI always takes the best move on the board that would be OK ...
682 views

Programming an Artificial Agent in Open Arena [closed]

Does anyone know source example source codes and tutorials to start writing an intelligent bot for Open Arena?
16k views

How does pathfinding in RTS games work?

[crossposted from stackoverflow] In a game such as Warcraft 3 or Age of Empires, the ways that an AI opponent can move about the map seem almost limitless. The maps are huge and the position of other ...
3k views

Useful resources for beginning AI [closed]

What resources are available, including both free articles/ebooks and physical books and things, for game developers looking to begin simple AI programming/design? Note: I know of this question, but ...
1k views

How is AI most commonly implemented in popular games?

I'm no gamedev, I'm just a curious coder of not-games. I wonder, how does AI work in popular modern games, say, FPSs? Is it based on hard-coded rules? How much does it have in common with other kinds ...
1k views

Spell casting - How to optimize damage per second

Imagine we have a wizard that knows a few spells. Each spell has 3 attributes: Damage, cool down time, and a cast time. Pretty standard RPG stuff. Cooldown time: the amount of time (t) it takes ...
2k views

Pattern for performing game actions

Is there a generally accepted pattern for performing various actions within a game? A way a player can perform actions and also that an AI might perform actions, such as move, attack, self-destruct, ...
3k views

How would one approach developing an AI for a trading card game [closed]

How would one approach developing an AI for a trading card game(e.g. Magic The Gathering, YuGiOh, etc.)? I'm not sure where to even begin. How would "Easy", "Normal", and "Hard" AI difficulties ...
3k views

How do I make A* agents avoid other agents?

I'm implementing a multi agent A* algorithm on a tile map. Agents move only in the X and Y axes. I avoid collisions between them by checking where the others are when calculating paths. It works fine ...
18k views

How to implement A.I. for checkers/draughts?

I saw this checkers game and I wondered how the A.I. was implemented. How should I implement an A.I. for checkers (draughts, dama, dame)? Are there any known algorithms? Very thnaks full to all. I ...
6k views

Patterns for racing AI behaviour

So let's say you've got a spline-based racing AI. Assume it can already handle the basics of braking and steering around the track. How would you structure and implement collision avoidance, ...
2k views

Following a path in a smooth fashion

I am currently making a 2d tower defense game with a static, predetermined lane that the enemies follow (i.e. towers cannot block the path and path finding is not the problem I am trying to solve). I ...
5k views

Who does the AI calculations in an MMO?

I am building an MMO and want to add NPCs. The thing is I don't know the basic design. What does the calculations, the clients or the server? I would understand the server calculating events and ...
2k views

What is the name of the AI/algorithm used by most MMOs for monsters or mobs?

Is there a standard name for the (fairly dumb) AI that most MMOs use where you 'aggro' a monster/mob when you are within a certain radius of it, and the monster chases your character for a set amount ...
4k views

State Machines: State Object versus sequential check: what are the pro/cons?

I dont know much about finite state machine in AI or other game behaviors in game, except this quick tutorial with a Miner: http://www.ai-junkie.com/architecture/state_driven/tut_state1.html which is ...
834 views

Making the AI take different paths to each other

I have a top down 2d game where the AI spawn at the edges of the map and run towards the center. I'm using A* and a node mesh to do the pathfinding. Right now, the AI spawn at a point on the edge of ...
1k views

Determining the end location for AI movement in groups in a 2D RTS

I have written an RTS game (a demo for a game engine of sorts, actually) in which the user's basic interaction with the game is to select a bunch of soldiers and then right-click on the map to move ...
695 views

How do I make a vehicle move to a point and stop without overshooting or oscillating?

Ok so consider we have a vehicle like the one I described in my answer to this question, with a 2D position, velocity, angular velocity, and drag/friction. It can accelerate and break by a variable ...
641 views

How can I maintain a rectangular formation when units are added or removed?

I've got bots in a rectangular formation with rows and columns. A problem arises when a bot is added or removed from the formation. When this happens, the bots have to rearrange themselves so that the ...
560 views

How to add a sound that an enemy AI can hear?

Given: a 2D top down game Tiles are stored just in a 2D array Every tile has a property - dampen (so bricks might be -50db, air might be -1) From this I want to add it so a sound is generated at ...