yapb / graph

YaPB Graph Database
https://yapb.jeefo.net
20 stars 8 forks source link

How would one make bots stay on the upper floor without tripping an error in graph? #57

Open PRinceBhai opened 2 years ago

PRinceBhai commented 2 years ago

I just made a Graph for this map : https://gamebanana.com/mods/350910

As you can see this map uses a teleporter to traverse between the upper and lower floor, So I only added an outgoing path from the Teleporter to the waypoint on the upper floor, and bots are even able to use that, but since there is no way add to traverse back the console gets spammed with "%bot% failed to find path, seems the graph is broken." So the only way to fix that would be making a way to fall back onto the lower floor which has a half a foot of water in it to prevent fall damage (as the mapper intended). What I didn't wanted to do was make the bots jump back down into the water in order to make the graph error free. Because I use Water Fall Damage Plugin.

I wanted to know if there's another way to make this work without having the console being filled with spam and keep the graph error free.

@Vladislav4KZ What do you think?

Drevny13 commented 2 years ago

Usually , on maps with a teleport , I use paths behind the wall of the map , I place the points as if there is a path for the bot Ideally i think, need make a new flag for points, teleport entry and exit with indicating the direction where the bot should go

try to add dots in the air and connect the upper teleport in this way with the lower one

PRinceBhai commented 2 years ago

That's what I kind of did to make it work, first I cached the waypoint which is on the destination of the teleporter then I added a waypoint on the teleport and made a simple one way outgoing path to the destination point from the one on the teleporter : gg_cyberjump0000 gg_cyberjump0001

The thing is that the current graph format requires you to keep the entirety of the graph in a loop otherwise it'll mark it as a error. Which means you can't upload it on the graph server. So I had to add a way back down which is just a drop to the water on the ground floor. gg_cyberjump0002

I was wondering if there's a way we could make the graph system accept graph that are not in a loop.

Vladislav4KZ commented 1 year ago

You cannot create the graph that passes the checks which isn't in loop. Since due to the "point of no return" the bot will get stuck on the area with no way back, and it will only be able to move over a several nodes that have two-way paths between them. You can say it doesn't matter for that map, but what about the other maps?

The only way is to save the graph without checking, but you may encounter errors in the console like:

A* Search for bot "Bot nickname" has failed. Falling back to shortest-path algorithm. Seems to be graph is broken.
PRinceBhai commented 1 year ago

Well my workaround or fix for this problem was allowing the graph to be saved as is without having to have every waypoint in a loop. Maybe if this is only allowed for these type of maps? Or like a confirmation that's triggered when saving the graph or even adding a flag in the graph which states that the graph was saved without having a proper loop for the waypoints so that the players who download these type of graphs are aware of the workaround.