HaxeFlixel / HaxeFlixel/flixel
Batch Async utils
Nobody has claimed this yet.
- Dominant language
- Haxe
- Stars
- 2.2k
- Forks
- 522
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
FlxTweens have tween.then(otherTween) which allow chaining, but timers do not have anything like this. Would be nice to have batch timers like the one created for FNF by cyn0x8 in https://github.com/FunkinCrew/Funkin/pull/2391.
Even more so it would be nice if there was an interface or protocol shared by FlxTimer, FlxTween or any other async event that allowed them to be laid out in a single sequence, I.E.
new FlxSequence
(
[
FlxTween.tween(obj, {x: targetX }, 2.5, obj.doThing),
FlxTween.flicker(1.0),// no callback
FlxTween.tween(obj, {x: targetX }, 2.5, obj.doThing),
FlxTimer().wait(1.0, doThing2),
FlxG.camera.shake(0.05, 0.5),
obj.startAsyncProcess(1.0)
],
onSequenceComplete
)
the above would run each process in sequence, and then call onSequenceComplete
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing FlxTween chaining behavior and the FlxTimer API, then compare the batch timer implementation in Funkin pull request 2391. Define how a shared sequence would represent completion, callbacks, and async events such as tweens, timers, camera shake, and user processes. Done means a documented, consistent sequencing interface that supports the examples and invokes the completion callback at the end.
Written by the indexing model from the issue text.
Assessment
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100