Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Fast, Native Games for BlackBerry (without C/C++)

20 Dec 2012 1  
Fast, Native Games for BlackBerry (without C/C++)

This article is for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers

 

Fight the bad guys in Rune Raiders, an exciting, easy-to-learn adventure game.

Developers like Retro64 Inc, Artificial Games and Innivo have brought their titles to BlackBerry® in record time. For Ido Yehieli, this meant an increase in performance of “more than 10 times compared to using Adobe AIR” with only a few small changes to his code. How was this possible?

NME is a fast, cross-platform framework for rapid game and application development. Unlike other libraries, NME does not require that you write native code. It does not use a virtual machine or a scripting language. NME uses a language called Haxe to convert your code to C++ and OpenGL, with amazing results.

BunnyMark is a popular benchmark for Flash Player. Testing on a BlackBerry® PlayBook™, Adobe AIR rendered 500 bunnies @ 11 FPS. Using NME, the same device rendered an astonishing 5250 bunnies @ 30 FPS. NME applications are significantly faster than AIR (with or without Stage3D) and are comparable to applications built with other native frameworks.

Help Mr Nibbles solve devious puzzles and become the first hamster to enter orbit!

In addition to native, NME also supports publishing for Flash and beta support for HTML5. This offers a unique opportunity to create games that are optimized for the web, desktop and mobile, using a single codebase.

“I just tried [NME] today – super impressive. One codebase, compiled straight away … 60FPS!” - James Frost

This flexibility also enables support for BlackBerry OS 6 and 7 devices. Since they are unable to run native C/C++ applications, they can be supported using HTML5, Apache Cordova and BlackBerry® WebWorks™.

Pakkuman’s Defense is a fun and satisfying mix of Pac-Man and tower defense.

It is simple to build a game using NME. For anyone who already knows Flash, NME is an instant transition. Other developers will find that the API and language are still easy to learn.

Haxe shares roots with ECMAScript languages like Actionscript and Javascript, but supports more features such as conditional compilation, type inference, typedefs, enums, generics, iterators and compiler macros. Haxe also has a vibrant and helpful developer community.

“I think making this game in Haxe/NME is about as inspired as I’ve been as a developer for a long time. Really exciting.” - Andreas Rønning

Many popular libraries are available for NME, like Flixel, HaxePunk, awe6, Nape and Box2D. NME also supports native C/C++ extensions.

NME is available free for Windows, Mac and Linux: http://www.haxenme.org/download.

If you have more questions about Haxe or NME, or would like to learn more about how to build your own native BlackBerry games using the framework, let us know with your comments!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here