In the previous screencast I showed how to install and setup HaXe and NME on a Windows 7 machine and compile to Flash and Android. This time I will demonstrate how to install and setup HaXe with NME on a Mac OS X machine and compile an open source project called BunnyMark to the iOS simulator in Xcode.

Note that you can only compile for the iOS on a Mac OS X as the compiler generates an Xcode project that Xcode then compiles.

If you have read my last post then you will know that I am endeavouring to increase my focus on mobile development. This lead to one reader mentioning an API called NME that allows code written in HaXe (very similar to AS3) to cross compile natively to Flash, Android, iOS, webOS, Windows, Mac, Linux, and HTML5 targets.

As the code is natively compiled (c++ for Android and iOS) the performance is perfectly acceptable for physics based games. This is in contrast to Adobe Air’s export to Android and iOS that has a Virtual Machine interpreting the code thereby causing poor performance.

So far I have ported a couple of earlier Box2D tutorials and successfully ran them on my Android phone at a smooth frame rate. I was also able to get it working well with the iOS simulator.

If you are interested in programming with NME then I thought I would post a screencast tutorial to demonstrate how to install and setup HaXe with NME and compile a simple HelloWorld application to Android and Flash.