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
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.
From the beginning, Haxe was created to be a “multi-platform programming language.”
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: