HTML5 Pirate Pig Sample

You may have seen the Pirate Pig sample before. It compiles to iOS, Android, webOS, BlackBerry, Windows, Mac, Linux and Flash Player. There is only one case where I wrote platform-specific code, and that was just to use the Android back button. It’s a completely cross-platform sample.

At that time I did not share an HTML5 version. If you are not aware, NME is a free, cross-platform framework that lets me generate native games and applications for each of the above platforms. It really works! I primarily intended to share a sample for NME, but it is also compatible with Jeash, another project that can create HTML5 applications.

It did not work at the time, but in the last two months, Niel has made consistent improvements to the Jeash project. With a little work, I was able to get Pirate Pig up and running in HTML5. Continue reading HTML5 Pirate Pig Sample

Cross-Platform Game Running in Flash *and* HTML5

I am very happy to share with you some of the first-fruits of integration between NME and Jeash — a working game!

Yesterday, I began the process of experimenting with adding an HTML5 target, thanks to Jeash. I am really impressed with how the project has developed since I last tried it out. Niel Drummond has done a great with the framework, as well as all others who have contributed to Jeash.

Similar to other targets in NME, I am publishing to Javascript using “haxelib run nme test MineHX.nmml html5″. Embedding assets as well as managing the build process is handled by the tool. I have unified Jeash with other targets, so you can still use a single API for loading embedded fonts, accessing bitmaps or playing sounds. The platform differences are being handled under the hood.



NME 3: Flash, C++ and now HTML5

From the beginning, Haxe was created to be a “multi-platform programming language.”

NME relies on Haxe for reliable compilation to Flash and C++, but these aren’t the only languages Haxe supports. Meanwhile, a project (you may have heard of) called Jeash used Haxe to mirror the Flash API… but for Javascript.

For everyone who is excited by HTML5, you can now publish to Flash, C++ and Canvas as easy as…

haxelib run nme test MyProject.nmml flash
haxelib run nme test MyProject.nmml ios -simulator
haxelib run nme test MyProject.nmml webos
haxelib run nme test MyProject.nmml android
haxelib run nme test MyProject.nmml cpp
haxelib run nme test MyProject.nmml cpp -64
haxelib run nme test MyProject.nmml html5

Here is my previous “Actuate Example,” running in Flash and in Canvas as a comparison: