#Pathfinding/ignited ai

1 messages · Page 1 of 1 (latest)

tight jolt
#

I would love to learn how these work but there are absolutely no tutorials and I have no clue can anyone help / show me the basics

slender summit
#

How much do you already know

tight jolt
slender summit
#

What about circuits in general

tight jolt
#

I would say I'm good I've made some complex stuff just not something to this degree

slender summit
#

What complex stuff

tight jolt
#

Like I've made water bending and a bunch of fun stuff that not a lot of people can make

slender summit
#

So you know how running on authority works and setting positions and all that?

tight jolt
#

Yea

slender summit
#

Ok, well “ignited ai” is similar in that sense

tight jolt
#

I get the need to set position but I don't know the algorithm to where to set it

slender summit
#

Ignited Ai usually doesn’t really use an algorithm most of the time

#

It just does a follow movement, which works great usually especially because most ignited maps have no dead ends

#

For a basic ignited ai, all you’d need is a map, and nodes at each possible turn. And you can then have the monster move to a random one that’s accessible

#

When it sees a player then it can go to the closest node accessible to the player

#

Do you know how to use Raycast?

tight jolt
#

Interesting but I'm looking for like a maze solver ai

tight jolt
slender summit
tight jolt
slender summit
#

Dijkstra and A* are similar except A* uses Heuristics to find a more optimal path

#

Have you tried making or have made an ignited style thing that isn’t specifically meant for maze solving but instead just to chase you so you have a rough idea on how grids work?

tight jolt
slender summit
#

Ok it’s not mandatory, but it might make it easier if you try making one not intended for pathfinding just so you familiarize yourself with it

#

But if you just want A* algorithm I can tell you if you’re able to convert it into CV2

slender summit
#

Ok, you need a start position and an end position. The start position gets the surrounding neighboring nodes (about 8 if there are no walls).

Then it gets each nodes H, G, and F cost. H cost is the distance from that node to the end node. G cost is the distance from the node it came from + the G cost from the node it came from, and F is H+G. You also need to keep track of which node opened that one up.

Once you establish the costs for each node, you choose the cheapest one and move your “position” over there. Then you do the same thing. You get the surrounding nodes, and if it overlaps with nodes you’ve already opened, only replace them if it’s cheaper than it was before.

Once you reach the destination, you backtrack by going to the node that opened the current node up, and keep going backwards until you reach the start again

#

I don’t know if that makes sense or not so just lmk

tight jolt
#

Got it

slender summit
#

Ok, Goodluck!

#

also I don’t know if I mentioned it, but when you choose the cheapest node, you choose from across the whole grid of nodes that haven’t already been chosen

#

So it could be across the entire map