peon2 / fbneo-training-mode

a simple training mode for multiple games on the fbneo platform
58 stars 35 forks source link

Feature Request: Trigger replays as reversal #106

Open hvihvi opened 1 year ago

hvihvi commented 1 year ago

Current Issue

To play a shoryu motion as reversal it takes multiple frames to input. There is currently an option to play an input when hitstun ends (called "Hit slot", in "Recording Menu"). Doing this means a shoryu starts playing at the end of hitstun, takes multiple frames to input, and is no longer reversal.

Easy solution: Start replay when hitstun starts

Add an option to start replaying when playerTwoInHitstun starts. That way players can time their recording to come out as reversal. The downside is that the player has to time their recordings (not an issue for games like garou where the reversal window is huge).

The steps to implement this would likely be: Split "Hit slot" as separate "Hit start slot" and "Hit end slot".

Hard solution: match the end of the recording with the end of hitstun

To do so we need to know when to trigger the recording. The sequence would look like this:

This comes with multiple difficulties:

Intermediate Solution: Manually set frame offset

Same as the easy one, start replaying when hitstun starts, and allow users to define an offset in X frames for the trimmed replay to start.

hvihvi commented 1 year ago

Working toward the easy solution, replacing the condition in this function gets the job done:

local hitPlayBack = function()
    if not recording.hitslot then return end
    if not modulevars.p2.inhitstun then return end -- this condition
    recording.playbackslot = recording.hitslot
    togglePlayBack(true)
end
Akayreddine commented 1 year ago

I was reading your PR and I thought of something :

What about using an offset slider ? Something between 1-60F, and when an offset is set the replay would play at start of blockstun + offset frames.

This has the benefit of allowing players to test various timings (reverssals at frame 1, delayed reversal etc) without having to time them manually.