HaxeLive - Live preview your UI in OpenFL

HaxeLive is an open source, free library that allows you to generate UI based on JSON files within your application, which can then be used later for your game, or redistribute.

Get the library: https://github.com/ColourID/HaxeLive

Install: haxelib git hxlive https://github.com/tienery/HaxeLive.git

An introduction video


This library parses JSON-formatted files into generated scenes that can be live-previewed for fast prototyping, as well as redistributed and reused for your projects.

In Main.hx, we have the following code to help us with the live preview capabilities:

import hxlive.Live;
import openfl.display.Sprite;

class Main extends Sprite

    private var live:Live;
    private var _lastTime:Date;

    public function new()

        live = new Live("info/test.json");



For more information on how to use this library, see the incomplete WIKI.

Planned Features

I do have other plans for this repository, including implementing further backends. These include:

  1. Implementing live previewing for the following backends: Kha and HaxeFlixel (at least that’s my plans)
  2. Implementing an easier way to skin your UI using themes
  3. Easier management of scene generation so that you don’t have to recompile when changing what JSON file to test.
  4. Adding an Exporter so that the JSON-formatted files can translate into a usable Haxe file if you prefer the hard-coded approach (not a high priority).

If you wish to improve, make bug fixes etc. you can make a pull request. Just be sure that if you make a backend for your own library, that you match the API seen in the current backend for OpenFL.

And that’s it for my marketing campaign. Enjoy! :wink:

1 Like

Would you pay for HaxeLive?
I am rethinking what could effectively be the business model for HaxeLive, and since the Exporter could involve a lot of time to get right and organised, I may require some assistance. Of course, no one is likely to give away their time freely to work on a project that they are not used to.

Before I move onto the big question, I would like to ask whether you would purchase “Premium” features of this project? This would include guaranteed Beta access to StoryDev 2 (my upcoming editor and spiritual successor to the original interactive story engine), an Exporter that would export the user interfaces you design into Haxe source code in HaxeLive, an editor for HaxeLive and perhaps a free copy of StoryDev 2 when it is released.

All of these premium features would be part of a tiered Pay-What-You-Want business model (tier prices to be confirmed).

You can answer this question by visiting the following poll (of which I will keep track of for the next few days): http://www.colour-id.co.uk/haxelive.html

What is the benefit of paying versus keeping it open source?
Paying for this product will generate at least one job, allowing someone else to help build and improve upon this project via a contract, instead of volunteering to help.

Voluntary work is good experience, but this is often not the case if the software in question is not high profile. This is not a high profile project in any way, and as a result the likelihood of someone contributing is low.

For a project to be high profile would mean extensive development, improvement and original source to be worth the attention. Not to mention it has to actually have attention and be spoken about in general for it to be even considered “low profile”. This project is neither, and thus in whichever case the best case scenario would be for me to pay for someone else to help improve this project.

The current state of the Exporter is a mess, but of course that is to be expected since it is in early stages. I have almost done the initialisation part of the code (ie. generating imports and instantiation of display objects such as Bitmaps and Text) but that isn’t even half of the Exporter.

What happens if no one is interested in buying?
Now depending on the results of the poll will depend on if I continue developing this project or only contribute whenever I feel like it. Ultimately, I wish to create a business out of my ideas and I do not want to waste my time on a project I know no one is going to buy.

In conclusion, the best thing to do right now is to acquire some votes from you. By using the link above, you can tell me via the poll whether or not you would purchase the aforementioned features should it be closed source.

If no one is interested, it is the simple case that I will only contribute to the project whenever I feel like it. I am currently happy with the state of the project, as it will help me to build StoryDev 2 (hence the reason for developing it). However, if there is genuine interest in the project and people wish to see further improvements and features, I would be more than happy to give you them, for money of course!

As the saying goes, “Time is money, friend!”