Mobile platform build guide

Hi,

I think it would be nice if we can add mobile targets like android in the targets section in documents.
Today, I started to just learn heaps and was not successful to deploy it on android as there is no guide for that.
It would also nice to add guides and tutorials about touch handling and also guides to extend the engine using some plugins to add native utils like purchase, admob, sensors and so on.

Regards,
Abi

1 Like

+1 on this.

Mobile deployment seems still like a obscure art form.

Heap rocks!

1 Like

It’s still a long way to get there. To get it up and running you have to do a lot of manual steps. There is no streamlined workflow yet.

1 Like

There’s some links here https://github.com/HeapsIO/heaps/wiki/Hello-HashLink#compile-and-run-natively

However yes, I should try to spent some time looking at what it involves exactly. I don’t do mobile dev on daily basis so the mobile port was not by playdigious for Evoland 2 Android/iOS which runs well using Heaps + HashLink/C.

2 Likes

Is the idea that a HashLink build will eventually obviate the need for the use of AIR? Also what’s the mobile native vs. AIR performance difference?

Maybe a bash script can be added and can automate the stuff that we have it in lime, in the engines that use lime, like HaxeFlixel, you just need to to type lime test android. As heaps can deploy on top of HashLink, it is possible too.
However, the stable version of Haxe is 3.4+ and running heaps with HashLink gives error of incompatible HashLink binary.
I can also help if I pass these steps before destroying my Arch linux :smile:

Yes atm AIR works but is not very efficient. With HashLink/C you get a solid 60FPS and much more CPU than you will ever get with AIR.

@abisxir you need Haxe 4 latest preview if you want to work with latest HashLink. But things have been more and more stable on the HL side.

1 Like

The main thing with a mobile build environment is – it has to be kept up to date (and ideally with historical support) as XCode and Android Studio are versioned. That’s a tedious job that ideally would be maintained jointly by community members who use it regularly (e.g. for their jobs.)

Even lime’s build system seems to be running behind at times.

While using AIR isn’t ideal for performance, it does have four incredible features:

  1. it’s free,
  2. it’s maintained by Adobe,
  3. it’s entirely command-line / scriptable, and
  4. it supports iOS builds entirely from Windows (and Linux via wine.) – or at least it used to / is designed to… times may have changed.

I’d love to see a Heaps -> Hashlink flow aspire to similar goals.

1 Like

Just to inform you that I have started working on a Heaps/HashLink/Android project setup that does not require anything to download (apart Android Studio + NDK). It’s not yet ready - it just compiles hashlink but does not yet start the SDL window - and I will announce it when it’s completed, but you can watch changes here:

5 Likes

Good news :slight_smile:

So you took the CMake route to do that. Sounds like a good plan to have something up and running quickly. We can later come up with some Haxe scripts to generate the project files and stuff like that pretty much like Lime does.

Is there easy follow tutorial/Documentation for building Android/mobile targets, it would be easy for newcomers like me,
I have also created issue for same on repo: heaps-android -> (https://github.com/HeapsIO/heaps-android/issues/1) . It would be great if someone with experience in mobile building could spare some time to write tutorial.