SlideShare una empresa de Scribd logo
1 de 38
Introduction to BlackBerry NDK for
Game Developers
Aaron Ardiri
Principal Developer Evangelist
AARDIRI@blackberry.com
twitter: @ARDIRI
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, “Hello Worldn”);
return EXIT_SUCCESS;
}

5
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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Scoreloop Integration
social integration
•

user profiles

•

challenges

•

achievements

•

leader boards and high scores

•

virtual goods and currency

Games

23
3rd Party Game Engines

24
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
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
Cocos2D-X
MIT License

•

hardware accelerated Open GL

•

scripting support (JavaScript, LUA)

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

•

hardware accelerated Open GL (3D)

•

audio and multimedia playback

•

numerous licensing models – cross platform
http://www.madewithmarmalade.com
28
Game Developer Highlights
let’s take a look at some regional indie developers
making the most of the BlackBerry 10 platform.

29
Developer: Tactile Entertainment
ChasingYellow
•

Cocos2D-X

•

Leader boards

•

Challenges

•

Achievements (entry point, add friend, rematch)
30
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
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
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 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
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
Built for BlackBerry
Application Certification
•

recognized high quality

•

the official “stamp” of approval

•

give customers peace of mind

•

improve visibility in BlackBerry World
36
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
Thank You!
Aaron Ardiri
Principal Developer Evangelist
AARDIRI@blackberry.com
twitter: @ARDIRI

Más contenido relacionado

Similar a Introduction to BlackBerry 10 NDK for Game Developers.

UplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutions
UplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutionsUplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutions
UplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutionsSatya Harish
 
Qualcomm Hexagon SDK: Optimize Your Multimedia Solutions
Qualcomm Hexagon SDK: Optimize Your Multimedia SolutionsQualcomm Hexagon SDK: Optimize Your Multimedia Solutions
Qualcomm Hexagon SDK: Optimize Your Multimedia SolutionsQualcomm Developer Network
 
Develop For BlackBerry10
Develop For BlackBerry10 Develop For BlackBerry10
Develop For BlackBerry10 Kareem ElSayyed
 
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...OpenNebula Project
 
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...Dmytro Korzhevin
 
Android game development
Android game developmentAndroid game development
Android game developmentdmontagni
 
Cameron mc rae y1 gd_engineterminology no videos
Cameron mc rae y1 gd_engineterminology no videosCameron mc rae y1 gd_engineterminology no videos
Cameron mc rae y1 gd_engineterminology no videosCameronMcRae901
 
Christchurch Embedded .NET User Group - Introduction to Microsoft Embedded pl...
Christchurch Embedded .NET User Group - Introduction to Microsoft Embedded pl...Christchurch Embedded .NET User Group - Introduction to Microsoft Embedded pl...
Christchurch Embedded .NET User Group - Introduction to Microsoft Embedded pl...christopherfairbairn
 
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...Christopher Diamantopoulos
 
iMX53 Quick Start board fact sheet
iMX53 Quick Start board fact sheetiMX53 Quick Start board fact sheet
iMX53 Quick Start board fact sheetKarthik Ethirajan
 
Developing a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT EditionDeveloping a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT EditionIntel® Software
 
Build a Game in 60 minutes
Build a Game in 60 minutesBuild a Game in 60 minutes
Build a Game in 60 minutesTroy Miles
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentDavid Galeano
 
The Next Leap in JavaScript Performance
The Next Leap in JavaScript PerformanceThe Next Leap in JavaScript Performance
The Next Leap in JavaScript PerformanceIntel® Software
 
Mobile game architecture on GCP
Mobile game architecture on GCPMobile game architecture on GCP
Mobile game architecture on GCP명근 최
 
FGS 2011: Flash+ A Whole New Dimension for Games
FGS 2011: Flash+ A Whole New Dimension for GamesFGS 2011: Flash+ A Whole New Dimension for Games
FGS 2011: Flash+ A Whole New Dimension for Gamesmochimedia
 
Game engine terminology worksheet
Game engine terminology worksheetGame engine terminology worksheet
Game engine terminology worksheetrwbybomb21
 
Adobe gaming today tomorrow Trento
Adobe gaming today tomorrow TrentoAdobe gaming today tomorrow Trento
Adobe gaming today tomorrow TrentoInSide Training
 

Similar a Introduction to BlackBerry 10 NDK for Game Developers. (20)

UplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutions
UplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutionsUplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutions
UplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutions
 
Qualcomm Hexagon SDK: Optimize Your Multimedia Solutions
Qualcomm Hexagon SDK: Optimize Your Multimedia SolutionsQualcomm Hexagon SDK: Optimize Your Multimedia Solutions
Qualcomm Hexagon SDK: Optimize Your Multimedia Solutions
 
Develop For BlackBerry10
Develop For BlackBerry10 Develop For BlackBerry10
Develop For BlackBerry10
 
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...
OpenNebulaConf2019 - Crytek: A Video gaming Edge Implementation "on the shoul...
 
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...
OpenNebulaConf 2019 - Crytek: A Video gaming Edge Implementation "on the shou...
 
Rashmi_Resume
Rashmi_ResumeRashmi_Resume
Rashmi_Resume
 
Android game development
Android game developmentAndroid game development
Android game development
 
Cameron mc rae y1 gd_engineterminology no videos
Cameron mc rae y1 gd_engineterminology no videosCameron mc rae y1 gd_engineterminology no videos
Cameron mc rae y1 gd_engineterminology no videos
 
Christchurch Embedded .NET User Group - Introduction to Microsoft Embedded pl...
Christchurch Embedded .NET User Group - Introduction to Microsoft Embedded pl...Christchurch Embedded .NET User Group - Introduction to Microsoft Embedded pl...
Christchurch Embedded .NET User Group - Introduction to Microsoft Embedded pl...
 
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
 
