#Pathfinding/ignited ai
1 messages · Page 1 of 1 (latest)
How much do you already know
Nothing
What about circuits in general
I would say I'm good I've made some complex stuff just not something to this degree
What complex stuff
Like I've made water bending and a bunch of fun stuff that not a lot of people can make
So you know how running on authority works and setting positions and all that?
Yea
Ok, well “ignited ai” is similar in that sense
I get the need to set position but I don't know the algorithm to where to set it
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?
Interesting but I'm looking for like a maze solver ai
Ofc
Ohh, like A* or Dijkstra?
Yes
Ok well it’s ironic I’m here then because I just made one today #circuits-show-off message for the first time
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?
I have but not the grid thing ik what a grid is tho
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
Just tell me and I'll try
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
Got it