HaxeFlixel / HaxeFlixel/flixel

Use a FlxPoint for position instead of separate x and y variables

Open
#1,856 18 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.