HaxeFlixel / HaxeFlixel/flixel

Setting `active` to false on `FlxState`s completely softlocks the game

Open
#3,056 19 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

was looking through how FlxGame updates the game and i realized that update() just blocks the function entirely if the state isn't active

this also blocks anything else from updating, like plugins or sounds or even the cameras

couldn't you just check if the state is active in FlxState's tryUpdate function? i feel like this was an oversight
and it doesn't really make much sense to stop the entire game from updating as a whole because a state's active variable was set to false

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 reading FlxGame.update and FlxState.tryUpdate, which the issue identifies as the relevant entry points. Verify how an inactive FlxState currently affects plugins, sounds, and cameras, then add or update coverage so those systems continue updating while the state itself remains inactive.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.