Kah vs. OpenFL when also needing Web (html5)

775 views
Skip to first unread message

Nathan Hüsken

unread,
Feb 2, 2014, 5:19:03 PM2/2/14
to haxe...@googlegroups.com
Hey,

I have to decide if I use openfl or kah for a 2D game project. I hear
openfl has pretty bad performance in html5. Since that is one of my
targets (also not the main target), I wonder if Kah would be a better
choice.

* Has Kah better html5 performance?
* I need a gui lib, stableuix seems to be nice. But it is only openfl,
correct? What about gui in kah?
* Any other libs I will miss in kah?
* Some other aspect I am not mentioning but should consider?

Thanks!
Nathan

Marco

unread,
Feb 2, 2014, 7:26:17 PM2/2/14
to haxe...@googlegroups.com
I played around with Kha the last few days but i still don't know much about it so my answers are probably not 100% accurate.

1. Kha is quite a bit faster than OpenFL when rendering a lot of rotating, animated images with alpha on HTML5 in my tests.
2. Kha has some gui components included: https://github.com/KTXSoftware/Kha/tree/master/Sources/kha/gui
wich seems to have a few more functions.
3. Kha has a integrated 2D game engine. OpenFL has multiple, for example Haxepunk and Haxeflixel.
Most libs are written for OpenFL because Kha is a very new project, actually i do not know any lib that is using Kha.
Some things you´ll miss out are support for external tools like TexturePacker and Spine animations.

On the other side the Kha api is much simpler than OpenFL`s Flash Api (in my opinion).
Today i started to port Haxepunk to Kha.
Porting means most of the time deleting all the code that handles drawing (2 different rendering methods for native and flash/html5 targets, complicated matrix calculations and varius stuff that is automatically done in kha) with a single function from kha.
So porting a lib to Kha when you need it shouldn't be to hard :)

Neverless is Kha a very young project and has some functionally not implemented yet like fullscreen support and drawing stuff like circles and curves.


Brennan Kinney

unread,
Feb 3, 2014, 9:57:36 PM2/3/14
to haxe...@googlegroups.com
I've heard that YellowAfterlife/Vadim's openfl-bitfive backend for OpenFL performs pretty good for game projects, maybe consider using that for HTML5 target? https://github.com/YellowAfterlife/openfl-bitfive

Joshua Granick

unread,
Feb 7, 2014, 11:40:26 PM2/7/14
to haxe...@googlegroups.com
Tested using BunnyMark on Firefox, openfl-bitfive performs almost 10 times faster than openfl-html5-dom using drawTiles. BitFive does not support all the same features (specifically drawing APIs) but it should power specific frameworks, such as HaxeFlixel and HaxePunk (I believe) which can optimize to use it.

We have plans for a new HTML5 backend, you can track it here:

https://github.com/openfl/openfl/issues/180

Thanks!

Disar

unread,
Mar 11, 2014, 8:04:22 PM3/11/14
to haxe...@googlegroups.com
Say Marco, any news on the HaxePunk port? I'm eager to know what you have been cooking up.

Mark Knol

unread,
Mar 11, 2014, 8:23:31 PM3/11/14
to haxe...@googlegroups.com
You could also consider using Flambe, that is optimized for (mobile) web.
https://github.com/aduros/flambe
Reply all
Reply to author
Forward
0 new messages