supertux
                                
                                 supertux copied to clipboard
                                
                                    supertux copied to clipboard
                            
                            
                            
                        Make rumble functions configurable
Affects GameControllerManager::rumble() and JoystickManager::rumble().
The functions were overloaded so as to be made configurable, but there is a default rumble (that now lasts 100ms instead of 300ms). Just a small refactoring job.
I have not figured out how to expose the rumble function to Player.cpp in a clean way yet, but this is a start.
Related to https://github.com/SuperTux/supertux/issues/2741.
Wait, I completely forgot about joysticks (and left in a mistake during a rebasing mistake) that skips most of the conditions.
Should hopefully be good to go? (Note: I don't own a joystick, so the changes affecting the joystick component are untested - even if they are presumed to be fine.)
Besides my previous comments maybe it would make sense to add rumble configuration to options menu? Because currently this change seems little bit pointless.
Because currently this change seems little bit pointless.
I haven't completed my work in trying to get GameControllerManager to communicate with Player yet - but I thought that I should send this very small refactor (which was the only working thing I got after completing my coding session) so that it's easier to pick it up again later or let someone else pick it up if I abandon it.
Besides my previous comments maybe it would make sense to add rumble configuration to options menu?
I do not know if I should do that yet, as that would require me to answer the following: Should I use the GameControllerManager class for storing these settings, instead of Player? I do not have a perfect understanding of how these components work together, and would appreciate some assistance.
Later on, I'd like to use information such as the direction that a player was hit from or whether the player got a fire flower more easily later.
I think you should trigger rumble when there's any type of screenshake, which does not require player
I think you should trigger rumble when there's any type of screenshake, which does not require player
Hm, would be a good start and one could immediately combine it with https://github.com/SuperTux/supertux/issues/2741.
I think you should trigger rumble when there's any type of screenshake, which does not require player
I'll look at whether I can get the Camera class to talk to GameControllerManager.
it's not a singleton?