Skip to content
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

Engine support for treating solo frets separately from normal frets #224

Open
wants to merge 36 commits into
base: engine-fixes
Choose a base branch
from

Conversation

wyrdough
Copy link
Contributor

This PR adds support for solo buttons as found on Rock Band guitars and the Riffmaster.

During a solo section, all notes are treated as if they are tap notes when the solo buttons are used.

@RileyTheFox
Copy link
Collaborator

We decided a while ago that the change in logic solo buttons provide was something we were not going to have as it provides an advantage over guitars which don't have solo buttons.

We've considered this being added as some kind of modifier/engine setting but it's not been thought about too much.

@wyrdough wyrdough changed the base branch from master to engine-fixes November 28, 2024 02:37
@wyrdough
Copy link
Contributor Author

Changed to an engine parameter. Logic changes as suggested on Discord to prevent tap logic being triggered while standard buttons are held.

These particular ones can get quite spammy, and are only really helpful for developers
Also replace usage of chart event tracker with direct access of tempo list, since we already make that assumption
…lo tap logic to not trigger when any standard buttons are fretted.
It turns out that IsSoloActive doesn't get set until after the first note of the solo is hit or missed, so SoloTapAllowed now allows a note to be tapped when either IsSoloActive is true or if the note has the IsSoloStart flag.
This fixes an issue where it's way too easy to end up overstrumming when attempting to strum notes fretted with the solo buttons during solos.
Copy link
Member

@EliteAsian123 EliteAsian123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, thanks for the PR!

Please review the comments below for the changes I requested.

After that fix, I just need to know if this conflicts with any changes in the engine-fixes branch and whether or not this can be merged right now, or if we should wait (@RileyTheFox).

@@ -358,11 +363,31 @@ protected sealed override int CalculateBaseScore()

protected void ToggleFret(int fret, bool active)
{
// FIXME: This is a terrible hack
if((int) fret >= 10) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please please please do not use "terrible hacks" within PRs.

Before the big rewrite of v0.12, I made the mistake of merging PRs with hacks in them. They build up over time, and the codebase's quality just plummets because of that.

Unfortunately, because of this, before this PR is merged this needs to be fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is there so that the solo frets don't have to be special cased everywhere ButtonMask is used. I called it a hack, but I can't really think of a better way to do it, TBH.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I changed it to make the input button mask a ushort to accommodate the extra buttons and then calculate an effective button mask which is a bitwise or of the two sets of buttons to be used where ButtonMask was previously being used so that the solo buttons still act as regular buttons outside of solos.

If you can think of a better strategy here, I'm all ears.

YARG.Core/Engine/Guitar/GuitarEngine.cs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants