Skip to content

Conversation

@BigBuckBunny12
Copy link

Agreement

By creating a pull request in stk-code, you hereby agree to dual-license your contribution as
GNU General Public License version 3 or any later version and
Mozilla Public License version 2 or any later version.

This includes your previous contribution(s) under the same name of contributor.

Keep the above statement in the pull request comment for agreement.

Added a simple camera shake when the kart reaches high speeds. The intensity of the shaking effect is proportional to the speed and capped at a maximum. I included a toggle to disable the feature in the camera settings menu.

@Alayan-stk-2
Copy link
Member

While not as bad as I feared it may be, I would generally characterize the camera shake as unpleasant. Personally, I wouldn't want this. If you want you could make a video demo (using an appropriate amount of zippers, nitro and drifting) and show it on the forum and IRC to get some opinions.

Besides, there is also the motion blur option if the goal is to communicate a feeling of high speed. Its current trigger requires a zipper usage (see HandleZipper in local_player_controller.cpp), but I think it would be more worthwhile to revise its activation conditions than to introduce camera shake.

@BigBuckBunny12
Copy link
Author

Thank you for the feedback!

My initial idea was to have the camera shake occur only at maximum speed (i.e., when the speedometer is completely full), but I couldn’t find a clear way to detect that condition in the codebase.
Would you happen to know where I could check for this, so I can run some more tests?

I could also try applying the shake only when a zipper is used at top speed, making it a short, instantaneous effect rather than a continuous one.

I’ll make sure to share the different versions with the community before updating the PR.

@Alayan-stk-2
Copy link
Member

My initial idea was to have the camera shake occur only at maximum speed (i.e., when the speedometer is completely full), but I couldn’t find a clear way to detect that condition in the codebase. Would you happen to know where I could check for this, so I can run some more tests?

There is no well-defined maximum speed. The maximum speed you can see in the speedometer is just a display limit, not something that caps how fast the kart goes (in 0.9.3 the speedometer was full at a speed of 30, in 1.x at a speed of 40, and for STK Evolution it will be at a speed of 55 - but the differences in actual maximum achievable speed are much smaller, there simply were many situations where the real speed would exceed what the speedometer can display).

The karts have a standard maximum speed, but various sort of boosts (nitro, drifting, zippers, slipstream, plunger...) provide for temporarily increased max speed. It's not really possible in practice to accumulate all the various kind of boost types at once, but having 2 or 3 different boost types active at once is not uncommon (for one, good players will nearly always have some level of drift boost active). The same "very high speed" could be achieved in various combinations of boost types.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants