Questions tagged [ai]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
50 views

How to stop the agent when target is unreachable

I want my player characters to stop when the target is unreachable. Please watch this video. As you can see in this video, the agents don't stop when the target is unreachable. This is my code: ...
user avatar
2 votes
0 answers
70 views

What's the best strategy for incorporating jumps into a 3D AI navigation algorithm?

I'm trying to make a game centered around chase sequences in a 3D level with a high degree of verticality and movement options for the player. Basically think Breath of the Wild in an urban landscape ...
user avatar
1 vote
1 answer
28 views

How should I share the states amongst all the executions of a Behaviour Tree triggered from all ticks?

I'm still learning about Behaviour Trees and my understanding of the "blackboard" is essentially a state object. When passing the state object through the ticks to the function calls (which ...
user avatar
  • 417
0 votes
0 answers
62 views

Issue with Goal Oriented Action Planning (GOAP) and multiple preconditions

So I am working on an AI for my game using GOAP. I've been researching it for the past few days and while implementing it on my own I've ran into a problem. Here is a diagram of what I am doing. The ...
user avatar
0 votes
0 answers
34 views

How to move an enemy to sneak up on the player from behind, using forces?

I have this code to move the enemy: (for x, same for y) ...
user avatar
  • 217
0 votes
0 answers
45 views

(FSM) Detect a change on a variable on Update, and trigger certain State

So, I'm working on a FSM that ticks on every frame. The inner workings can be simplified to this: The user (me) creates the States: ...
user avatar
2 votes
0 answers
76 views

AI in turn-based strategy

Which artificial intelligence architecture will work best in a turn-based strategy game. It is similar to the games from the Europe Universalis series. In the game it is possible to: create trade ...
user avatar
  • 21
0 votes
0 answers
45 views

What is the earliest documented use of behavior trees?

