Questions tagged [ai]
The design and/or logic of how an in-game entity makes decisions about its behavior.
810
questions
0
votes
1
answer
34
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, ...
1
vote
1
answer
62
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 <...
0
votes
1
answer
116
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 ...
0
votes
1
answer
51
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 ...
0
votes
2
answers
127
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 ...
0
votes
0
answers
91
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 ...
0
votes
1
answer
113
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 ...
0
votes
2
answers
115
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 ...
0
votes
1
answer
134
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 ...
0
votes
0
answers
44
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 ...
0
votes
0
answers
76
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 ...
1
vote
1
answer
140
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 ...
1
vote
1
answer
124
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 :
...
0
votes
1
answer
149
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 ...
-1
votes
1
answer
72
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 ...
1
vote
0
answers
71
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 ...
0
votes
1
answer
73
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 ...
0
votes
0
answers
25
views
Minimal number of pairwise signals (mutexes) to follow a schedule
For a factory simulation, NPCs walk a path and stop in between to do things in work areas.
My task is to find the best work schedule. The NPCs can of course collide with each other on their way.
This ...
0
votes
0
answers
46
views
AI or simulated approach for 4 player spades
I’ve read the strategies but would like to learn better moves.
Sometimes watching a simulated AI game with take backs allows me to learn how to eventually play better.
For 2 player it is fairly simple....
0
votes
1
answer
768
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 ...
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 ...
1
vote
0
answers
92
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 ...
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 ...
3
votes
1
answer
584
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 ...
1
vote
1
answer
572
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 ...
3
votes
1
answer
107
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, ...
0
votes
1
answer
150
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 ...
0
votes
0
answers
173
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 ...
3
votes
2
answers
829
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 ...
2
votes
0
answers
155
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 ...
0
votes
0
answers
69
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 ...
1
vote
1
answer
291
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, ...
0
votes
0
answers
106
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, ...
0
votes
0
answers
147
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 ...
0
votes
0
answers
119
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:
...
2
votes
0
answers
307
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 ...
1
vote
1
answer
64
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 ...
0
votes
0
answers
495
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 ...
0
votes
0
answers
688
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:
...
2
votes
0
answers
283
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 ...
0
votes
0
answers
272
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 ...
0
votes
1
answer
55
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.
...
0
votes
1
answer
598
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 ...
0
votes
2
answers
368
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 ...
3
votes
1
answer
152
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 ...
3
votes
1
answer
182
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 ...
1
vote
1
answer
134
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 ...
1
vote
3
answers
483
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 ...
0
votes
1
answer
122
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 ...
0
votes
1
answer
157
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, ...