Tutorial: Create the Falling Blocks application

In this tutorial, we'll explore the Falling Blocks sample application that is included with the BlackBerry 10 Native SDK. This application demonstrates how to perform common tasks such as handling touch, navigator, and sensor events, working with application data, and rendering content to the screen. For rendering, this app uses the Glview Library, which is defined in glview.h.

When this application starts, a single block appears on the screen and falls from the relative top of the screen to the relative bottom, depending on the orientation and pitch of the BlackBerry 10 device. A user taps the screen to create a new block at that position. The new block begins falling immediately. The blocks always fall from one side of the screen to the opposite side, even when the user changes the orientation of the device.

Device image showing the Falling Blocks sample app.

You will learn to:

  • Create the Falling Blocks project
  • Initialize OpenGL ES using glview
  • Set up a main application loop
  • Handle touch, navigator, and sensor events
  • Update application data and render the scene
  • Clean up application resources properly

Last modified: 2013-12-21



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus