SuperTux / supertux

SuperTux source code
https://supertux.org
GNU General Public License v3.0
2.5k stars 476 forks source link

Tower Of Ghosts: sometimes strange timing enemy timing #2318

Open erichstuder opened 1 year ago

erichstuder commented 1 year ago

SuperTux version: 0.6.2 System information: Debian 11, 64 bit

In the level Toser Of Ghosts the two enemies seen in the picture sometimes have strange jumping timing making it impossible to pass them by without shooting them. The timing changes from run to run. I would expect the timing to be always the same an in a way to pass them without shooting them.

Screenshot from 2022-10-16 18-49-57

By the way: Great game! Can't wait for the next version!

Regards Erich

bruhmoent commented 1 year ago

This is version 0.6.2. The latest non nightly release is 0.6.3. This issue is irrelevant anyways as the levels are getting revamped.

mrkubax10 commented 1 year ago

The timing changes from run to run. I would expect the timing to be always the same an in a way to pass them without shooting them.

Inconsistency probably comes from the fact that objects are loaded at different times depending on how and where player moves since there is something like "active area" inside of which objects are updated and outside not.

Semphriss commented 1 year ago

@erichstuder In short, this is an engine problem. Basically, everything that is too far from the player is "frozen in time" to avoid calculating their movements, which saves some CPU time and allows making big levels without lag. That causes a desynchronization of the enemies depending on where you are in the level over time.

There's no easy way to avoid this, unfortunately, except restarting the level and hoping that the enemies are properly synchronized.

The good news is, this level is known to be excessively difficult, and will be replaced in the future.

In the meantime, perhaps the engine should be adapted to account for this? (@ devs)