[ENHANCEMENT+BUGFIX] Reusable and stutter-proof Timer Sequences#7217
Open
NotHyper-474 wants to merge 1 commit intoFunkinCrew:developfrom
Open
[ENHANCEMENT+BUGFIX] Reusable and stutter-proof Timer Sequences#7217NotHyper-474 wants to merge 1 commit intoFunkinCrew:developfrom
NotHyper-474 wants to merge 1 commit intoFunkinCrew:developfrom
Conversation
15aa780 to
a65e2a1
Compare
a65e2a1 to
ca5f01e
Compare
ca5f01e to
819681e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Reworks the
funkin.util.TimerUtil.Sequenceclass to allow it to be reusable, allowing the improval of memory usage.More detailedly:
autoDestroyconstructor parameter, defaults totrueto keep the original behavior.multipliervariable.startandstopfunctions. The first will restart the sequence from the beginning and the latter will cancel it. Pausing is still handled by therunningproperty.FlxTimerinstance is used instead of one for each event, this was done to fix issues with timers that'd usually occur during a lag spike.Screenshots/Videos
The video demonstrates this PR successfully fixing the Nametag bug (presented in the second game window that was opened). I've added a functionality to the code that creates an artificial 300 ms lag-spike whenever I press a key, that I've used to successfully reproduce the bug.
sequence-finally-fixed.-whattheshit.mp4