HaxeFlixel HTML5 font issues and freezes

268 views
Skip to first unread message

Harsh Bhati

unread,
Jun 14, 2015, 7:06:57 AM6/14/15
to haxef...@googlegroups.com

I am having multiple issues with HTML5 output. First of all, the fonts look blurry and dull. The default html5 backend freezes the game often, specially when resizing the window. I am using firefox on Windows 8.1 x86_64.



Here are my lib versions:
actuate: 1.8.4 1.8.5 [1.8.6]
box2d: [1.2.3]
flixel-addons: [1.1.0]
flixel-demos: 1.1.1 [1.1.2]
flixel-templates: [1.0.2]
flixel-tools: [1.0.5]
flixel-ui: [1.0.2]
flixel: [3.3.8]
hxcpp: 3.2.102 3.2.81 [3.2.94]
layout: [1.2.0]
lime-samples: [2.3.0]
lime: 2.3.3 2.4.1 [2.4.4]
openfl-bitfive: [3.0.0]
openfl-samples: [2.2.2]
openfl-tiled: [0.4.2]
openfl: 3.0.3 3.0.6 [3.1.0]
swf: 1.8.6 1.8.7 [1.8.8]+


SruloArt

unread,
Jun 14, 2015, 10:26:53 AM6/14/15
to haxef...@googlegroups.com
By "default" do you mean bitfive (do nothing) or openfl (you need to add the tag set name=no-custom-backend before you add flixel in your project.xml)? if you're using bitfive you need to use an iframe to see the actual results (or else it will fill out the browser's window, causing weird behavior), and if you're using the openfl backend then it's a little bit more complicated (maybe the freezing is just an ordinary lost focus event, maybe you're using legacy / next flags and that messes up your font, who knows). Blurry font is a well known issue so you can read this and see if that helps: http://haxeflixel.com/documentation/haxeflixel-targets/    

Harsh Bhati

unread,
Jun 15, 2015, 12:15:10 AM6/15/15
to haxef...@googlegroups.com
Hello!
By default I didn't mean the openfl-bitfive. But yeah, the picture above is from openfl-bitfive as that demo game just freezes in default. What is Openfl using for HTML5 rendering? Isn't it using Pixi now?
I also tested the openfl demos, even font rendering was okay there...

Harsh Bhati

unread,
Jun 15, 2015, 12:28:07 AM6/15/15
to haxef...@googlegroups.com
About legacy thing, I am confused. There are 'two' infrastructures of Openfl, old messy one and newer well designed one?

I removed the forced legacy mode from include.xml of flixel by removing this line:
<set name="legacy" unless="next" />

But then this happens for all target but HTML5 and Flash. No difference for naked eyes at least in terms of anything for even html5 and flash:
agnis@rudrasya-system:/usr/lib/haxe/lib/flixel-demos/1,1,2/Arcade Classics/FlxInvaders$ lime test neko
/usr/lib/haxe/lib/flixel/3,3,8/flixel/util/loaders/CachedGraphics.hx:77: characters 3-18 : flash.display.BitmapData has no field dumpBits
/usr/lib/haxe/lib/flixel/3,3,8/flixel/text/FlxText.hx:926: characters 10-31 : openfl.text.TextFormatAlign should be String
/usr/lib/haxe/lib/flixel/3,3,8/flixel/text/FlxText.hx:930: characters 10-32 : openfl.text.TextFormatAlign should be String
/usr/lib/haxe/lib/flixel/3,3,8/flixel/text/FlxText.hx:934: characters 10-33 : openfl.text.TextFormatAlign should be String
/usr/lib/haxe/lib/flixel/3,3,8/flixel/text/FlxText.hx:938: characters 10-30 : openfl.text.TextFormatAlign should be String
/usr/lib/haxe/lib/flixel/3,3,8/flixel/text/FlxText.hx:331: characters 2-66 : String should be openfl.text.TextFormatAlign
/usr/lib/haxe/lib/flixel/3,3,8/flixel/text/FlxText.hx:608: characters 2-66 : String should be openfl.text.TextFormatAlign

SruloArt

unread,
Jun 15, 2015, 9:10:39 AM6/15/15
to haxef...@googlegroups.com
With HTML5 it's actually even a little more complicated. You can read more about it in the OpenFL blog (http://www.openfl.org/blog/) and forum (http://community.openfl.org/) and the actual Github repo. When targeting html5 with HaxeFlixel it's recommended to work with bitmap fonts to avoid such issues. You can file an issue report if you think that's a general Flixel's bug here: https://github.com/haxeflixel/flixel.
Reply all
Reply to author
Forward
0 new messages