![]() ![]() ![]() Generally, dropping one or two frames should not damage precision too badly - still unacceptable in competitive games though, where even small timing difference decides the game. If timing matters, such as in platforming, then game must also not change pace, in addition to not skipping input. If precision matters, such as when avoiding projectiles, then input is not to be skipped. If neither are important, then you can go about it any way you want - it's not relevant. It actually improves as the game runs slower, but skipping frames ruins is just as well as it does with timing. Both sudden speed changes and dropping input frames ruins timing and if it was important, ruins the gameplay experience. If it's important, then the game must always run at the same pace as well as not skip any frames. The key factor to consider is importance of input timing. Other than problems with tunneling (can be fixed with CCD or not having super-fast things) and jitter (maybe can be fixed by extrapolation or interpolation in draw routine), are there problems with this approach I'm not thinking of? Is this a common approach? How will box2d feel about this? Are there any other good alternatives? Not exactly a fixed timestep, I guess, but carefully managed. So it usually has a fixed timestep of ~60 fps, but it will drop to ~30 fps to get out of a death spiral. When the accumulator is more than twice the timestep, the timestep is doubled (as many times as needed, but probably usually just once). The timestep value has an exact binary representation and is just under 60 fps. Just off the top of my head, not really tested but you get the idea. While accumulator >= dt * 2 do dt = dt * 2 end ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |