supertuxkart / stk-code

The code base of supertuxkart
Other
4.47k stars 1.05k forks source link

Reintroduce per-texture friction values #2433

Open Arthur-D opened 8 years ago

Arthur-D commented 8 years ago

Description: Some years back we had the ability to make for example slippery ice by modifying friction value per material. This was back when materials were edited by hand, and a lot of code changes has happened since then, so the feature might be broken since it wasn't ever used outside of a little testing.

Rationale: Personally I believe it wasn't used because of bad values/overuse in testing, so practically it didn't make sense for most tracks. Now I'm making a snow-themed soccer stadium/battle arena, and would like to have some patches of slippery ice here and there, to add variety and make the environment part of the experience (marketing speak for the win).

Potential roadblocks: Material handling etc might have changed since then, so the feature might need to be rewritten. Just found this lying around in stk_config.xml:

    <!-- friction: slip used for bullet skidding. A high value
         (like 10000000) disables bullet skidding. -->
    <friction slip="10000000"/>

This is for the really old skidding testing that was done around the 0.6 release, unless my memory fails me, might have been later (or even earlier).

Also I would ideally want this in the STK Blender panel, for easy access. If possible, maybe it could be made more generic than just friction, also combining zipper values and other things. However I cannot guarantee that this will get much use, or even used at all within the main game, so feel free to not prioritize this feature request.

auriamg commented 8 years ago

@samuncle do you have an actual use case for this? It's really not as simple as changing a simple parameter anymore, our physics engine is more and more complex and changing these properties would probably require fairly extensive tests and tweaking to physics