HaxeFlixel / HaxeFlixel/flixel

Make FlxBitmapText the defacto flixel textField

Open
#2,717 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Improvement
Dominant language
Haxe
Stars
2.2k
Forks
522
Avg merge
34m
Merged PRs (30d)
1

Description

This is mainly a way to organize my thoughts, I added this to 6.0.0 issues, but that's not likely to happen.

FlxText Sucks

it looks like crap and it's performance is garbage. It's mainly used because FlxText is what people look for and it allows you to use fonts and it displays any character. This brings me to the cold hard truth: FlxBitmapText sucks even harder. While it renders pixel text with pixel-perfect crispness, you need to pre-render a bitmap of every character you'll need. With input text, this may need to include all international characters

Can we generate these bitmap fonts for you?

Drawing text to bitmaps works pretty well outside of html5. In non-web targets we could render the font atlas in real time whenever new characters are requested. in html5 we could generate atlases at compile time via macros. additionally, once multisheet atlases

this might be overkill, a simpler solution is to popularize something like Angelcode's BMFont tool that converts ttf files to bitmap fonts. I think BM font can be run via terminal commands, so maybe that's a route to go.

more info incoming

related:
https://github.com/HaxeFlixel/flixel/issues/2710

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 the related issue #2710 and locating the existing FlxText and FlxBitmapText implementations. The issue needs a concrete approach and acceptance criteria before work can be considered done, since it currently presents several possible directions without naming files, tests, or a selected solution.

Written by the indexing model from the issue text.

Assessment

Domain
game-dev, performance
Issue type
Feature
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.