PrismarineJS / mineflayer-navigate

mineflayer plugin which gives bots a high level 3d navigating API using A*
59 stars 22 forks source link

walk is error prone when bot has to jump repeatedly #14

Open andrewrk opened 11 years ago

andrewrk commented 11 years ago
  1. create a path where the bot must jump repeatedly to get there
  2. watch him accidentally fall
vogonistic commented 11 years ago

How much does he have to jump? A series of 2-gaps?

andrewrk commented 11 years ago

It's inconsistent. If you do at least 10 in a row of 1-gaps it should be enough to duplicate the issue.

vogonistic commented 11 years ago

I'll test it tonight.

andrewrk commented 11 years ago

FWIW, this is not introduced by your PR - this issue existed before.

vogonistic commented 11 years ago

I haven't been able to reproduce this issue. Right now I have a course with 10 2-block gaps in a row and it does just fine..

andrewrk commented 11 years ago

Interesting. I wonder if it has something to do with processor speed and using an event loop for the physics engine.

I also noticed that if I setControlState('jump', true) and just watch the bot jump over and over, it'll hurt itself somehow and eventually die. Does this happen for you?

vogonistic commented 11 years ago

I'm running it on a MacBook Pro Retina (2.7 Ghz) and don't see any noticeable cpu utilization. Maybe the event loop isn't running fast enough?

Yeah, I filed a bug on that a few minutes ago. I'm guessing that it doesn't settle on the ground properly in between jumps.

duralakun commented 7 years ago

To recreate this bug just make a 1 block distance between each block. So block, air, block, air, block..... The bot will jump too late, an easy fix is to change

const WAIT_TIME_BEFORE_NEW_JUMP = 0.3

in physics.js to a value lower than 0.1