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
0answers
24 views

How to check in Unity whether tile B can be reached in a straight line from tile A?

I'm currently trying to smooth out my A* paths based on this article. This is what I want to achieve: But sadly I'm stuck at implementing the Walkable method. I ...
-1
votes
0answers
42 views

AI in car racing game [closed]

I am planning to make AI demo for portfolio. My plan is making car AI which have path following and obstacle avoidance with unity or unreal engine. I want to implement one more AI algorithm for it. ...
-2
votes
0answers
21 views

A* Algorithm For Large Units [duplicate]

i used https://www.geeksforgeeks.org/a-search-algorithm/ to build my A* pathfinding in my game. I am now trying to add large units so basically units that take up multiple tiles
0
votes
2answers
97 views

AI Behaviour design pattern which handles lots of diverse behaviours and mechanics?

I'm working on an 2D overhead topdown game in Unity3D and I want the enemies to have lots of diverse behaviours. How should I design the architecture with this in mind? For example I want: A simple ...
1
vote
1answer
45 views

How to Steer a Moving Object Away From Another Object(s)

I'm working with C# in Unity, and I'm making a top-down space shooter game in which there are many different AI-controlled ships flying around. The problem is that these ships often fly on top of one ...
1
vote
1answer
37 views

How does one organize AI interactions with Local and Remote Players?

