Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ai]

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

0
votes
0answers
15 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 ...
0
votes
0answers
29 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
0answers
19 views

How can I make this object Instantiate in a specific position?

I have a really simple script that instantiates objects when the "enemies" object has 0 children, it should spawn in the position of EnemyT, but they fall through ...
0
votes
2answers
47 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
82 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 ...
0
votes
2answers
90 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
156 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
41 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
110 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
46 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
155 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
0answers
29 views

Construct Havok Navigation Mesh

I'm trying to build a navigation mesh with Havok AI, the NavMesh vertex data is modeled with 3D Max. Definitions taken from Havok to construct a NavMesh: ...
0
votes
1answer
59 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 ...
0
votes
2answers
238 views

How to represent a modular FSM for AI using ECS?

I am considering to implement AI using ECS which actually contradicts working with naive FSMs. My current idea is to have multiple components which represent the particular state an Entity that has a <...
5
votes
2answers
223 views

AI world exploration?

For one of my exams, we have to make an AI for some sandbox survival game. Well to be exact, we have been given a framework, and need to make a plugin that contains the AI logic. So far, I already ...
1
vote
1answer
67 views

Enemies overlapping

I have a simple WebGL maze game and has problem with enemies overlapping when they are going to target position. Now i'm detecting there collisions, but dont know what to do with them when they are ...
0
votes
0answers
37 views

Unity 3d, AI walking on surface normals?

im new to ai type stuff in this. im wondering if its possible to generate a navmesh to walk on surface normals. let me explain: ive been working on faux gravity. i finally wrote my own working ...
3
votes
2answers
350 views

How can I maneuver an AI pirate ship for a sea battle?

I'm trying to picture in my head what would be required to make an AI controlled enemy do the following in a top down pirate sailing game: Approach the player ship Bring player in line with port / ...
0
votes
1answer
121 views

Can you use A* to make a unit move nonspecifically?

A* is typically used to calculate the best way to move towards something, and it's quite flexible when it comes to threats, extra movement costs, and 'refuelling' on the way to something. However, if ...
0
votes
0answers
30 views

How can a arrival steering behavior ever stop?

I try to understand steering behaviors and have problems with arrival. Lets take this tutorial: https://gamedevelopment.tutsplus.com/tutorials/understanding-steering-behaviors-flee-and-arrival--...
0
votes
0answers
50 views

Why does my collision avoidance steering behaviour make my vehicle reverse?

I have a car that I want to turn automatically when it sees an obstacle. I found a good solution using Steering Behaviours, but unfortunately my implementation isn't correct yet. Instead of turning ...
0
votes
2answers
61 views
0
votes
1answer
69 views

FixedUpdate is Being Called Less and Less Over Time…Why?

My game is still in the very early stages, but basically I have an enemy that follows the player if it can see them and will continue to follow the player for a few seconds after the player leaves its ...
0
votes
0answers
82 views

Why is the Enemy's Sprite Flipping When it Sees the Player?

So I have a method that flips an enemies sprite if depending on what direction they're moving. I also have a script that determines if it can see the player. Currently, the enemy sprite faces the ...
1
vote
0answers
50 views

NavMesh - Changing Mesh by Jumping upwards

I have been playing around with the NavMesh and I have seen that there are different situations where an agent has to change meshes. When it works: Everything seems to work alright with links, if I ...
1
vote
1answer
67 views

Potential Field Pathfinding in a non Axis Aligned World

I am trying to create a game that has player created obstacles which can be placed anywhere in free space, and which has a large amount of enemy agents. In persuit of maximizing the number of agents I ...
0
votes
0answers
60 views

Making neural nets more efficient in Unity

Some backstory: currently using a Asus x555la so not the fastest laptop. Computing power is kind of the problem. Hi there. I am currently doing hand tracking in Unity. I have developed a half-and-...
2
votes
1answer
484 views

How to make ghosts AI chase Pac-Man in Java

I'm beginner at Java and I want to make ghosts chase Pac-Man in game. I read some algorithm like A* or Dijkstra but I don't know how to implement them in my game. Please help me.
0
votes
1answer
94 views

What does distance divided by acceleration mean?

I'm reading a book named "Programming Game AI by Example". Here's a method to help an autonomous character to slow down when it's getting closer and closer to its target: ...
0
votes
0answers
80 views

Example of situation I would like to solve with Machine Learning approach

I've posted the question in stackoverlow but someone suggested me to ask here. I paste here the full text of my stackoveflow question with some changes. I’d like to start studying something about ...
0
votes
1answer
120 views

Unity navmeshagent and doors

