HaxeFlixel / HaxeFlixel/flixel
CollisionFrontEnd
Nobody has claimed this yet.
- Dominant language
- Haxe
- Stars
- 2.2k
- Forks
- 522
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
PR, here: https://github.com/HaxeFlixel/flixel/pull/3431
Spinoff from https://github.com/HaxeFlixel/flixel/pull/3418
FlxObject.separate is weirdly laid out and could use a redo.
Operations like computeOverlapX should just compute the overlap, and not set touching flags. We can refactor this system completely and avoid breaking backwards compatibility if we move all of this to FlxG.collision.
I think FlxG.collision.separate should:
- Check whether the swept hulls overlap (once, not per axis)
- Compute the overlap of each axis
- Separate on the smaller axis before the other, setting touching flags when separating, not when computing overlap
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
Review PR 3431 and the current FlxObject.separate implementation linked in the issue, then inspect the proposed FlxG.collision.separate entry point and computeOverlapX behavior. Done means the collision flow checks swept-hull overlap once, computes axis overlaps without setting touching flags, and separates on the smaller axis first while setting flags during separation.
Written by the indexing model from the issue text.
Assessment
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100