Skip to content

Conversation

PhilippeDataScienc
Copy link

Add ice slipping mechanics similar to player physics:

  • Add ice state tracking (m_on_ice, m_ice_this_frame)
  • Detect ice tiles in collision_tile()
  • Apply reduced friction on ice surfaces
  • Reset ice state each frame with proper management

Closes #733

Add ice slipping mechanics similar to player physics:
- Add ice state tracking (m_on_ice, m_ice_this_frame)
- Detect ice tiles in collision_tile()
- Apply reduced friction on ice surfaces
- Reset ice state each frame with proper management

Closes SuperTux#733
@tobbi
Copy link
Member

tobbi commented Sep 2, 2025

Hello. Thanks for your contribution. I just started the workflow builds. Could you upload a screencast of the changed behaviour? Otherwise I will try to create a screencast myself.

Apply identical ice physics behavior to enemies as used by the player:
- BadGuys now use same ice friction multiplier (0.1f) as Tux
- WalkingBadguys apply ice acceleration reduction during direction changes
- Remove artificial velocity threshold that prevented natural ice sliding
- Enemies now exhibit realistic ice sliding and momentum like the player

This ensures consistent ice physics behavior across all game entities,
providing the expected slippery surface effects for enemy movement.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@tobbi
Copy link
Member

tobbi commented Sep 3, 2025

Please use English comments in code.

@PhilippeDataScienc
Copy link
Author

https://www.loom.com/share/07899024061f4c058c7da639092502a5?sid=28914707-242d-4bba-907a-3f39dacd062e
Here you have a screencast of the effect on Haywire

@PhilippeDataScienc
Copy link
Author

How do i merge now ?
Seems to fail on Mac os

@tobbi
Copy link
Member

tobbi commented Sep 20, 2025

I will wait for a second review and then merge. MacOS failures are unrelated to your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enemies should slip on ice just like Tux does.

3 participants