.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Re: Navigation using AABB
Old
  (#51)
Neoptolemus
Member
 
Status: Offline
Posts: 93
Join Date: Apr 2012
Default Re: Navigation using AABB - 19-07-2017

Quote:
Originally Posted by The Storm View Post
Much better although the bot seems a bit nervous before jump.

Two things I can suggest about the framerate.

1. First record a demo, the while playing the demo start to do the actual recording.
2. About the issue in general - it sounds like something wrong with the calculation of the msec value.
Thanks for the suggestions, I'll give it a try if I can replicate the issue consistently.

Here is my to do list right now:

- Improve ladder handling when the bot is approaching from tight angles, to avoid getting stuck on the edges, or climbing up the wrong side

- Add drop calculations for non-adjacent sectors. Currently the bots can jump between platforms, but if the platforms are close enough, and the target platform is lower than the current one, it makes more sense to walk off rather than jump (potentially causing additional fall damage)

- Reduce zig-zagging when the bot is moving in a non-axis aligned direction. Take shortcuts in the path where feasible
  
Reply With Quote
Re: Navigation using AABB
Old
  (#52)
Neoptolemus
Member
 
Status: Offline
Posts: 93
Join Date: Apr 2012
Default Re: Navigation using AABB - 19-07-2017

Also, the nervous jumping is just the way I calculate a jump. The way it's handled now is:

- It is assumed the maximum distance a player can jump horizontally is 170 units when running max speed
- The run up required to go from standing to max speed is 80 units
- Therefore the max run up required for a jump is 80 * jump distance / max jump distance, so a jump of 85 units (half max) will require a 40-unit run-up if the bot is standing still (since it only has to jump half as far)
- Acceleration is calculated linearly, so if the bot is already moving at max speed, the run up will be 0, and at half-speed it will be 50% of the required max run up

Final calculation is:

Required run-up = (1.0f - (currentSpeed / maxSpeed)) * (80 * (jumpDist / maxJumpDist))

If the distance of the bot from the jump-off point is less than the required run up, then it will abort the run and back up to the max required run up (+4 units extra to ensure it has enough distance), because according to the calculations it won't have built up enough speed by the time it hits the jump off point.

It will also abort if the dot product of the jump direction, the direction the bot approaches the jump off point, and its movement velocity is less than 0.9 (i.e. it's approaching from the wrong angle and will miss the target).
  
Reply With Quote
Re: Navigation using AABB
Old
  (#53)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,618
Join Date: Jul 2004
Location: Bulgaria
Default Re: Navigation using AABB - 22-07-2017

I understand your calculations but it looks very unnatural, you should smooth a bit the movement before getting ready to jump.
  
Reply With Quote
Re: Navigation using AABB
Old
  (#54)
Neoptolemus
Member
 
Status: Offline
Posts: 93
Join Date: Apr 2012
Default Re: Navigation using AABB - 23-07-2017

Quote:
Originally Posted by The Storm View Post
I understand your calculations but it looks very unnatural, you should smooth a bit the movement before getting ready to jump.
Agreed, it needs some work still!

I added a step in the generation of nav data to adjust the size of generated sectors to be more accurate. The voxelisation process has a resolution of 10 units, so it's possible for a sector's min Z point to float up to 9 units above or below the actual floor. In some edge cases this caused the bot to jump up stairs that they could walk up normally because the voxel process reckoned they were 20 units high, and the GoldSrc step height is 18 units. This was solved with a second pass using simple traces up and down to "feel" for the floor and ceiling.

Weirdly, this now causes a crash on cs_italy during the building of jump connections, even though I confirmed that the code didn't do anything weird like create upside-down sectors (where the min Z is higher than the max Z). Literally all it does is slightly adjust the min and max Z positions of each sector.

Gotta fix that now. I also still have crashes when opening certain Natural Selection maps. Again, no idea why this crashes, but will need to look into it.
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com