HaxeFlixel / HaxeFlixel/flixel
Suggestion: Sequence manager (would enable editor add-on, too)
Nobody has claimed this yet.
- Dominant language
- Haxe
- Stars
- 2.2k
- Forks
- 522
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
In my current project, I often have animation sequences in the midst of gameplay, utilizing already-on-screen assets, and sometimes finishing with them being in new configurations.
I noticed that for such animation/story sequences, I end up with long chains of custom combinations of playing sounds, playing FlxSprite animations, running FlxTimers, starting FlxTweens, and starting FlxPaths, with various hodgepodges of callbacks to make the sequence look right. (This is what I ended up doing for a whole standalone scene, too, after trying unsuccessfully to use SWF for this purpose.)
It's nice if you're only using FlxTweens that you can chain them with .wait() and .then(). I propose extending this idea. It would be handy to have some kind of combined SequenceManager, which could track all of these components, not just FlxTweens, and allow you (and therefore the player, and the tester) to skip forward one step, one group of steps, or the entire sequence. Maybe just let FlxSound, FlxTimer, FlxPath, and FlxTween all implement some FlxCallBackable interface, and then take the callback chaining code out of FlxTween and put it in its own class.
My current method is to skip by completing all current tweens, timers, etc., but this has a couple shortcomings:
- there is no FlxPathManager, so FlxPaths have to be handled manually
- if there are other tweens and timers that ought to keep working normally because they are not part of the sequence, they are completed when they shouldn't be
With FlxSequenceManager this would handle these shortcomings, and also make it possible to have an in-game development tool for creating the sequences in the first place. More or less like a Flash animation editor, except that it's in-vitro, working with whatever assets are already in place at that point in time in your game, and uses flixel functions, so you have the full functionality of those and any custom code in Haxe, while being able to adjust animation parameters/timing without a recompile.
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
The issue names FlxTween, FlxSound, FlxTimer, and FlxPath as the components to review; begin by examining their callback and completion behavior. Scope the proposed SequenceManager and its skip semantics, including whether editor support is part of the change. No files or tests are identified, so completion criteria would need to be agreed first.
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
- Needs clarification
- Newbie friendliness
- 25/100