Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

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
1 vote
0 answers
11 views

How to make AI Character move towards Actor Object

I have in my scene an AI Character and Actor Object, but the character won't move no matter what I've tried. You can see the current code with debug statements. I'm not sure what I'm missing because I'...
Robert the Bruce's user avatar
0 votes
0 answers
15 views

BehaviourDesigner Runtime Squads for new Formations

I'm struggling to make a new "Squad" at runtime from group selection to move in BehaviourDesigners Formations. The code for what I've done but this would turn this question into a novel, so.....
akaBase's user avatar
  • 121
0 votes
1 answer
49 views

Are GOAP & GBAB (Goal based agent behavior) the same thing?

I am reading Programming Game AI by Example. It shows a technique called Goal Based Agent Behavior, which seems very similar to GOAP. Are these the same, or there are key differences of which I should ...
videogamechef's user avatar
11 votes
3 answers
3k views

How hard to brake to perfectly smoothly reach the destination?

Goal I want the get the required minimum deceleration to perfectly smoothly reach a target. (The car's AI should know how hard it has to brake to be the perfect valet.) Research "How can I ...
st_phan's user avatar
  • 213
1 vote
1 answer
93 views

remaking Pong in Godot but the opponent AI cannot locate the ball's coordinate correctly

I'm following a detailed YouTube tutorial on remaking Pong in Godot 3.0 but I have ran into an issue regarding the way the AI opponent reacts to the incoming ball, what's happening is that the ...
buzzbuzz20xx's user avatar
0 votes
2 answers
67 views

How to rotate spaceship quaternion to face target direction with constant angular speed?

I have an enemy spaceship, and I want to make it turn to face the player with (for now) a constant angular speed. The ship's orientation is a quaternion. How do I do this? Since this is totally free ...
Tachytaenius's user avatar
0 votes
0 answers
40 views

Convert new position into a velocity?

Still trying to fix my enemy's bugs. The current one is that Im using a step system that moves the enemy towards a certain position like this: ...
Pow's user avatar
  • 404
1 vote
3 answers
151 views

Add wobblyness to moving object

I've been working on a custom enemy "AI", the way it works is it generates a point inside a colliders bounds, then moves the enemy towards the point. Once the enemy reaches it. The point is ...
Pow's user avatar
  • 404
0 votes
1 answer
102 views

NavMesh Runtime Generation In Specific Areas

Unity allows the runtime generation of NavMesh surfaces with the Unity.AI.Navigation package through the BuildNavMesh method. However, this function re-bakes the entire NavMesh in the current scene, ...
Alec McKay's user avatar
1 vote
1 answer
75 views

Flying AI shakes when chasing and avoiding obstacles simultaneously

I've got a problem with my flying AI in Unity. When it just chases a target it's ok, but my system contains avoiding obstacles so when it starts to do it, it shakes weirdly. As I understood using <...
kotan4ik's user avatar
0 votes
1 answer
139 views

Do "procedurally generated" skyboxes on the Unity Asset Store use machine learning trained on existing images?

I noticed that some skyboxes on the Unity Asset Store specifically say they use AI image models like Stable Diffusion, for instance "Stylized Space Skybox pack": The description of this ...
Job_September_2020's user avatar
0 votes
1 answer
52 views

Why are the transform game objects moving away from the snail when they are swapping their direction?

I am making a game in which I created a character (main player) and another character(snail). Now the snail will move on the ground, when there is no ground detected it will change its direction. I ...
gamePlay's user avatar
0 votes
2 answers
155 views

How to make ranged RTS units move to their firing range from an opponent using flow fields?

I am trying to make a simple real-time strategy game (only the battle system of units fighting each other; no building, no economy, only battles and victory). I am using flow fields to make the units ...
Hao Hao's user avatar
0 votes
0 answers
146 views

Obstacle avoidance via steering behaviour when near gaps

I'm trying to implement RTS-like character control on C++/SDL2 for a character with a rectangular hitbox. I have a path-finding algorithm ready and I want to implement obstacle avoidance steering ...
SavedowW's user avatar
0 votes
1 answer
276 views

How to make enemy turn to face the player while attacking?

I need help making this code work. It is made for the enemy AI to move and patrol, chase the player and attack the player. The problem is when it starts to attack the player, then the player can move ...
Darius Van Vuuren's user avatar
0 votes
2 answers
145 views

How does a bot know who is an enemy?

How does a bot know who is an enemy if "enemy" encompasses not only one player, which can be just hardcoded? For example, in Warcraft 3, we can have two bot teams with faction alliances and ...
Taras Fityo's user avatar
0 votes
1 answer
280 views

Context-based Steering

I added context-based steering functionality to my 2d sideview free-roam shoot-'em-up game. Essentially enemy units emit raycasts eventually towards every direction, I determine interest and danger ...
Christian Finke's user avatar
0 votes
0 answers
67 views

How to apply avoidance to path following with root motion?

My Character Blueprint uses Root Motion to control locomotion (taking location and turning it into a direction to move). However, root motion is not compatible with avoidance pathfinding such as ...
Candle's user avatar
  • 141
0 votes
0 answers
79 views

applying gravity breaks entirely this AI movement code

I'm calling this function every 0.078 seconds so about at 13 fps using a timer connected to _ready() this way my game can easily run over 400 enemy units with ...
Cei's user avatar
  • 863
1 vote
1 answer
226 views

How to efficiently detect targets for AI?

A creator named NovemberDev made this game without having performance in mind, yet his enemy AI, while being relatively simple, is still extremely fast: his game can have hundreds of enemies all ...
Cei's user avatar
  • 863
1 vote
1 answer
148 views

How to implement NPC that reads player input and counters it?

input reading = NPC reads the input of the player and instantly reacts to counter everything the player does. So, is it like : ...
Cei's user avatar
  • 863
0 votes
1 answer
227 views

AI for global decision-making in 4X games

I understand how things work in combat, but not quite in terms of global decision making. For example, in Civ, at the global level AI has to juggle multiple objectives, e.g. whether to invest money in ...
Alex's user avatar
  • 103
-1 votes
1 answer
82 views

where should i start if i want to make an enemy from robots forever 2 (or if you are unfamiliar a physics based enemy that uses procedural generation)

this is probably a long shot, but I didn't really know where to ask this question. I just wanted to ask if anyone knows any resources that can help explain how to make something like this. Thanks, and ...
Milo Does Gaming's user avatar
1 vote
0 answers
89 views

Using physics to maneuver a spaceship through a point with a specific velocity

I've been tinkering with a space simulation. There are ships, and the flight code can modify the velocities and orientations of the ships directly, with limits for maximumSpeedChangePerSec (basically ...
HateDread's user avatar
0 votes
1 answer
162 views

Cannot access pawn from attached actor component

I have a pawn blueprint that contains some AI movement code, and looks like this: Now I'm attempting to move that functionality into an actor component so it's easily transferrable to other enemy ...
Nightmare Games's user avatar
0 votes
1 answer
2k views

Unreal 5 Actor Can't Move

I have an Unreal 5 actor with some basic blueprints involving a "Simple Move to Location". I've created a NavMeshBoundsVolume, and both the actor and destination point are inside it. The ...
Nightmare Games's user avatar
0 votes
0 answers
16 views

Does Unity have any automated parameter tuning?

I have parameters like -detect enemy range -firing range -coverage zone width -etc. for a dodgeball game and ideally would like to run the game over and over until I get the highest win rate against ...
mLstudent33's user avatar
1 vote
0 answers
147 views

steering behaviors collision avoidance: vehicle shaking before arrive at destination

I have made a test sketch of collision avoidance using javascript, as you can see right here. I want the vehicle to move to the clicked location, avoiding obstacles on the way. It is working, but not ...
Ricardinho's user avatar
18 votes
2 answers
6k views

Why is reinforcement learning not widely adopted as an AI tool for agents in well-known games?

Reinforcement learning has shown remarkable success in game-playing agents, as seen in the achievements of AlphaGo and OpenAI's Dota 2 AI. There are a few tools, such as Unity ML Agents, to integrate ...
rcmalli's user avatar
  • 291
3 votes
1 answer
665 views

Characters ai code organization

I want to create a an ai with finely customizable character. The ai should be able to handle generic behaviors, like scheduled activity, shared across all character, but have specific override for ...
user29244's user avatar
  • 327
1 vote
1 answer
883 views

Random NPC Movement & Stopping Within A Specific Distance

I'd like my NPC characters to move and stop randomly within a certain range. Here's an example of how I'd like the orange NPC to be able to move and stop freely within the green box: Is there a ...
PayasoPrince's user avatar
3 votes
1 answer
123 views

How do I design a "Chores" or "Errands" system?

I have a number of entities running around in my game, and I am running into a headache trying to design and implement a system for them to both generate and assign the tasks. More than anything else, ...
Raven Dreamer's user avatar
0 votes
1 answer
198 views

Implementing a bot to find the player in a grid

I have a 2d array with ground represented by 0s and the walls represented by 1s. Player can use a LOOK command or a MOVE command. Look command returns a 5x5 array centered around the player and the ...
mathsymaths's user avatar
0 votes
0 answers
282 views

How to fix flaw with context steering

I have implemented steering behaviours where I get eight cardinal directions and calculate the 'interest' and 'danger' values for each direction and get the average of these for the enemy's output ...
Hasen's user avatar
  • 194
3 votes
2 answers
1k views

How should I design my AI in 2D fighting game?

I am currently trying to make an AI for my 2D Fighting Game like Brawlhalla or Super Smash Bros. The problem is that I don't know how to go around doing it, like what algorithm should I use. The ...
Arya Akhavein's user avatar
2 votes
0 answers
200 views

Scheduler for Event Driven Behaviour Tree

The Behaviour Tree Starter Kit (BTSK) on GameAI Pro suggests using a scheduler for an event driven behaviour tree. To recap: A behaviour tree (BT) is traversed fully every time the root node is ticked ...
Ralph's user avatar
  • 23
0 votes
0 answers
73 views

How to create a basic strategic AI?

I started creating a Vue3 version of the classic Sid Meier game Colonization. I have the basic player mechanics in place and even created a map editor. So I have 3 of the 4X in place: Explore, Expand ...
Thomas's user avatar
  • 101
1 vote
1 answer
409 views

Where to Save Health on Character with Behavior Tree - UE5

I've looked but havn't been able to find a the workflow for this searching online. I have an NPC, with a behavior tree. Right now it just moves around the map. It's supposed to have a health variable, ...
Candle's user avatar
  • 141
0 votes
0 answers
108 views

Simplifying game mechanics in "unseen" battles

I am writing a grand strategy game that is generally played from a zoomed-out, "strategic" perspective. With battle encounters, I want players to be able to zoom in, if they choose to, ...
Kristian D'Amato's user avatar
0 votes
0 answers
177 views

How do buildings in (Tile based) city builders/colony sims keep track of each other? [duplicate]

Like, how does a building in these games know if they're being powered? Or if they're within range of influence of a hospital or fire station, etc. How would they know where to send an NPC or ...
Sir Gaelence's user avatar
0 votes
0 answers
142 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: ...
user2615494's user avatar
2 votes
0 answers
369 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 ...
Austin Capobianco's user avatar
1 vote
1 answer
81 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 ...
xenon's user avatar
  • 437
1 vote
1 answer
649 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 ...
London Bowen's user avatar
0 votes
0 answers
712 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: ...
YoshGJ's user avatar
  • 505
2 votes
0 answers
321 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 ...
twi's user avatar
  • 21
0 votes
0 answers
365 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 ...
Reign of Error's user avatar
0 votes
1 answer
60 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. ...
Ciberman's user avatar
  • 135
0 votes
1 answer
721 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 ...
gunza's user avatar
  • 13
0 votes
2 answers
418 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 ...
user159264's user avatar

1
2 3 4 5
17