↑ ↑ ↓ ↓ ← → ← → B A: Gamepad Offer Update



We have two important updates for BlackBerry 10 developers who are integrating gamepad support into their BlackBerry 10 applications.

Gamepad Offer Update

Back in September, we announced an offer for BlackBerry 10 game developers: Enable Gamepads For Your BlackBerry 10 Game, Get Rewards!

The criteria are pretty simple. Upload your game to BlackBerry World in draft mode and ensure it is identified as a gamepad-enabled by adding the <permission>use_gamepad</permission> element to your bar-descriptor. Unity developers would also need to ensure to add the Gamepad keyword to their BlackBerry World submissions.

Completing the above will flag your game as gamepad-enabled in our system. After doing so, you should receive an email to receive free MOGA Pro and SteelSeries Free controller to aid you in implementing full gamepad support for your game before submitting to post your game for sale. Specifics on the gamepad criteria can be found here.

Once your application has fully integrated gamepad support, submit your application for review. After it is approved for sale, our testing teams will evaluate it against the gamepad criteria to see if you qualify for the special gamepad-enabled category in BlackBerry World.

Since the start of the offer, we’ve received a number of terrific submissions. We completed the first round of reviews and sent emails to those developers whose applications were approved to be up for sale! If your application was approved, but you have not yet received any email follow-up, please reach out to eoros@blackberry.com.

If your game already successfully meets all of the gamepad criteria, you’ve automatically earned your coveted spot among other gamepad-enabled games. You’ll also be able to post your application up for sale and, once the gamepad-enabled category goes live in BlackBerry World, users will be able to easily discover your games!

If there are some criteria you haven’t met, we’ll let you know what still needs to be done in your application. You can still post your application up for sale, but it won’t appear with other gamepad-enabled games until you meet all of the criteria.

Also, don’t forget that gamepad integration counts as a Platform Service for the Built For BlackBerry program, which is one of the more complex requirements. If you’re already integrating gamepad support, check out the Built For BlackBerry criteria, fine-tune your game, and shine even more light on your game within BlackBerry World!

The gamepad offer is still open, so if you haven’t submitted your games yet, get coding and join your fellow gamepad trailblazers in BlackBerry World!

If you have any questions about the gamepad offer, don’t hesitate to reach out to BlackBerryDeveloperProgram@blackberry.com

Gamepad Integration Update for Unity Developers

Back in June, we posted an article about adding gamepad support to Unity games on BlackBerry 10.

Since then, there have been a few key changes that Unity developers should be aware of when integrating gamepad support for their games.

First, certain axes and buttons are mapped to Unity differently. Let’s take a look at the input configuration that can be reached via Edit > Project Settings > Input.

BlackBerry Gamepad Edit Project Settings Input

On BlackBerry 10, we now need to configure six axes if we want to support both joystick and directional-pad inputs. More importantly, the mappings for existing axes have changed slightly since March.

  • X axis corresponds to the Horizontal Axis on the Left Joystick.
  • Y axis corresponds to the Vertical Axis on the Left Joystick.
  • 4th axis corresponds to the Horizontal Axis on the Right Joystick.
  • 5th axis corresponds to the Vertical Axis on the Right Joystick.
  • 6th axis corresponds to the Left and Right directions on the Directional-Pad.
  • 7th axis corresponds to the Up and Down directions on the Directional-Pad.

X axis and Y axis integration_gamepad Examples of X axis and Y axis integration. You can Name the axis something more descriptive in order to identify it more easily within your code.

You can also leverage the Joy Num field to narrow down which gamepads are inputting data to each axis. This will be required for most multiplayer games.

