HaxeFlixel / HaxeFlixel/flixel

Concerns about ``renderBlit``

Open
#3,408 6 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

I've recently been running some tests on the Flash target with Flixel, and I've noticed that it's not very well supported. Many common elements of Flixel are broken on renderBlit, such as FlxSprite alpha, coloring, blend modes, etc. This raises the question: is it really worth supporting? The lack of concern over so many obvious issues with renderBlit shows that it's an underutilized and deprecated target.

Another concern is how it's implemented. The renderBlit variable is set when FlxG is loaded and cannot be changed at runtime. This makes checking it as a variable at runtime (especially in cases like FlxSprite rendering) pointless, given that overuse of if statements can be expensive.

My solution? Either completely remove renderBlit and the Flash target to improve code quality and eliminate the headaches of supporting Flash, which continue to hold Flixel back from reaching its full potential. Alternatively, replace instances of if (FlxG.renderBlit) with a compiler flag like FLX_RENDERBLIT to reduce compiling times and improve rendering performance altogether.

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 the renderBlit references described in FlxG and the FlxSprite rendering path, then compare the two proposed directions: removing the Flash/renderBlit target or replacing runtime checks with FLX_RENDERBLIT. Done requires a decided scope and a consistent approach to the listed alpha, coloring, blend-mode, and performance concerns.

Written by the indexing model from the issue text.

Assessment

Domain
computer-graphics, game-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.