Scenario: In a first-person multiplayer game, an AI monster grabs a player. (This would be first-person player on the client's local machine, and a third-person remote player on the master and other ...
20
votes
3answers
6k views

Efficiently pathfinding many flocking enemies around obstacles

I'm working on trying to improve the pathfinding for my game's enemies. Right now, they basically just constantly move towards the player's exact position by calculating the angle between themselves ...
0
votes
0answers
12 views

2d topdown enemy moving to player without overlap

I'm attempting to make an enemy move towards a player in a topdown 2d game. Currently I have it working, by getting the angle from the enemy to the player, then sin and cos to get the destination ...
1
vote
2answers
59 views

How to make a gameObject follow non trivial trajectories?

as the title of the question says, I was wondering if there is common method to make gameObjects e.g. enemies or bullets follow curvilinear trajectories before reaching their target. For instance, ...
2
votes
2answers
47 views

Why is the Enemy not changing direction when entering the collider?

I'm really new to Unity, and I'm trying to make a 2.5D platform game. I want to make my enemies walk on a platform and turn when they reach the end of the platform so I placed two triggers at the ...
1
vote
2answers
92 views

How can I make a computer opponent for my board game?

I am trying to create a game, not exactly checkers, but the level of its interactivity is on par with checkers as opposed to something more complex (I think) like chess. Anyway, according to my ...
0
votes
1answer
82 views

How to prevent enemies from oscillating left and right during chase?

I have a grounded enemy with a simple chase state. When in this state, the enemy moves with constant vel.x toward the player. If my player jumps directly above the enemy however, the enemy will ...
0
votes
3answers
139 views

How to Prevent Enemy Overlap

I am working on a 2D side-scrolling action platformer. I am currently working on the state logic for my enemies. These are humanoid enemies that walk on the ground They currently have idle, patrol, ...
1
vote
0answers
64 views

How to develop a bot for a(n) (arbitrary) FPS game without a game API?

I've been interested in artificial intelligence in computer games for a long time. The question that I have been asking for a long time and to which I have not yet found an answer is the following: ...
1
vote
0answers
33 views

Using MCTS in Unreal Engine

I have been making a turn-based board game in UE4 and have come to the point of making a first pass on the AI. I planned to use Monte Carlo Tree Search but this requires you to make (at least) one ...
0
votes
0answers
30 views

Emerald AI animal not fleeing

Hey guys I have set up a =n animal to be a cautions cowered but he stops instead of running away. I am using unity version 2018.3.11 with emerald AI 2.2. Here is how I have the scene set up : Emerald ...
1
vote
3answers
187 views

Algorithm for a dense crowd of people who avoid the player?

I want to make a game like this. When player moves other humans will move too. And other humans will push people around. Are there any algorithm for this ? How can i solve this very efficient way ? I ...
0
votes
2answers
39 views

Pathfinding with direction considerations

Consider the following road network. The car (orange) needs to get to the red circle. It drives on the right hand side of the road and is initially facing down. The shortest path is the blue one. But ...
3
votes
0answers
101 views

Coding Relationships in Games [closed]

I'm interested in researching coding techniques for coding relationships in games. I'm trying to look for resources, but haven't really come across anything yet. More specifically, in games where ...
0
votes
1answer
45 views

How to change the speed of an NPC?

I created a blueprint. I added several components to the blueprint. I made it follow a target point and it does it correctly. I'd like to make the NPC make this way to the target point faster, but I ...
2
votes
1answer
68 views

How to stop switching between paths to a moving target?

I've noticed after implementing A* pathfinding into my game, that there is exploitable/unrealistic behavior that goes on when the player moves between two nodes that alter the path of the AI trying to ...
0
votes
1answer
50 views

Error in the order of the target points to be followed. How to set the order of elements in an array?

I have a project where it has 1 NPC and 3 target points: In the project I set the NPC to go to target point 1, then to 2, then to 3. Expected path: Path that is occurring: This problem did not ...
0
votes
3answers
169 views

How do one NPC follow a succession of target points?

I have a project that contains 1 NPC (AI) and 2 target points. In the project I can make the NPC follow any of the 2 target points, but I can not get it to follow target point 1 and then target point ...
2
votes
1answer
95 views

Need instructions for my AI racing car game

I'm having a school project to create an 2D AI racing car game, but nobody know where is the destination, and the map is randomly generated. But to avoid the dead end, we must teach the car not to ...
3
votes
0answers
59 views

How to implement path-finding with a large number of blocking agents following similar paths?

I want to implement a demo like creeps laning in Dota 2. So for simplicity, there is Left team and Right team, they are enemies. Units from Left team move toward Right base, and units from Right team ...
0
votes
0answers
16 views

Tron type game AI algorithm [duplicate]

Im looking for a tron AI algorithm on snap!/scratch. If not can you help me develop an AI for this game?
1
vote
1answer
47 views

Is there a tried-and-true method for calculating or detecting the edges of platforms?

In terms of a simple 2D platformer, I was wondering if, over the years, a right way has emerged as far as determining whether or not a strolling character has reached the edge of the platform it is ...
0
votes
2answers
229 views

How to avoid enemies overlapping each other when chasing player in Unity?

I am trying to get enemies to chase player but without them overlapping each other when they get closer to the player. So far what I have is that I check for the distance between current enemy and ...
2
votes
1answer
120 views

Which Pathfinding Algorithm is Best For My Case?

I'm creating a top-down space shooter game where there is no real "map" per say since there is no real terrain, but there are obstacles in the form of asteroids, other ships and a few circular ...
0
votes
0answers
37 views

Chess AI Finding Checkmate Using MinMax

I have implemented a chess AI using a Mini-Max(With a partially working AB pruning) implementation. At the moment, it can search a depth of 5 and it is capable of playing a good middle-game. It pretty ...
0
votes
1answer
75 views

Minimax not blocking moves on board game

I have a minimax player for the gomoku game, connect 5. The minimax player does not block the moves when there is potentially 5 in a row or 4 in a row. I would appreciate if anyone can show me what I ...
1
vote
1answer
34 views

Python/java framework for developing artificial intelligence for board games like Diplomacy/Risk [closed]

I am trying to pick a python/java framework for developing artificial intelligence for board games like Diplomacy/Risk for research purpose. I am specifically looking for multiplayer, multiple-round ...
1
vote
0answers
90 views

Is there an established way to create a 2D XY NavMesh in Unity?

Specifically, one in the empty space between colliders, rather than on an XZ plane (more or less) over the surface of a collider? Specifically this is because I have a drone, in a current project, ...
0
votes
0answers
182 views

how to make AI do jump on navigation mesh system?

hi :D i'm currently using unreal for make a sand-box game for learning purpose. and due to the unique attribute of sand-box game, i am looking for how AI move naturally on map (which changes so often)...
1
vote
1answer
63 views

Snake AI - Is a Hamiltonian approach valid for all grid sizes?

So, as has been done many times before, I am designing an AI that can play Snake as effectively as possible. It didn't take me long to find this extremely useful thread here: How to find a safe path ...
0
votes
1answer
47 views

Steering constantly turning in circles

I've been working on a fish system in a compute shader but bugs have been drowning me. The latest bug had me strip almost all the functionality to track down: Fish keep turning in circles. It starts ...
0
votes
1answer
634 views

Unity3D: AI follow player script for prefab enemy?

So I am having an issue, I have an enemy prefab that is created when the new wave happens(think of Nazi Zombies from Call of Duty, same system) but every script I have found that deals with ai ...
0
votes
3answers
91 views

Can I speed up “potential fields” pathfinding when it's working on a large grid?

I'm looking to implement a pathfinding algorithm that will allow me to throw hundreds of spiders at the players in my grid-based game. I can implement this with A*, but I'm worried that that algorithm ...
4
votes
3answers
240 views

RTS Unit AI: When to let the unit stop (due to local avoidence)

I am developing an RTS-like game, that have units that move and attack. I implemented path-finding and local-avoidance. One problem is when multiple units being ordered to the exact same position, ...
1
vote
1answer
53 views

How would I swap a character when a player touches a collider?

I wrote a simple script to attempt to do this and I created an empty game object and applied the script to it and dragged both of my sprites into my script and I receive no errors but nothing happens ...
1
vote
0answers
58 views

C++ text based football — lookup table and AI logic help

I am trying to develop a one-player text based football game in C++ strictly in the console without graphics. I am developing the game logic here below vs the CPU and I also need to do the vice versa (...
0
votes
2answers
96 views

Pathfinding How to store data for big terrain size

I am trying to implement my own pathfinding solution in unity but cant figures out how to store data. Following is my grid class which stores height, length and neighbour tile of tile. ...
1
vote
1answer
124 views

Roguelike game: detect intent of other actors by observing their moves

In grid turn-based roguelike game, how can I detect the following scenarios: other actor is following observing actor other actor is intentionally moving to block its path Path blocking can happen ...
1
vote
2answers
198 views

How do I implement efficient collision avoidance in 100 enemies

I am developing a libgdx game. It is a top down shooter and I am trying to make a good AI. I have tried to implement A* from the AI library from libgdx and it works fine but when i have a lot of ...
1
vote
2answers
225 views

How could a NPC find items that appear randomly?

My main question is basically: What is the algorithm that CPU players use in smash bros to find items like the smash ball? I am trying to make a small ai character that will "look around" and once an ...
0
votes
1answer
176 views

Unity3D: activeSelf issues

I've been trying to script some basic AI for a Unity Roll-A-Ball game, which involves two balls collecting cubes for points (one controlled by the player and the other controlled by AI. Everything ...
0
votes
1answer
208 views

Why is my Zombie enemy not chasing the player?

I am using C++ and SFML to make a top-down Zombie shooter. For now I have a player I can move around who can shoot but I am trying to have a basic AI for a Zombie who chases the player based on player ...
0
votes
1answer
99 views

Why won't InvokeRepeating work for me?

I am designing an FPS game and scripted this shooting enemy that is supposed to shoot at the player if he is in the trigger zone once every second, but it just rapid fires and ...
3
votes
3answers
328 views

Using the Command design pattern for game AI

I'm trying to learn the Command design pattern and apply it to the game I'm working on. First I read about the general implementation, and I feel like I understand it pretty well. Now I want to know ...
0
votes
1answer
129 views

libgdx - how to make enemies not overlap

I'm currently making a roguelike shooter in libgdx to get a better understanding of the library but I recently just stumped onto a problem where enemies would overlap each other while tracking the ...