Tools/Libs for HTML5 gamedev?

I’m a bit confused about libs posted on haxelib. Let’s suppose I want to write an indy 2D HTML5 game. Could you please tell me some pros and cons of some Haxe’s game engines and libraries in terms of doing 2D HTML5 game.

Should I better choice HaxeFlixel, or something at the somewhat lower level like Heaps, OpenFL or Kha? Why and when should I choice one over the other? HaxeFlixel seems like a good tool, but a few month ago I failed to install it due to some strange library conflict between OpenFl and Lime, I think I should have been installing some older version of Lime or something.

Obviously I could be using something like Phaser or Pixi.js, but the bindings to that libraries are outdated and I’d like to use a pure Haxe library to be able to use DCE and other compiler stuff. I could use something like Google’s closure compiler to minify and DCE JavaScript code, but I’m not sure if it is a good way to go.

What physics library do people tend to use? Box2d and Nape didn’t receive any updates for more than 5 years, Echo looks like something new and shiny, but I’m not sure if it is a battle tested library or not.

Do you use some ECS libraries? Do you write your own? GASM didn’t receive any updates for 2 years, but what about holy_ecs and ecso?

What tilemap editors do you use? How well does they integrate with Haxe code base? Right now Ldtk seems like a way to go for Haxe, but what about Tiled or Ogmo? What would you choice and why?

As Haxe doesn’t have a full blown game engine with editors and builtin tools like Godot, Unity and etc, I’d like to ask. What other tools do you use? What about packing textures to atlases and etc?

Thanks. Sorry for too many questions.

Welcome Alex,

I am not using Haxe for game dev a lot, but had success using HaxeFlixel / OpenFL / Lime a few month ago, with haxelib versions installed / managed via the lix package manager. Lix allows to version your haxe and dependencies versions (from haxelib or git repos), and try updating them while having a “working state” backup.

You seem to have done a good overview of the possibilities, and most of the frameworks you are mentioning are used in production. Haxe being used a lot for game dev, and the community very passionate, there is indeed a lot of possibilities with various degrees of maturity, user-friendliness, low vs high level.

For general workflow, LudumDare entries and associated logs or timelapses can be an interesting resources. In the end, the best one probably depends on the type of game you are aiming, dev experience, game dev preferences.

HaxeFlixel has a lot of examples and active community, and manage a lot for you if you aim for a 2d game. For starting, prototyping, and getting experience, it seems like the easiest option.

I would encourage you to try to set it up again, and post here, in HaxFlixel forum or HaxeFlixel discord if you have any setup issue, and work from examples. CoinFlip Studio’s blog also has nice tutorials and examples.

Hope you will have fun :slight_smile:

Hmm, this is a somewhat difficult question to ask.

It doesn’t really make sense to contrast Haxe with Godot/Unity. You can use Haxe’s C# target to target them - I cannot tell how well they work, but I will point out that for Godot there are manually adjusted externs while for Unity you’ll probably just have to add the dlls to your build.

I wouldn’t shy away from using Pixy/Phaser/… True, you don’t get DCE for framework code, but most of those libs are quite well optimized for size and are written specifically for the browser. Even after DCE a cross-platform framework may quite possibly wind up larger, because it brings a compatibility layer of sorts. If you’re missing good externs, you can generate pretty decent ones with dts2hx.

If size is a constraint, you probably want to avoid OpenFl (or perhaps try the precompiled version and use a JS bundler with tree shaking). It’s worth pointing to InnoGames’ fork nicknamed nadakofl, since it is much leaner. However the lower level APIs differ quite substantially, which is why it is not compatible with flixel (at least out of the box). OpenFl (and nadakofl) are primarily interesting if you’re coming from and ActionScript/FlashPlayer background, as you’ll feel right at home. That is the main source of OpenFl’s relative popularity, which also means that it has a somewhat larger eco system than other Haxe based alternatives.

For Heaps, you may also want to check out hide. AFAIK the people at Shiro Games use it, so it’s rather actively maintained (although I suspect it’s more centered around 3d Games).

As for ldtk: I’ve never tried it, but its creator is totally a demigod and even without personal experience, I would definitely recommend trying out if it feels right for you. It’s actively maintained and doesn’t lock you into any particular framework or language, so it’s a decision you can still back out from with relative easy.

In the end, anything and everything is possible. You need a workflow that fits both you and the game you want to create. It’s really impossible to answer in a general matter. The multitude of tools out there are living proof of the fact that different things work well for different people.

Just FYI — this issue is now resolved. The latest Lime and OpenFL that are compatible with each other have been released, and both are fully compatible with Haxe 4.2.