I'm curious about when behavior trees first appeared in the context of AI design. I've looked at many sources (e.g., GDC talks, academic literature such as Behavior Trees in Robotics and AI: An ...
user avatar
0 votes
1 answer
32 views

First Person shooter look direction abstraction for InputController, AIController and NetworkController

The problem Suppose I have a game where there are multiple Input Controllers: LocalPlayerController: Reads inputs from the keyboard/mouse/gamepad. ...
user avatar
  • 115
0 votes
1 answer
77 views

How can I update the Navmesh path in 2D games?

There are destructible and indestructible objects on the map I created with Tilemap, and I create a walkable area (bake) for my enemy object using the information I found on the internet and the ...
user avatar
  • 13
0 votes
2 answers
128 views

Unity Game - Multiple threads to improve AI bulk computation?

I'm making a chess-like game with an AI that implements minimax algorithm with alpha beta pruning. The AI raw computation is effectively infinite, so I'm forced to limit the depth I traverse, thereby ...
user avatar
0 votes
0 answers
33 views

I can't use a NavMesh system for my enemy object (for 2D game)

My enemy object is patrolling the area I have determined. He's chasing me if I enter his field. But sometimes it gets stuck on the wall and cannot move. For this, I tinkered with the "NavMesh&...
user avatar
  • 13
0 votes
0 answers
85 views

Implementing a behavior tree for a pursuing enemy without ticking every frame

I'm working on a prototype for a Unity horror game, and one of the basic mechanics is having a pursuing opponent. A good example for this behavior are the Grunts from Amnesia: The Dark Descent. To ...
user avatar
3 votes
1 answer
98 views

Approximating off-screen action efficiently in a simulation game?

I have a character building constructs all over a pretty large map. My game blends elements of RTS and fast paced action in a room-based environment where players can only see one room at a time. I ...
user avatar
  • 143
3 votes
1 answer
131 views

How to protoype a multiplayer game whose fun comes from having lots of features

I've seen plenty of testimonies that to make a good game and not waste time, one should prototype early, quickly see if the core is fun as is, and not focus on graphics, menus, sound, secondary ...
user avatar
1 vote
1 answer
78 views

Minimax in a losing scenario vs an imperfect player

I'm working on a solver for Triple Triad, a simple two-player zero-sum card game. Right now, I'm using Negamax (a variant of the well-known Minimax algorithm) with alpha beta pruning, and the game is ...
user avatar
0 votes
0 answers
104 views

Nav Mesh Bounds Volume on Z axis

I've just started to learn Unreal Engine 4.26.2 developing an Arkanoid clone. But, I have a problem with the monsters: I don't know if I can use the Nav Mesh Bounds Volume with them, because they fly (...
user avatar
1 vote
3 answers
388 views

Which AI should I use so as to avoid monsters AND chase bonus pills at the same time?

I'm trying to program an AI for a Pac-Man-like game, where I would be the Pac-Man and move according to two simple rules: move towards bonuses avoid monsters and being killed I read that one can ...
user avatar
0 votes
1 answer
65 views

Reach a moving point smoothly

First, for my specific problem, we can assume we're working in a 1D space. I have a point B moving at a specific velocity V. I want to smoothly move the body A so it reaches the point B and moves at ...
user avatar
0 votes
1 answer
57 views

Move between two points at a constant speed in LWJGL

I've been making a game engine in lwjgl and I have been trying to get an ai to move from one point to another. I used a lerp method but the speed is dependent on the distance between the two points, ...
user avatar
1 vote
1 answer
63 views

Does a Utility AI system run every update/frame to determine scoring?

Am learning about Utility AI. I understand what it can be used for but not how to correctly implement it. Does the scoring for an NPC need to be checked every frame/update/tick? Imagine you have an ...
user avatar
-1 votes
1 answer
160 views

Do games always use AI for defining behaviour of opponent players or is it just vector math?

I'm trying to learn how games implement tactics for opponents/enemy player. In games like Street Fighter with maximum difficult, the opponent (computer) is too good at predicting and countering my ...
user avatar
  • 77
14 votes
4 answers
8k views

AI for auction bids in the Monopoly game

I'm currently creating a Monopoly game simulator in C++. I am currently struggling with implementing the auction mechanic for AI players. How could I implement the bots' participation in auctions? How ...
user avatar
  • 143
0 votes
0 answers
36 views

Unity 2d - Enemy continuous curved movement

I'm trying to implement random enemy movement in a top down shooter game. Currently the enemy moves in a straight line from his current position to a randomly generated target position. Is there any ...
user avatar
2 votes
1 answer
319 views

Ue5 AI MoveTo does not work

I have been having problems working with AI MoveTo and created a very basic version in the hopes of finding the problem: As you may see, I have one single character with the default skeletal mesh and ...
user avatar
  • 123
2 votes
1 answer
193 views

AI driver for racing games

I'm very curious about AI drivers in a racing game, so I tried to build one :). I've built a 3D closed racing course and a car with Unreal engine and all the physics, and I try to develop an algorithm ...
user avatar
  • 123
0 votes
1 answer
85 views

How can I make a list of factions, each of which has a "reputation" according to every other faction?

In my game, I'd like each and every NPC to belong to a faction, such as Bandits, Townsfolk, Elves, etc.. Each faction would then have an opinion of each other faction, stored as an integer rating, and ...
user avatar
  • 1
0 votes
1 answer
38 views

How to keeping my AICar on track?

so today I made an arcade race game but stuck on make AICar that keep on track when play, what I've made is the AICar sometimes cutting the track or like making a shortcut to the next checkpoint and I ...
user avatar
0 votes
0 answers
50 views

UE4 - Make AI move up and down?

I have this AI character that flys around on the x and y axis in random directions, but is it possible to make the character move up and down randomly? I tried movement input with a lerp and delay but ...
user avatar
0 votes
1 answer
353 views

Enemy beelines before wandering in 2d topdown [closed]

I'm making a top down shooter in Unity. The enemy AI travels straight to the middle of the screen before actually starting wandering when I put in this code. What can I do to fix this? (I'm using ...
user avatar
2 votes
0 answers
38 views

Finding a path to a circular zone in continuous space [duplicate]

I need to find the shortest path for an agent that wants to use a ranged attack against the specified target. This means that the path's ending point should be inside the range of the attack and have ...
user avatar
  • 121
1 vote
1 answer
87 views

How to create the slow random movement effect you see in shmup enemy idles?

I’ve noticed in a lot 2D shmups, after enemies accelerate onto screen and arrive at their arrival point, they don’t simply sit static at their arrival position, but rather begin to gently move in ...
user avatar
  • 1,307
0 votes
0 answers
336 views

Companion AI with NavMeshAgent causing jittery movement on the X-Axis

I'm trying to do a companion AI that follows around my player but with a certain distance. I first tried to self-program the movement behavior. but realized quickly that a ...
user avatar
  • 11
0 votes
1 answer
322 views

Unreal Engine 4 AI Character Pawn Entirely Unresponsive to Movement Commands

I'm new to game development and to Unreal but I cannot for the life of me get my AI character pawn to move at all using any method I know. I'm developing a 2d Sidescroller game using a Tilemap. I have ...
user avatar
0 votes
0 answers
74 views

Sparse voxel octree for 3d pathfinding and Manhattan distance

I've been learning about using sparse voxel octree for 3d pathfinding based on Daniel Brewer's chapter in Game AI and his talk at GDC 2015. One aspect that I'm really confused about is exactly what is ...
user avatar
  • 101
0 votes
1 answer
437 views

How to implement Vector3.MoveTowards follow with random movement

I want to implement an AI behavior where an enemy runs towards the player while sidestepping randomly and aggressively (like in this video: https://www.youtube.com/watch?v=35Ut_C4eL40) Currently I am ...
user avatar
  • 63
4 votes
5 answers
399 views

If an AI is sure it is going to lose, what can it do to make the game fun for the player?

Context: I am contributing to a sequential turn based strategy game. I have an idea of how to improve it, but I need some input to help me do so. We currently have a really dumb AI that just follows a ...
user avatar
1 vote
1 answer
305 views

Implementing priority structure into a behavior tree, to react to player actions

My goal is to have a behavior tree that can run alone (autonomously) but also react to input from the player. I'm making an AI for a hack and slash game where the AI will fight you, chase you, etc. ...
user avatar
  • 28
1 vote
1 answer
310 views

Behaviour Trees: How to clean up when a sequence is interrupted?

I'll try to show my problem on a minimal example, in reality it's more complex: It's a simple behaviour, that repeats "an action" that has a certain animation. If a player gets close, this ...
user avatar
  • 151
0 votes
0 answers
601 views

How can I make Enemy follow the player in unity

I have a 2d platform game where I want the enemy to follow the player for some time Currently the enemy constantly follows the player - ...
user avatar
0 votes
3 answers
1k views

Behavior Trees or GOAP for Rimworld-like game?

I am currently making a Rimworld-like game. For now, it is identical in appearance, how the map works and how the pawns (colonists) are supposed to function. Core world-generation logic and A* ...
user avatar
0 votes
1 answer
58 views

Method to make character roam map isn't working

I'm an absolute beginner in Unreal Engine, so sorry for any strange mistakes, formatting, etc. I'm trying to make a game for a project where an enemy chases the player through a maze when it spots the ...
user avatar
  • 1
0 votes
1 answer
91 views

A* algorithm: need help fixing path that come in contact with obstacle

I am using A* as a pathfinding technique for my AI; it works fine until it gets close to an obstacle (in my case rocks). Right now it just continues the loop if it finds a neighbor thats a rock. It ...
user avatar
  • 17
4 votes
0 answers
105 views

Navigating an AI that shouldn't take the shortest path but the scenic route instead (e.g. fish)

I'm working on a sidescrolling game with an underwater "fish-like" AI that has some goals (interacting at various locations) and things to avoid (player). Started of with a Navmesh and ...
user avatar
  • 151
0 votes
0 answers
605 views

Implementing complex AI in an ECS?

I'm having a hard time wrapping around how something quite stateful such as complex AI would be handled in a pure ECS (such as components being only data and systems operating on that data) Things ...
user avatar
-1 votes
2 answers
1k views

Check if NavMeshAgent can reach position with dynamic obstacles

I am currently checking if a position in the NavMesh is reachable. It is reachable without the NavMesh obstacles. But the moment I add it, NavMesh's CalculatePath() ...
user avatar
1 vote
0 answers
63 views

How to adjust a path to avoid collisions with moving obstacles inside a nav mesh?

I'm writing a script for a bot and I'm a little bit stuck. There's a game, there's a player (me) and I want to get from point A to point B. I can find the path via bot's API (it returns a ...
user avatar
0 votes
2 answers
1k views

Behavior tree: why?

I am new to UE4 and game programming altogether. Following multiple tutorials and documentations I see mentions of behavior trees. In tutorials they do not use them in favor of blueprints because they ...
user avatar
  • 3
0 votes
1 answer
233 views

Minimax Algorithm Scoring Mechanism

I'm basically trying to understand the chronology/sequence of the algorithm and where should I call the scoring mechanism function that calculates the score of each move and returns an int. For ...
user avatar
0 votes
0 answers
49 views

What are AI characters doing when not in the viewport?

In a game like star wars battlefront, 100+ AI characters are competing against each other both onscreen and offscreen to shoot each other and capture bases. My question is what types of efficient ...
user avatar
  • 113

1
2 3 4 5
16