HaxeFlixel / HaxeFlixel/flixel
Use a FlxPoint for position instead of separate x and y variables
Nobody has claimed this yet.
- Dominant language
- Haxe
- Stars
- 2.2k
- Forks
- 522
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
This would allow to use vector operations on sprites / objects position out of the box. To avoid any breaking changes we can use a getter and setter for x and y which would modify position.x and position.y. It'd be transparent for users and for the framework internals.
Another step for this would be doing what @Beeblerox proposed: merging FlxVector into FlxPoint so users could benefit from the useful vector methods there.
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 reviewing how sprite and object positions currently use separate x and y variables, then examine FlxPoint and FlxVector as referenced in the issue. Clarify the scope of merging vector functionality and preserving x/y compatibility before attempting implementation; done would require an agreed design and coverage of the affected position behavior.
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
- Needs clarification
- Newbie friendliness
- 20/100