I'm trying to make an agent patrol around a maze. The maze is proceduraly generated and consists of many rooms connected with doors. The problem occurs when the agent reaches a door. I wrote a script ...
0
votes
1answer
201 views

Algorithm to solve a battle in a card game

I am trying to write a solver for a sort of card game. I mainly do that for fun, and also to be able to learn a bit about the different types of algorithms I could use for this problem. The rules of ...
2
votes
1answer
65 views

Poker AI's designed for casual play

DISCLAIMER: So I asked this on StackOverflow and was told it was not a good question for the community but was suggested to check here. If this question sucks or just doesn't belong here either, feel ...
0
votes
5answers
335 views

Does bad AI lead to more sales?

Games like HL2 and FEAR are legendary for having excellent AI. Recent titles (as of 2018) leave much to be desired. With improvements in our understanding of probability related state machines, and ...
7
votes
2answers
461 views

Game AI move towards player while avoiding an obstacle

I'm trying to move enemy towards player, while enemy also tries to avoid an obstacle if it's in its path. Here's a simple illustration of what I want to do: What I've tried: Making circular ...
2
votes
4answers
140 views

How to combine steering forces?

I am trying to understand how to implement and combine steering vectors for autonomous agents as described by Craig Reynolds. My understanding is that each steering force should be calculated ...
0
votes
0answers
92 views

Alpha-beta pruning enhacement for checkers

I am programming a checkers game with Alpha-beta pruning. I've read that using only this algorithm doesn't create a strong AI to compete for this kind of games. Also, I investigated about ...
0
votes
1answer
73 views

Vector field collision avoidance

I'm developing a simple "Geometry Wars" like game: 2D world and multiple enemy spaceships. The enemies should be able to pursue the player and avoid collisions between them at the same time. I've ...
1
vote
0answers
38 views

How to express AI area ownership?

Situation: Big open world-ish level Different types of real estate: Houses including some land around it Just houses without land Flats on different floors How to express AI ownership of any of ...
2
votes
2answers
140 views

More realistic AI chasing player

I am developing a stealth game. In the game when enemy sees player he starts chasing it. But there are a lot of covers. If player just goes behind of a wall it will be out of sight for this enemy. But ...
0
votes
0answers
24 views

Noise Emission only happening once in Unreal Engine 4

I'm a student studying game design, and I'm working on a project in Unreal Engine where I'm supposed to have an AI that runs away when I shoot at him. I'm making my ammo emit noise, but it only ...
1
vote
1answer
46 views

NavmeshAgent not to turn back

Imagine the blue part of this picture is streets and navmesh. the red object is a car with navmeshAgent. the green circles are the colliders set as triggered and they are the destination of the car. ...
0
votes
1answer
95 views

In behavior trees, how do you retain your place in a sequence?

For context, I am coding a naive implementation of behavior trees myself, in C#. Let's say I have two scenarios that I want to create behaviors for. Both AI's will traverse/patrol four specific ...
0
votes
1answer
169 views

How to calculate acceleration distance(frictionless, massless)

Object A is moving via. 2D rigidbody by velocity V and in script is defined breaking power P. Every frame of breaking (P * Time.deltaTime) is subtracted from velocity V (in other words, ignoring mass)....
1
vote
3answers
293 views

Realtime Goal Oriented Action Planning

I've recently discovered GOAP and interested in implementing it for the AI in a game I'm developing. Something I'm stuck on at the moment, is determining when to plan. I've read through an MIT paper ...
1
vote
0answers
52 views

Problems With Duplicated AI

I am having a problem with making duplicates of my AI. When one is within range, it performs normally. If two are in range, then they both freeze up. The AI are direct duplicates of each other. I don'...
0
votes
1answer
116 views

Problem with Unity NavMesh tools

I'm getting this error: Runtime NavMesh Builder source mesh combined mesh is skipped because it does not allow read access I checked all the models and it has the read permission. I also noticed,...
0
votes
0answers
37 views

AI how to choose target for sumo like game

I am building a game that is the same as an old game I used to play called Sumo in fusion frenzy for Xbox. The object of the game is to knock enemy spheres off the edge and stay in the middle of a ...
1
vote
0answers
245 views

Unity how to set Off mesh link speed

How can I set agent's speed on off mesh link? I want it to look like a jump, but now it looks like it was in slow motion.
1
vote
1answer
38 views

How should I implement hit detection netcode for AI enemies in a co-op first-person-shooter?

I'm working on a FPS/sandbox game that has multiplayer but no PvP. Since the game has no PvP, I'm trying to make the networking code favor the player as much as possible. For example, I allow the ...