Sign in to follow this  
Viking

Waypoint plugin

Recommended Posts

Hello,


I am working on a plugin to get rid of the heavy functions required for bot waypoints inside gsc. Why? Simply because they waste a lot of variables and when a big amount of waypoints is used for a map then it lags and sometimes the loop kills the server due to the infinite loop protection.

 

The plugin includes the import of existing waypoint files (gsc or csv format) and their storage in a struct "array".

The A* algorithm is also covered and works fine.

 

Since the A* gets pretty slow when the amount of waypoints is too big i would like to ask for some help. Right now the A* behaves like the one used inside gsc. Big lags when the path is too long.

Google came up with some results how to improve the algorithm for faster results, but to be honest i am not skilled enough to implement them.

 

My thoughts:

A) Run 2 simultanious searches. One from start to end and the other from end to start.

The problem i am facing here is that both calculations do not always meet in half. Simply due to obstacles/walls which generate different results, depending on the site they are faced from.

 

B) Cancel the search after a predefined amount of length. The problem here is that not the optimal way is returned and that the algorithm does not detect if the path can not be completed in total.

 

C) Skip uninteresting waypoints during the calculation. Well... But How to find out what is important and what is skippable?

 

 

Maybe you have some ideas :)

 

Share this post


Link to post
Share on other sites

Maybe just use this instead link

That little improvoment you would get from doing it in pure C is not worth it. 

Share this post


Link to post
Share on other sites

I tested on pipeline which has 450 waypoints. If you have any bigger waypoint file you can send it to me and I can test it for paths you are having trouble with.

Share this post


Link to post
Share on other sites

I have made waypoints for mp_minecraft_new which are about 750.

I will upload it when i get home

Share this post


Link to post
Share on other sites
3 hours ago, Viking said:

I'm unable to test this, the waypoints seem broken. The algorithm I use just fails to find the path (I don't do node rediscovery) while stock implementation just enters an endless loop and scriptengine returns undefined after 16 seconds.

Share this post


Link to post
Share on other sites

Damn you are right, i did not create the mantle parts yet.

For every (longer) path a mantle is required, that's why the calculations fail.

I'll add them and upload the file once i am done.

 

Thanks so far :)

Share this post


Link to post
Share on other sites

I am finally done with all the mantles and the lags disappeared.

Looks like the missing connections between the different "height" levels were causing lags because the path could not be calculated.

 

One more question, more about the bots than waypointing...

My bots do not sprint and idk how to get it working.

 

After the AStar i catch the next waypoint and let the move there

	self botMoveTo(level.waypoints[self.nextWp].origin);
	self botAction("+sprint");

Any idea why the bot does not sprint?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this