jak-project/goal_src/jak2/engine
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
..
ai [jak2] implement statistics tracker (#3288) 2024-01-11 22:49:41 +00:00
ambient decomp: Copy over new docstrings back to jak 2's common code, write some scripts to help automate this (#3366) 2024-02-04 13:53:06 -05:00
anim Decompile joint, collide-func, clean up joint decompression code for all games (#3369) 2024-02-11 09:50:07 -05:00
camera [jak2] implement statistics tracker (#3288) 2024-01-11 22:49:41 +00:00
collide deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
common_objs [jak2] fix shadow origin using wrong joint (#3271) 2023-12-22 16:52:53 +00:00
data rename joint node and art element macros (#3111) 2023-11-01 23:16:00 +00:00
debug Decompile joint, collide-func, clean up joint decompression code for all games (#3369) 2024-02-11 09:50:07 -05:00
dma deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
draw Decompile joint, collide-func, clean up joint decompression code for all games (#3369) 2024-02-11 09:50:07 -05:00
engine deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
entity deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
game Decompile joint, collide-func, clean up joint decompression code for all games (#3369) 2024-02-11 09:50:07 -05:00
geometry deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
gfx [high fps] Increase input buffer size and fix cloud scroll speed (#3178) 2024-02-23 18:58:45 -05:00
level Rename bigmap-id enum entries (#3380) 2024-02-23 14:46:57 -05:00
load deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
math Decompile joint, collide-func, clean up joint decompression code for all games (#3369) 2024-02-11 09:50:07 -05:00
nav [jak2] implement statistics tracker (#3288) 2024-01-11 22:49:41 +00:00
physics deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
process-drawable [jak2] extended shadows hack + add/fix progress options (#3213) 2023-11-19 10:57:56 +00:00
ps2 [high fps] Increase input buffer size and fix cloud scroll speed (#3178) 2024-02-23 18:58:45 -05:00
scene [jak2] adjust progress generic item sizes + add scrolling effect (#3231) 2023-11-29 18:27:02 +00:00
sound deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
spatial-hash deftype and defmethod syntax major changes (#3094) 2023-10-30 03:20:02 +00:00
target [high fps] Increase input buffer size and fix cloud scroll speed (#3178) 2024-02-23 18:58:45 -05:00
ui [jak2] implement statistics tracker (#3288) 2024-01-11 22:49:41 +00:00
util decomp: Copy over new docstrings back to jak 2's common code, write some scripts to help automate this (#3366) 2024-02-04 13:53:06 -05:00