-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lanes core #222
base: master
Are you sure you want to change the base?
Lanes core #222
Conversation
Add generic Note.LaneIndex getter for determining lane placement Engine logic for Tremolo and Trill lanes Replace DetectLanes bool with CurrentLaneIndex > TotalLanes Reset lane-specific engine properties in one place Use bools for lane note properties instead of comparing flags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Guitar and Keys, every note inside of a trill and tremolo phrase is assumed to be part of the lane. There are special considerations for drum rolls and cymbal swells where that is not always the case. Only the notes that appear the most in the phrase will get the appropriate lane flag.
Chord tremolos are still possible here if more than one note is tied for the most appearances, but kick notes will not be included in the case of a tie. Kick tremolos are only possible when kick notes are the undisputed winner.
YARG.Core/Chart/Notes/Note.cs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note.LaneNote
is read during generic BaseEngine
and TrackPlayer
logic to get around instrument-specific property names. GuitarNote
returns NoteMask
to allow for tremolo chords.
YARG.Core/Engine/BaseEngine.cs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TotalLanes
/CurrentLaneIndex
keep track of how many lanes are left at the current time in the chart. If there aren't any left, then lane logic is skipped.
RequiredLaneNote
is the next expected player input to extend the leniency window while lane behavior is active. This stays constant during tremolo phrases, and alternates between two values during trill phrases.
NextTrillNote
and RequiredLaneNote
swap values every time a player input satisfies the current RequiredLaneNote
value.
LaneExpireTime
is the timestamp where lane behavior will be turned off if the player does not keep inputting the RequiredLaneNote
value. While CurrentTime < LaneExpireTime
, overstrum inputs that are part of the lane are ignored and missed notes that are part of the lane will be counted as hits instead. This time added to the update queue while lane behavior is active so that leniency will always be turned off at the exact specified time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't handle the engine stuff, but just a suggestion: put this information in the struct as summary comments.
} | ||
|
||
// Intercept a missed note while a lane phrase is active with allowances remaining | ||
protected bool HitNoteFromLane(TNoteType note) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A check for HitNoteFromLane
should be included anywhere that MissNote
can be called across all engines. This will call HitNote
on a note that is about to be missed or skipped if it that note is part of the active lane phrase. If there is no active lane that can hit this note, the method returns false and MissNote
will happen like usual.
@@ -384,12 +465,83 @@ protected virtual void MissNote(TNoteType note) | |||
} | |||
} | |||
|
|||
protected void SubmitLaneNote(int newNote) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SubmitLaneNote
is called from MutateStateWithInput
across all engines. Once a lane has been activated, LaneExpireTime
will be extended by player inputs regardless of those inputs actually hitting any notes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TremoloFrontEndPercent
determines how much to increase LaneExpireTime
when the active lane is satisfied. This is expressed as a percentage of the current maximum frontend size. A value of 1.0 will forgive every note in the hit window. Larger values will extend the forgiveness threshold even further.
Parsing and engine support for trill and tremolo lanes on Guitar, Drums, and trill lanes on Pro Keys.