Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gives Screenshake an actual smoothing value versus just jumping over …
…a single frame (#6524) <!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> # About the pull request <!-- Remove this text and explain what the purpose of your PR is. Mention if you have tested your changes. If you changed a map, make sure you used the mapmerge tool. If this is an Issue Correction, you can type "Fixes Issue #169420" to link the PR to the corresponding Issue number #169420. Remember: something that is self-evident to you might not be to others. Explain your rationale fully, even if you feel it goes without saying. --> ![image](https://github.com/cmss13-devs/cmss13/assets/158611449/58503bfd-0c2e-42b9-8534-8d2d01281d28) ![image](https://github.com/cmss13-devs/cmss13/assets/158611449/226062a7-0e76-40c0-b488-1a0481125ca6) Basically in game rn, screenshake uses jump easing, which over the span of a single frame sends you from your current screen position to the location of the screenshake. This PR gives it cubic easing, which while being one of the more 'rough' easing options, makes it look like your FPS arent dropping. # Explain why it's good for the game <!-- Please add a short description of why you think these changes would benefit the game. If you can't justify it in words, it might not be worth adding, and may discourage maintainers from reviewing or merging your PR. This section is not strictly required for (non-controversial) fix PRs or backend PRs. --> Screenshake looked extremely low FPS/jumpy and honestly over long periods of screenshake like queen screech kinda made your eyes hurt. CM's screenshake was one of the worst of any SS13 servers and had us looking extremely dated. Screenshake should be Screenshake,not give players motion sickness This PR fixes that, now with screenshake being heavily dependent on your personal FPS choice, with those who choose to play on the server FPS/lower FPS having whats more similarly to the older 'jumpy' screenshake, while those on higher FPS have to deal with random low FPS screenshake The vids speak for themselves # Testing Photographs and Procedure <!-- Include any screenshots/videos/debugging steps of the modified code functioning successfully, ideally including edge cases. --> <!-- !! If you are modifying sprites, you **must** include one or more in-game screenshots or videos of the new sprites. !! --> <details> <summary>Screenshots & Videos</summary> I have vids of what it looks like too for gun recoil but photoshop refuses to render my videos so theyll come later What it used to look like: https://streamable.com/c4wk97 One of the worst examples of old screenshake (at 48fps) https://streamable.com/iyj8d7 What it looks like now (note I use 48 FPS for first one, then server FPS for low fps ones) https://streamable.com/5nd11l </details> Like the stuff I make? [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/J3J6102QI0) # Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly label your changes in the changelog. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> <!-- If you add a name after the ':cl', that name will be used in the changelog. You must add your CKEY after the CL if your GitHub name doesn't match. Maintainers freely reserve the right to remove and add tags should they deem it appropriate. --> :cl: qol: Makes screenshake look less low FPS/jumpy /:cl: <!-- Both :cl:'s are required for the changelog to work! -->
- Loading branch information