Introduction to BlackBerry NDK for
Game Developers
Aaron Ardiri
Principal Developer Evangelist
AARDIRI@blackberry.com
twit...
Development Platform Freedom

2
Open Industry Standards

3
Commitment to Open Source

http://blackberry.github.org

4
Code Sample: Main Entry Point
#include <stdio.h>
#include <stdlib.h>
int
main(intargc, char **argv)
{
fprintf(stdout, “Hel...
BlackBerry 10

Integrated

Social

Beautiful
6
BlackBerry Platform Services
low level integration with the BlackBerry platform

7
BlackBerry Platform Services
overview
the BlackBerry Platform Services (BPS) library provides an
application with a single...
BPS: Event Loop Code Sample
for (;;)
{
bps_event_t *event_bps = NULL;
bps_get_event(&event_bps, timeout); // -1, forever
i...
BPS: Platform Services Template
handling {service} events
{service}_request_events({param});

// request events

then capt...
BPS: Navigator
handling navigator events
navigator_request_events(0);

// request events

then capture the appropriate nav...
BPS: Navigator Events
navigator events of use for game developers
NAVIGATOR_EXIT
NAVIGATOR_SWIPE_DOWN
NAVIGATOR_BACK
NAVIG...
BPS: Navigator
invoking other navigator services
navigator_invoke(“http://developer.blackberry.com”, NULL);
navigator_invo...
BPS: Screen and Window Handling
composite window handling
the BlackBerry 10 platform provides a composited windowing
API (...
BPS: Screen and Window Handling
creating a 1280x768, 16bpp 565 (RGB) window
intparam = SCREEN_FORMAT_RGB565;
screen_set_wi...
BPS: Screen and Window Handling
FrameBuffer
for “oldskool” computer graphics enthusiasts – a pixel
FrameBuffer can be easi...
BPS: Screen and Window Handling
Open GL ES 1.1 or 2.0
to take advantage of the hardware accelerated 3D graphics
(Open GL E...
BPS: Screen and Window Handling
handling screen events
screen_request_events(screen_ctx);

then capture the appropriate sc...
BPS: Screen and Window Events
screen events of use for game developers
SCREEN_EVENT_POINTER
SCREEN_EVENT_MTOUCH_TOUCH
SCRE...
BPS: Sensors
handling sensor events
if (sensor_is_supported(sensor_type))
sensor_request_events(sensor_type);

then captur...
BPS: Sensor Events
sensors that may be available (check before use)
SENSOR_TYPE_ACCELEROMETER
SENSOR_TYPE_MAGNETOMETER
SEN...
BPS: Network Status
handling network status events
netstatus_request_events(0);

then capture the appropriate network stat...
Scoreloop Integration
social integration
•

user profiles

•

challenges

•

achievements

•

leader boards and high score...
3rd Party Game Engines

24
Simple Directmedia Layer
GNU LGPL v2 License

•

FrameBuffer and hardware accelerated Open GL

•

audio and multimedia pla...
gameplay
Apache 2.0 License

•

hardware accelerated Open GL scene graph

•

audio and multimedia playback

•

input, sens...
Cocos2D-X
MIT License

•

hardware accelerated Open GL

•

scripting support (JavaScript, LUA)

http://www.cocos2d-x.org
2...
Marmalade
Commercial License

•

hardware accelerated Open GL (3D)

•

audio and multimedia playback

•

numerous licensin...
Game Developer Highlights
let’s take a look at some regional indie developers
making the most of the BlackBerry 10 platfor...
Developer: Tactile Entertainment
ChasingYellow
•

Cocos2D-X

•

Leader boards

•

Challenges

•

Achievements (entry point...
Developer: Tactile Entertainment
Fruit Blitz
•

C++ with Open GL ES 2.0, Open AL

•

Leader boards

•

Challenges

•

Achi...
Developer: Tactile Entertainment
DynaStunts
•

C with Open GL ES 2.1, Open AL

•

Leader boards

•

Challenges

•

Achieve...
Distribution and Marketing
how to sell and make your games a success

33
Application Publishing
Publishing to BlackBerry World
• BlackBerry World is the on-device distribution catalogue
• a publi...
Application Monetization
Pre-mium, free-mium or combination?

many methods to monetize; all options are available to you
•...
Built for BlackBerry
Application Certification
•

recognized high quality

•

the official “stamp” of approval

•

give cu...
For More Information…
Native Development Resources
http://developer.blackberry.com/native/
BlackBerry Developer Blog
http:...
Thank You!
Aaron Ardiri
Principal Developer Evangelist
AARDIRI@blackberry.com
twitter: @ARDIRI
Upcoming SlideShare
Loading in …5
×

Introduction to BlackBerry 10 NDK for Game Developers.

541 views

Published on

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
541
On SlideShare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction to BlackBerry 10 NDK for Game Developers.

  1. 1. Introduction to BlackBerry NDK for Game Developers Aaron Ardiri Principal Developer Evangelist AARDIRI@blackberry.com twitter: @ARDIRI
  2. 2. Development Platform Freedom 2
  3. 3. Open Industry Standards 3
  4. 4. Commitment to Open Source http://blackberry.github.org 4
  5. 5. Code Sample: Main Entry Point #include <stdio.h> #include <stdlib.h> int main(intargc, char **argv) { fprintf(stdout, “Hello Worldn”); return EXIT_SUCCESS; } 5
  6. 6. BlackBerry 10 Integrated Social Beautiful 6
  7. 7. BlackBerry Platform Services low level integration with the BlackBerry platform 7
  8. 8. BlackBerry Platform Services overview the BlackBerry Platform Services (BPS) library provides an application with a single consistent interface to a number of different services during the execution of the application. - universal event management user interaction – working with the navigator input/output (sensors, audio, LED, screen, multimedia) device information, locale and payment services network status and geo-location 8
  9. 9. BPS: Event Loop Code Sample for (;;) { bps_event_t *event_bps = NULL; bps_get_event(&event_bps, timeout); // -1, forever if (event_bps != NULL) { event_domain = bps_event_get_domain(event_bps); if (event_domain == xxx) { // request event information within the domain } } } 9
  10. 10. BPS: Platform Services Template handling {service} events {service}_request_events({param}); // request events then capture the appropriate {service} events event_domain = bps_event_get_domain(event_bps); if (event_domain == {service}_get_domain()) { // handle the {service} event 10
  11. 11. BPS: Navigator handling navigator events navigator_request_events(0); // request events then capture the appropriate navigator events if (event_domain == navigator_get_domain()) { e_id = bps_event_get_code(event_bps); 11
  12. 12. BPS: Navigator Events navigator events of use for game developers NAVIGATOR_EXIT NAVIGATOR_SWIPE_DOWN NAVIGATOR_BACK NAVIGATOR_WINDOW_STATE NAVIGATOR_ORIENTATION_CHECK NAVIGATOR_ORIENTATION NAVIGATOR_LOW_MEMORY ... 12
  13. 13. BPS: Navigator invoking other navigator services navigator_invoke(“http://developer.blackberry.com”, NULL); navigator_invoke(“camera://photo”, NULL); navigator_invoke(“settings://about”, NULL); navigator_invoke(“videos://recorded”, NULL); ... 13
  14. 14. BPS: Screen and Window Handling composite window handling the BlackBerry 10 platform provides a composited windowing API (low level) – which allows the creation of a windows and defining the appropriate properties (colors, depth, dimensions). screen_create_context(&scr, SCREEN_APPLICATION_CONTEXT); screen_create_window(&win, scr); screen_set_window_property_iv(...); 14
  15. 15. BPS: Screen and Window Handling creating a 1280x768, 16bpp 565 (RGB) window intparam = SCREEN_FORMAT_RGB565; screen_set_window_property_iv (win, SCREEN_PROPERTY_FORMAT, &param); intrect[] = { 1280, 768 }; screen_set_window_property_iv (win, SCREEN_PROPERTY_BUFFER_SIZE, rect); 15
  16. 16. BPS: Screen and Window Handling FrameBuffer for “oldskool” computer graphics enthusiasts – a pixel FrameBuffer can be easily obtained from the window object allowing for the development of retro games and emulators. screen_create_window_buffers(win, 1); screen_get_window_property_pv(win, SCREEN_PROPERTY_RENDER_BUFFERS, (void **)&pFB); 16
  17. 17. BPS: Screen and Window Handling Open GL ES 1.1 or 2.0 to take advantage of the hardware accelerated 3D graphics (Open GL ES 1.1 or 2.0) – simply use the standard eglXXXAPI calls to initialize the environment. 17
  18. 18. BPS: Screen and Window Handling handling screen events screen_request_events(screen_ctx); then capture the appropriate screen related events if (event_domain == screen_get_domain()) { event_scr = screen_event_get_event(event_bps); screen_get_event_property_iv(event_scr, SCREEN_PROPERTY_TYPE, &e_id); 18
  19. 19. BPS: Screen and Window Events screen events of use for game developers SCREEN_EVENT_POINTER SCREEN_EVENT_MTOUCH_TOUCH SCREEN_EVENT_MTOUCH_MOVE SCREEN_EVENT_MTOUCH_RELEASE SCREEN_EVENT_KEYBOARD SCREEN_EVENT_DEVICE ... new in 10.1 SDK (gamepad) 19
  20. 20. BPS: Sensors handling sensor events if (sensor_is_supported(sensor_type)) sensor_request_events(sensor_type); then capture the appropriate sensor related events if (event_domain == sensor_get_domain()) { e_id = bps_event_get_code(event_bps); ... 20
  21. 21. BPS: Sensor Events sensors that may be available (check before use) SENSOR_TYPE_ACCELEROMETER SENSOR_TYPE_MAGNETOMETER SENSOR_TYPE_GYROSCOPE SENSOR_TYPE_AZIMUTH_PITCH_ROLL SENSOR_TYPE_ALTIMETER SENSOR_TYPE_TEMPERATURE SENSOR_TYPE_PROXIMITY SENSOR_TYPE_LIGHT ... 21
  22. 22. BPS: Network Status handling network status events netstatus_request_events(0); then capture the appropriate network status related events if (event_domain == netstatus_get_domain()) available = netstatus_event_get_availability(event_bps); to check the network status at any time: netstatus_get_availability(&available); 22
  23. 23. Scoreloop Integration social integration • user profiles • challenges • achievements • leader boards and high scores • virtual goods and currency Games 23
  24. 24. 3rd Party Game Engines 24
  25. 25. Simple Directmedia Layer GNU LGPL v2 License • FrameBuffer and hardware accelerated Open GL • audio and multimedia playback • threads, timers and endian independence http://www.libsdl.org 25
  26. 26. gameplay Apache 2.0 License • hardware accelerated Open GL scene graph • audio and multimedia playback • input, sensors, physics and particle engines http://www.gameplay3d.org 26
  27. 27. Cocos2D-X MIT License • hardware accelerated Open GL • scripting support (JavaScript, LUA) http://www.cocos2d-x.org 27
  28. 28. Marmalade Commercial License • hardware accelerated Open GL (3D) • audio and multimedia playback • numerous licensing models – cross platform http://www.madewithmarmalade.com 28
  29. 29. Game Developer Highlights let’s take a look at some regional indie developers making the most of the BlackBerry 10 platform. 29
  30. 30. Developer: Tactile Entertainment ChasingYellow • Cocos2D-X • Leader boards • Challenges • Achievements (entry point, add friend, rematch) 30
  31. 31. Developer: Tactile Entertainment Fruit Blitz • C++ with Open GL ES 2.0, Open AL • Leader boards • Challenges • Achievements (entry point, add friend, rematch) • Progress Sync 31
  32. 32. Developer: Tactile Entertainment DynaStunts • C with Open GL ES 2.1, Open AL • Leader boards • Challenges • Achievements (entry point, add friend, rematch) • Custom Profile Image 32
  33. 33. Distribution and Marketing how to sell and make your games a success 33
  34. 34. Application Publishing Publishing to BlackBerry World • BlackBerry World is the on-device distribution catalogue • a publishing account is required to use BlackBerry World • • free to sign up royalty share between RIM and developer (70% developer) • provide payment details (paypal, et al) • create product (metadata) and release BAR files • 480x480 icon, featured image, screenshots and description
  35. 35. Application Monetization Pre-mium, free-mium or combination? many methods to monetize; all options are available to you • paid applications • free applications with in-app purchases • free applications with advertising
  36. 36. Built for BlackBerry Application Certification • recognized high quality • the official “stamp” of approval • give customers peace of mind • improve visibility in BlackBerry World 36
  37. 37. For More Information… Native Development Resources http://developer.blackberry.com/native/ BlackBerry Developer Blog http://devblog.blackberry.com/ BlackBerry Developer YouTube Channel http://www.youtube.com/user/BlackBerryDev 37
  38. 38. Thank You! Aaron Ardiri Principal Developer Evangelist AARDIRI@blackberry.com twitter: @ARDIRI

×