Skip to content

[ENHANCEMENT+BUGFIX] Reusable and stutter-proof Timer Sequences#7217

Open
NotHyper-474 wants to merge 1 commit intoFunkinCrew:developfrom
NotHyper-474:enhanc/reusable-sequences
Open

[ENHANCEMENT+BUGFIX] Reusable and stutter-proof Timer Sequences#7217
NotHyper-474 wants to merge 1 commit intoFunkinCrew:developfrom
NotHyper-474:enhanc/reusable-sequences

Conversation

@NotHyper-474
Copy link
Copy Markdown
Contributor

@NotHyper-474 NotHyper-474 commented Mar 23, 2026

Description

Reworks the funkin.util.TimerUtil.Sequence class to allow it to be reusable, allowing the improval of memory usage.

More detailedly:

  • New autoDestroy constructor parameter, defaults to true to keep the original behavior.
  • The time multiplier can now also be changed through the multiplier variable.
  • New start and stop functions. The first will restart the sequence from the beginning and the latter will cancel it. Pausing is still handled by the running property.
  • One single FlxTimer instance 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

@github-actions github-actions bot added status: pending triage Awaiting review. size: large A large pull request with more than 100 changes. pr: haxe PR modifies game code. and removed status: pending triage Awaiting review. size: large A large pull request with more than 100 changes. labels Mar 23, 2026
@NotHyper-474 NotHyper-474 force-pushed the enhanc/reusable-sequences branch from 15aa780 to a65e2a1 Compare March 23, 2026 01:24
@github-actions github-actions bot added the size: large A large pull request with more than 100 changes. label Mar 23, 2026
@Hundrec Hundrec self-requested a review March 23, 2026 09:39
@Hundrec Hundrec added type: minor bug Involves a minor bug or issue. status: pending triage Awaiting review. topic: changes assets Modifies the assets submodule, or has an associated pull request in the funkin.assets repository. labels Mar 23, 2026
@NotHyper-474 NotHyper-474 force-pushed the enhanc/reusable-sequences branch from a65e2a1 to ca5f01e Compare March 23, 2026 22:02
@NotHyper-474 NotHyper-474 force-pushed the enhanc/reusable-sequences branch from ca5f01e to 819681e Compare April 10, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: haxe PR modifies game code. size: large A large pull request with more than 100 changes. status: pending triage Awaiting review. topic: changes assets Modifies the assets submodule, or has an associated pull request in the funkin.assets repository. type: minor bug Involves a minor bug or issue.

Development

Successfully merging this pull request may close these issues.

2 participants