![]() ![]() I assume you're doing something along the lines Regarding your derivative, you may already be getting problems at small timesteps. To avoid a possibly expensive exp call (I guess in GDScript, that does not matter much), and that formula breaks hard at delta < -1/lambda. Velocity = velocity / (1 + lambda * delta) For positive delta, it is furthermore perfectly fine to approximate the above update to Normally, it decreases the velocity and is benign and stable, but if you feed that negative delta, it increases it uncontrollably. With some positive friction strength lambda. ![]() Velocity = velocity * exp(-lambda * delta) Even if you implement your timestep physically accurately, negative steps just reverse the mechanical time, not thermodynamic time. I remember reading in a very old shmup review something along the lines of "The game slows down when the action gets too much, but then again, that helps to get through the tougher spots." Ultimately, what I guess I'm saying is that control over the number of physics steps and delta arguments should be given to the game, with reasonable Negative timesteps are out of the question. ![]() Sure, that means it gets slowdown if frames are missed or the framerate drops to 30 fps, but in some cases that may be preferable to the alternative. A slightly more contrived example would be old-school fixed timesteps some game may decide it works best if it engages v-sync and just assumes to get _process-calls 60 times per second. > A legitimate case where you would want _process to still be called on zero timesteps is if you want to implement your own framerate statistics, you'd miss render frames. > Reply to this email directly, view it on GitHub > You are receiving this because you were mentioned. > *If anyone else is able/unable to reproduce this, please reply* > *This project uses GDScript rather than C# so that the bug is testable in > Master Standard, Master Mono: *Bug is Reproducible* Reply to this email directly, view it on GitHubĬan you also provide CPU and motherboard details? You are receiving this because you were mentioned. *If anyone else is able/unable to reproduce this, please reply* *This project uses GDScript rather than C# so that the bug is testable in Master Standard, Master Mono: *Bug is Reproducible* On Thu, Oct 17, 2019, 01:04 Nathan Franke wrote: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |