What's the state of HTML5 target?



  • I have googled and there are plenty of answers to the question, but they mostly seem a few years old or not particularly authoritative.

    I am looking to make small games aimed at both desktop and mobile browsers that can run on any piece of junk hardware/HTML5 capable browser. Normally I'd just take my chances and see how it goes, but this isn't a personal project, so I need to check: Is HaxeFlixel a viable framework for this these days?
    Do I need some third-party HTML5 backend and how good are those really? Would I need to jump through hoops to get things working on mobile browsers, or does it just-work? Are the performance issues I've read about, and bugs like blurry text still an issue?

    Or should I just suck it up and learn Phaser/JavaScript?



  • Well, can't speak for others, but so far, for me, for this project, (which is somewhat resource-heavy) the performance was quite good. Without doing much optimizations, I get 60 fps on Chrome. On Firefox it kinda lags a bit, but again: no optimizations.

    Don't take my word for it tho :slight_smile: . Download FlxBunnymark, compile it on the platform you wish and check the results!

    You could also check Branch Ninja, done on HTML5, using HaxeFlixel of course. It kicks a bit on my Firefox, runs flawlessly on Chrome.



  • I can't truly speak for this since I'm starting out myself, but I managed to compile EZPlatformer and Flixius to HTML5 projects and personally at least for me I think:

    • If your priority is an easy-ish way to make your game for multiple targets at once (desktop, mobile and web) Haxeflixel is pretty good enough. Native Windows, Flash, and Android work well in my case (for the Flixius and EZPlatform project). They're all stable and they don't have performance issues as far as I can see. HTML5 also is OK enough, and works on localhost when I tried. Although...
    • if your priority really is HTML5 and want good performance browsers even more mobile, it's better to stick with JavaScript and find the ideal libraries (Phaser, Pixi.js, Quintus, Panda.js and many others exist) instead. Haxeflixel's HTML5 target is actually better compared to my small tests of it last year, but the performance is so-so (there's some noticeable lag even if no other apps are running), and there seems to be some odd bugs around it (in the EZPlatformer project it didn't initially load the map for the platformer, only did so after the red box fell to its death, and the font blurs seem to still be in effect somewhat in Chrome). And remember that Haxeflixel only works because of Lime/OpenFL libraries, and these libraries have to be imported as a small package within the compiled game, which adds some significant overhead in the file size.

    That said, DON'T be discouraged with Haxeflixel. I definitely am willing to recommend it since it can really work on mobile, desktop and Web platforms at once, and it's still good for quick game development when I look at the indie scene. If you're not doing overly complicated and/or networked games then you'll be just fine with it.



  • @rknonchalance Just for an example of HTML5 size, for a game I recently did for a jam, the added weight to the output JS was about 3 MB. But that included all my game code too.



  • @Aik I'm in the same shoes as you. I performed some tests with all projects from demos (you can see my results here). I hope it helps.



  • @aik It works great if you use webgl like "lime test html5 -Dwebgl"

    Otherwise it's slow and dirty

    That said, the gamepads don't seem to work... Also, in the non working with webgl category (for flixel 4.3.0) you have the stuffs like changing sprite's color, the red turns blue, the blue turns green, colors are wrong basically, and this http://api.haxeflixel.com/flixel/addons/display/FlxTiledSprite.html doesn't work

    The rest does, as far as I can tell, and sound doesn't seem super fast, but I haven't fully tested yet so maybe I'm wrong on this one

    Phaser definitely have those things working, but then depending on the version some stuffs might be broken, like anchors on sprites for instance

    Edit: And I just realized I'm replying to a year old post


Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.