iMX53 Quick Start board fact sheet
iMX53 Quick Start board fact sheetiMX53 Quick Start board fact sheet
iMX53 Quick Start board fact sheet
 
Developing a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT EditionDeveloping a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT Edition
 
Build a Game in 60 minutes
Build a Game in 60 minutesBuild a Game in 60 minutes
Build a Game in 60 minutes
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
 
The Next Leap in JavaScript Performance
The Next Leap in JavaScript PerformanceThe Next Leap in JavaScript Performance
The Next Leap in JavaScript Performance
 
Mobile game architecture on GCP
Mobile game architecture on GCPMobile game architecture on GCP
Mobile game architecture on GCP
 
FGS 2011: Flash+ A Whole New Dimension for Games
FGS 2011: Flash+ A Whole New Dimension for GamesFGS 2011: Flash+ A Whole New Dimension for Games
FGS 2011: Flash+ A Whole New Dimension for Games
 
Game engine terminology worksheet
Game engine terminology worksheetGame engine terminology worksheet
Game engine terminology worksheet
 
Adobe gaming today tomorrow Trento
Adobe gaming today tomorrow TrentoAdobe gaming today tomorrow Trento
Adobe gaming today tomorrow Trento
 
Adobe max 2010
Adobe max 2010Adobe max 2010
Adobe max 2010
 

Más de ardiri

20180517 Oraclecode Shenzhen Keynote
20180517 Oraclecode Shenzhen Keynote20180517 Oraclecode Shenzhen Keynote
20180517 Oraclecode Shenzhen Keynoteardiri
 
20180517 OracleCode Singapore Keynote
20180517 OracleCode Singapore Keynote20180517 OracleCode Singapore Keynote
20180517 OracleCode Singapore Keynoteardiri
 
Feasibility of Security in Micro-Controllers
Feasibility of Security in Micro-ControllersFeasibility of Security in Micro-Controllers
Feasibility of Security in Micro-Controllersardiri
 
Introduction to the Internet of Things
Introduction to the Internet of ThingsIntroduction to the Internet of Things
Introduction to the Internet of Thingsardiri
 
Native Application (C/C++) on BlackBerry 10
Native Application (C/C++) on BlackBerry 10Native Application (C/C++) on BlackBerry 10
Native Application (C/C++) on BlackBerry 10ardiri
 
Start to Finish: Porting to BlackBerry 10
Start to Finish: Porting to BlackBerry 10Start to Finish: Porting to BlackBerry 10
Start to Finish: Porting to BlackBerry 10ardiri
 
iPhone Introduction
iPhone IntroductioniPhone Introduction
iPhone Introductionardiri
 
Game Development using SDL and the PDK
Game Development using SDL and the PDK Game Development using SDL and the PDK
Game Development using SDL and the PDK ardiri
 

Más de ardiri (8)

20180517 Oraclecode Shenzhen Keynote
20180517 Oraclecode Shenzhen Keynote20180517 Oraclecode Shenzhen Keynote
20180517 Oraclecode Shenzhen Keynote
 
20180517 OracleCode Singapore Keynote
20180517 OracleCode Singapore Keynote20180517 OracleCode Singapore Keynote
20180517 OracleCode Singapore Keynote
 
Feasibility of Security in Micro-Controllers
Feasibility of Security in Micro-ControllersFeasibility of Security in Micro-Controllers
Feasibility of Security in Micro-Controllers
 
Introduction to the Internet of Things
Introduction to the Internet of ThingsIntroduction to the Internet of Things
Introduction to the Internet of Things
 
Native Application (C/C++) on BlackBerry 10
Native Application (C/C++) on BlackBerry 10Native Application (C/C++) on BlackBerry 10
Native Application (C/C++) on BlackBerry 10
 
Start to Finish: Porting to BlackBerry 10
Start to Finish: Porting to BlackBerry 10Start to Finish: Porting to BlackBerry 10
Start to Finish: Porting to BlackBerry 10
 
iPhone Introduction
iPhone IntroductioniPhone Introduction
iPhone Introduction
 
Game Development using SDL and the PDK
Game Development using SDL and the PDK Game Development using SDL and the PDK
Game Development using SDL and the PDK
 

Último

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Último (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Introduction to BlackBerry 10 NDK for Game Developers.

  • 1. Introduction to BlackBerry NDK for Game Developers Aaron Ardiri Principal Developer Evangelist AARDIRI@blackberry.com twitter: @ARDIRI
  • 4. Commitment to Open Source http://blackberry.github.org 4
  • 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
  • 7. BlackBerry Platform Services low level integration with the BlackBerry platform 7
  • 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. Scoreloop Integration social integration • user profiles • challenges • achievements • leader boards and high scores • virtual goods and currency Games 23
  • 24. 3rd Party Game Engines 24
  • 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. 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. Cocos2D-X MIT License • hardware accelerated Open GL • scripting support (JavaScript, LUA) http://www.cocos2d-x.org 27
  • 28. Marmalade Commercial License • hardware accelerated Open GL (3D) • audio and multimedia playback • numerous licensing models – cross platform http://www.madewithmarmalade.com 28
  • 29. Game Developer Highlights let’s take a look at some regional indie developers making the most of the BlackBerry 10 platform. 29
  • 30. Developer: Tactile Entertainment ChasingYellow • Cocos2D-X • Leader boards • Challenges • Achievements (entry point, add friend, rematch) 30
  • 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. 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. Distribution and Marketing how to sell and make your games a success 33
  • 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. 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. 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. 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. Thank You! Aaron Ardiri Principal Developer Evangelist AARDIRI@blackberry.com twitter: @ARDIRI