Click here to Skip to main content
15,861,367 members
Articles / Mobile Apps / Blackberry
Article

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

Rate me:
Please Sign up or sign in to vote.
4.00/5 (1 vote)
20 Dec 2012CPOL2 min read 7.2K   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

Image 1

Image 2 

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.

Image 3
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™.

Image 4
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.

Image 5

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
BlackBerry’s team of experts is here to help you discover how to get most out of your BlackBerry smartphone.

Comments and Discussions

 
GeneralMy vote of 4 Pin
arif1462813-Jan-13 9:40
arif1462813-Jan-13 9:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.