supertux icon indicating copy to clipboard operation
supertux copied to clipboard

Another attempt to fix wind

Open Hypernoot opened this issue 6 months ago • 2 comments

fixes #2592

There will be 3 types of wind:

  • legacy - original behaviour
  • wind - assumes that the object is in air
  • current - assumes that the object is in water

Currently, I'm trying to implement the "wind" wind ^.^

Hypernoot avatar May 30 '25 19:05 Hypernoot

/supertux/src/object/wind.cpp:139:23: error: implicit conversion loses floating-point precision: 'double' to 'const float' [-Werror,-Wimplicit-float-conversion]
  const float coef = 1/28.8;

tobbi avatar May 30 '25 20:05 tobbi

I made a demo version of the improved wind. Please, test if:

  • The old wind can be fully replaced by the new wind. If not, can a speed multiplier help?
  • The new wind resolves #2592 at least partially.

To full fix that bug, I would need to do a major overhaul of the player physics, which would be a breaking change. Currently, the player controls may override the wind force, so Tux can glitch through pretty strong wind.

Water currents are going to be added later.

If it turns out that this new wind is too much different from the original wind, then they may exist side-by-side, if the new wind is still a good improvement.

If it turns out that the new wind isn't that much better, so it's not worth implementing without making a physics overhaul as well, then this should be postponed to 0.8.0+. The water bouble variant can be still implemented in 0.7.0, but without any change to the wind physics.

Hypernoot avatar May 31 '25 08:05 Hypernoot