Documentation on porting to a new target?


Where would I get started if I wanted to create a new target for OpenFL/Lime? Is there any documentation on what pieces need to be in place to get that done?



I think the first step is to get your language target supported by Haxe itself. IMO OpenFL/Lime support all targets that Haxe support (except PHP).

The language would be C++, or C. I didn’t think that would be a big hurdle. Where do I get started implementing OS interfaces, rendering, etc?

There’s already a C++ target. I don’t think there’s a C one.

You can run lime test cpp to test it. You need to set it up first, though,

Check Lime’s “project” folder - that’s all the backend code that needs to be compiled for the target. It looks like step one is making sure SDL supports your target platform.

Unfortunately, I don’t know much beyond that, but you might be able to figure it out from what’s already there.

It doesn’t. What’s step 2? :slight_smile:

Implement an alternate backend, maybe? Or ask Joshua for advice.

If SDL doesn’t support your target, you might as well ask yourself if you should write a new backend or rather extend SDL to support whatever platform you’re aiming at.

As an example, when I added support for tvOS it was a trivial choice to first work on SDL to support that target and then add support in OpenFL by using that same backend.

It really depends on the platform you want to support? What is it?

It’s a home game console. I’m considering porting a game to one such console, and the choice of which one depends in part on the level of effort involved.

I agree that working on SDL sounds like a reasonable approach.

recently we added support to HXCPP for winrt target (UWP) which should run now on any xbox one. You can start there as it is an open API.

That’s a good suggestion, although at this point you still can’t publish UWP games on the Xbox One. This will probably change in the not too distant future, though.

Still, I was hoping someone could point me at the necessary bits that are needed to support a brand new target - like how to support a new compilation toolchain, for example.