Skip to content

Conversation

@PhilippeDataScienc
Copy link
Contributor

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 <[email protected]>
@tobbi
Copy link
Member

tobbi commented Sep 3, 2025

Please use English comments in code.

@PhilippeDataScienc
Copy link
Contributor 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
Contributor 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.

@Hypernoot
Copy link
Member

I tested it and it seems to work. Just... does this affect any other badguy except haywire?

@PhilippeDataScienc
Copy link
Contributor Author

I don't think so. I tried with a couple of bad guys but only haywire was slipping!

@PhilippeDataScienc
Copy link
Contributor Author

I don't think so. I tried with a couple of bad guys but only haywire was slipping!

did not tried all bad guys

Copy link
Member

@Hypernoot Hypernoot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, fair enough

@Hypernoot Hypernoot merged commit c62055b into SuperTux:master Nov 29, 2025
25 of 27 checks passed
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.

4 participants