xu2201g wrote:Thanks for posting your code. I didnt found a solution for the problem yet, but i get the effect even in bullet time and it increases with growing speedMultiplier.
Code: Select all
void Game::Update()
{
if (wnd.kbd.KeyIsPressed(VK_SHIFT))
speedMultiplier = .1f;
else
speedMultiplier = 1.0f;
player.Update(timer.MarkTime() * speedMultiplier, map);
}
Im not sure but i think the framerate/update rate respectively the timesteps causes this effect.
Here is a good article imho about different approaches of updating your game:
http://gafferongames.com/game-physics/f ... -timestep/
Oh... thanks bro, gonna check that out. I have removed the files from the git because I'm going to try some other things here, including what's described in that link you provided.
TryBane from discord helped me out yesterday and he found out that what was fkn up the jump is the float rounding, so i did some tests and figured that even the small difference between one jump and the other out of the bullet time mode is gone after you round elapsedTime to 2 decimal places.
Now what I'm going to try is instead of allowing the boost for 0.2s, i will allow it for like 200px or so, and rely less possible on the float type... If you want I can reupload my files, but you already have a copy in case you want to mess with it, right?
If you need me to upload them again just say the word.