Once your axes are configured within the Input panel, you can access the input data within your scripts by leveraging the Input.GetAxisRaw API where the axisName refers to the Name you gave the axis in the Input panel.

  using UnityEngine;
  using System.Collections;

  public class Example : MonoBehaviour {
    void Update() {
      float speed = Input.GetAxisRaw("X axis") * Time.deltaTime;
      transform.Rotate(0, speed, 0);

The button mappings have not changed, however it is important to note that L2 and R2 do not currently map to any buttons. To access button data within your scripts, you can leverage the Input.GetKey and Input.GetKeyDown APIs where the name will refer to one of the KeyCode constants.

  using UnityEngine;
  using System.Collections;

  public class Example : MonoBehaviour {
    void Update() {
      /* The following will be triggered every frame. */

      /* SteelSeries Free (Button 4), MOGA Pro (Button A) */
      if (Input.GetKey(KeyCode.Joystick1Button0)) {}

      /* SteelSeries Free (Button 3), MOGA Pro (Button B) */
      if (Input.GetKey(KeyCode.Joystick1Button1)) {}

      /* SteelSeries Free (Button 1), MOGA Pro (Button X) */
      if (Input.GetKey(KeyCode.Joystick1Button2)) {}

      /* SteelSeries Free (Button 2), MOGA Pro (Button Y) */
      if (Input.GetKey(KeyCode.Joystick1Button3)) {}

      /* The following will only be triggered once until released. */

      /* SteelSeries Free (Button L), MOGA Pro (Button L1) */
      if (Input.GetKeyDown(KeyCode.Joystick1Button4)) {}

      /* SteelSeries Free (Button R), MOGA Pro (Button R1) */
      if (Input.GetKeyDown (KeyCode.Joystick1Button5)) {}

      /* SteelSeries Free (Button A), MOGA Pro (Button Select) */
      if (Input.GetKeyDown (KeyCode.Joystick1Button6)) {}

      /* SteelSeries Free (Button B), MOGA Pro (Button Start) */
      if (Input.GetKeyDown (KeyCode.Joystick1Button7)) {}

For a quick reference of all axis and button mappings, please refer to the following diagrams.

gamepad diagram

It is also important to note that that your gamepad must be in HID mode; for the MOGA Pro this is Mode B and on the SteelSeries Free this is the single-blink mode.

Once connected, you can poll for supported, connected gamepads with the Input.GetJoystickNames API. This will return a String[] you can cycle through, leveraging the String.Contains API to compare against “BlackBerry Gamepad” to detect BlackBerry supported gamepads. Currently all supported gamepads will return a string containing this. Do not use the String.Equals API, as the full joystick name may have additional content identifying the gamepad.

While all supported gamepads will have the same mappings on BlackBerry 10 devices, the mappings between BlackBerry 10, PC and other devices may vary. A very crude but handy script to display all KeyCode states, joystick names, and axis inputs can be found here. You can leverage the script on any platform as a method of evaluating what a particular gamepad’s mappings are, though you may need to adjust the script for available screen dimensions.

Finally, as of Unity 4.3, you can now set the gamepad permission within the Editor! Don’t forget to check this box when you are submitting your gamepad enabled applications. It can be found under the Other Settings panel of the Player Settings configuration pane.

gamepad permission

If you have any questions at all about Unity gamepad integration, please do not hesitate to reach out to me directly at eoros@blackberry.com.

About Erik O.

HTML5 Application Development Consultant at BlackBerry.

Join the conversation

Show comments Hide comments
+ -
  • http://asdfg سوسو


  • http://www.sdknews.com/blackberry/%e2%86%91-%e2%86%91-%e2%86%93-%e2%86%93-%e2%86%90-%e2%86%92-%e2%86%90-%e2%86%92-b-a-gamepad-offer-update ↑ ↑ ↓ ↓ ← → ← → B A: Gamepad Offer Update | SDK News

    […] ↑ ↑ ↓ ↓ ← → ← → B A: Gamepad Offer Update […]

  • http://devblog.blackberry.com/2014/01/now-featuring-gamepad-compatible-games/ Now Featuring: Gamepad Compatible Games | BlackBerry Developer Blog

    […] not, you still have time! Get your two free gamepads (by February 24th), and once your app meets the requirements we’ll add you to the category as […]

  • http://blackberryempire.com/blackberry-world-listing-gamepad-compatible-games/ BlackBerry World now listing gamepad compatible games - BlackBerry Empire

    […] kick things off, BlackBerry is rewarding developers with two free gamepads if their app/games meet the requirements, deadline to submit is February […]

  • http://www.sdknews.com/blackberry/now-featuring-gamepad-compatible-games Now Featuring: Gamepad Compatible Games | SDK News

    […] not, you still have time! Get your two free gamepads (by February 24th), and once your app meets the requirements we’ll add you to the category as […]

  • http://devblog.blackberry.com/2014/01/unity-tales-qr-invaders-scan-a-qr-codedestroy-the-qr-code/ Unity Tales: QR Invaders – Scan a QR Code…Destroy the QR Code | BlackBerry Developer Blog

    […] our on-going Gamepad Ready contest, I was fortunate enough to meet Jon Cebula of Bubble Byte, who has developed a truly […]

  • http://www.cnbbdevgroup.com/cn/?p=16709 [游戏开发] Unity故事: 二维码侵略者-通过扫描二维码…来摧毁二维码?! | 中国黑莓开发网

    […] 通过我们正在进行的Gamepad Ready竞赛,我是有幸遇见 Jon Cebula 的Bubble Byte,一个开发了真正有吸引力的经典街机游戏的团队。作为引以为荣的gamepad集成和Built for 黑莓的状态,QR 侵略者为寻找一个休闲游戏体验,以及那些寻找拇指弯曲、 惊慌失措好时光的游戏玩家带来一个身临其境的体验。我问乔恩写关于他的经验与统一性和黑莓。在真正的Bubble Byte、 Jon超出所求,我欣喜若狂,以便能够分享他从概念推出的故事。 […]

  • http://www.sdknews.com/blackberry/unity-tales-qr-invaders-scan-a-qr-codedestroy-the-qr-code Unity Tales: QR Invaders – Scan a QR Code…Destroy the QR Code | SDK News

    […] our on-going Gamepad Ready contest, I was fortunate enough to meet Jon Cebula of Bubble Byte, who has developed a truly […]

  • http://rapidmobile.biz/blackberry/gamepad-supported-games-now-highlighted-in-blackberry-world/ Gamepad supported games now highlighted in BlackBerry World | Rapid Mobile

    […] forget that game developers can still get your two free gamepads (by February 24th),  once your app meets […]

  • http://www.buywowgold.nl/guildwars2-gold-eu.html guild wars2 gold kopen

    guild wars2 gold kopen

    ↑ ↑ ↓ ↓ ← → ← → B A: Gamepad Offer Update | BlackBerry Developer Blog

blog comments powered by Disqus