Open andrewrk opened 11 years ago
How much does he have to jump? A series of 2-gaps?
It's inconsistent. If you do at least 10 in a row of 1-gaps it should be enough to duplicate the issue.
I'll test it tonight.
FWIW, this is not introduced by your PR - this issue existed before.
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..
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?
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.
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