HaxeFlixel / HaxeFlixel/flixel
FlxReplay doesn't record held mouse presses
Nobody has claimed this yet.
- Dominant language
- Haxe
- Stars
- 2.2k
- Forks
- 522
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
Keys will record presses and holds, notice 3 consecutive frames of the same data
219k38:1m
220k38:1m
221k38:1m
but the mouse won't record unless theres a change in any property, notice 133 frames missing until mouseX changes on 438
304km331,360,2,0
305km331,360,1,0
438km330,360,1,0
Playback will start each frame by resetting each input
https://github.com/HaxeFlixel/flixel/blob/dev/flixel/system/replay/FlxReplay.hx#L188
which sets the mouse's button state to 0
https://github.com/HaxeFlixel/flixel/blob/dev/flixel/input/FlxInput.hx#L46-L50
I recommend having the mouse behave like keys
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 with the playback reset in flixel/system/replay/FlxReplay.hx around line 188 and the mouse button state handling in flixel/input/FlxInput.hx around lines 46-50. Compare how key presses and holds are recorded across consecutive frames. Done means held mouse presses are recorded and replayed on each frame like held keys.
Written by the indexing model from the issue text.
Assessment
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100