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

Flashing colors in surf menu #1913

Closed
ginger-brave opened this issue May 4, 2022 · 4 comments · Fixed by #2149
Closed

Flashing colors in surf menu #1913

ginger-brave opened this issue May 4, 2022 · 4 comments · Fixed by #2149
Assignees

Comments

@ginger-brave
Copy link

When you open a public game, colors start flashing

2022_0504_134731.mp4
@BuoYancYdabl
Copy link

epileptic-friendly game XD

@grigoriynikolaev
Copy link

So it isn't a bug, but a feature? Is there a way to turn it off system wide? Not an epileptic, but necessity to squint every time it happens is quit annoying.

@joshgoebel
Copy link
Collaborator

That looks like the animation boot sequence, but if we aren't shooting the boot screen then we shouldn't be doing the animation.

@nesbox
Copy link
Owner

nesbox commented Jan 12, 2023

Looks like a bug

@nesbox nesbox self-assigned this Feb 25, 2023
Madadog added a commit to Madadog/TIC-80 that referenced this issue Mar 2, 2023
Fixes nesbox#1913.

animEffect seems to expect a value between 0 and 1, and nesbox#1913 is caused by the surf coverFade animation lerping past 1, feeding values greater than 256 into fadePalette(), causing the flashing colors. This PR clamps movie ticks for each item ensuring animEffect won't receive values > 1.

This could create issues if any animation items rely on playing past their end. I didn't notice any while visually checking the editor and surf menu animations, but I could easily have missed something.

It might be better to move this clamp directly into animEffect().

Some of the AnimEffects already clamp x to a maximum of 1 (e.g. AnimEaseInElastic) but most don't.

nesbox#1913 could also be fixed by clamping the fadePalette() value between 0 and 256, though the lerp animation will eventually overflow.
Madadog added a commit to Madadog/TIC-80 that referenced this issue Mar 2, 2023
Fixes nesbox#1913.

animEffect() seems to expect a value between 0 and 1, and nesbox#1913 is caused by the surf coverFade animation lerping past 1, which feeds values greater than 256 into fadePalette(), causing the flashing colors. This PR clamps movie ticks for each item ensuring animEffect won't receive values > 1.

This could create issues if any animation items rely on playing past their end. I didn't notice any while visually checking the editor and surf menu animations, but I could easily have missed something.

It might be better to move this clamp directly to the start of animEffect().

Alternative fixes for nesbox#1913 include clamping the fadePalette() value between 0 and 256, or stopping the animation at the right time.
Madadog added a commit to Madadog/TIC-80 that referenced this issue Mar 2, 2023
Fixes nesbox#1913.

animEffect() seems to expect a value between 0 and 1, and nesbox#1913 is caused by the surf coverFade animation lerping past 1, which feeds values greater than 256 into fadePalette(), causing the flashing colors. This PR clamps movie ticks for each item ensuring animEffect won't receive values > 1.

This could create issues if any animation items rely on playing past their end. I didn't notice any while visually checking the editor and surf menu animations, but I could easily have missed something.

It might be better to move this clamp directly to the start of animEffect().

Alternative fixes for nesbox#1913 include clamping the fadePalette() value between 0 and 256, or stopping the animation at the right time.
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 a pull request may close this issue.

5 participants