jak-project/goal_src/jak2/engine/gfx
Brent Hickey 685ff2cf1c
[high fps] Increase input buffer size and fix cloud scroll speed (#3178)
The game stores the last 3 frames of input (50ms of time at 60fps) and
often checks if a button was pressed within those 3 saved frames as a
condition.

When transitioning states, it often checks if some input was received
during the previous state (within those 3 frames) in order to quickly
transition out. A good example of this is when transitioning to
standing, it checks if you can jump this frame and if you had pressed X
recently, and if so, transition immediately to jump. This allows
transitions between states to feel more smooth/forgiving by letting you
jump at a later time when you are transitioning from falling->standing
than if you were only falling.

At 165fps the last 3 frames is only 18ms of time so the input windows
for these smooth transitions are almost 3x shorter.

This PR saves 15 input frames (enough to cover 50ms of time at 300fps)
for each controller and adds a (recently-pressed?) macro that checks all
15 frames. However, it only updates the necessary frames in history
based on the current frame rate. This way, 60fps continues to only check
against 3 input frames, 165fps checks against 9, 240fps checks against
12, and 300fps checks all 15.

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2024-02-23 18:58:45 -05:00
..
background deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
foreground [jak2] fix shadow origin using wrong joint (#3271) 2023-12-22 16:52:53 +00:00
generic deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
hw jak2: some high fps fixes (#3177) 2023-11-08 23:34:58 +01:00
mood [high fps] Increase input buffer size and fix cloud scroll speed (#3178) 2024-02-23 18:58:45 -05:00
ocean deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
shrub [jak2] Support per-proto shrub visibility (#3228) 2023-12-02 12:16:14 -05:00
sky deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
sprite game: fix intermittent sprite_distort related crash (#3357) 2024-02-02 17:51:21 -05:00
texture deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
blit-displays-h.gc deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
blit-displays.gc [jak2] widescreen fix for splash/jp subtitles (#2916) 2023-08-18 03:25:21 +01:00
font-h.gc deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
font.gc [jak2] scalable debug font + fix debug menu widescreen bugs (#3044) 2023-09-30 21:19:47 +01:00
math-camera-h.gc deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
math-camera.gc deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
vu1-user-h.gc deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
warp.gc start blit-displays decomp & renderer + improve decompilation of some DMA macros (#2616) 2023-05-04 18:34:09 -04:00