HaxeFlixel / HaxeFlixel/flixel
`FlxG.resizeGame()` doesn't correctly update the width and height properties
Open
Nobody has claimed this yet.
- Dominant language
- Haxe
- Stars
- 2.2k
- Forks
- 522
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
- Haxe version: 4.2.5
- Flixel version: 4.11.0
- OpenFL version: 9.2.1
- Lime version: 8.0.0
- Affected targets: only tested on desktop
Code snippet reproducing the issue:
package;
import flixel.FlxState;
import flixel.FlxG;
class PlayState extends FlxState
{
override public function create():Void
{
var w = FlxG.width;
FlxG.resizeGame(FlxG.width + 1, FlxG.height);
trace(FlxG.width == w);
}
}
Observed behavior: Returns true
Expected behavior: Should return false
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 at FlxG.resizeGame and reproduce the issue with the provided PlayState snippet, checking how FlxG.width and FlxG.height are updated after the resize call. Done means the width and height properties reflect the new dimensions and the reproduction returns false.
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
- Mostly clear
- Newbie friendliness
- 38/100