You have a few options for input controls, when making a Blu-Play game.
What you should know about these different options, is that they behave differently on different platforms. Some with poor performance, others with great performance.
A keyboard connected to a Blu-ray player (if the device even supports a keyboard) generally fires KEY_PRESSED and KEY_RELEASED the instant you press a key, regardless of whether you actually released the key again or not.
The remote control does it better: It waits firing KEY_RELEASED till you actually release the key - as it should.
A keyboard connected to a PlayStation 3 or 4 will give the same behavior as a remote control connected to a Blu-ray player though.
But both the keyboard and the remote control only lets you press a single button at a time.
This means you can't press UP + LEFT for example. If you hold UP and you press LEFT, you will just continue going UP.
In the group of poor performers we sadly also find the Xbox One gamepad, which also only lets you press a single button at a time. So again this means you can't go UP + LEFT. If you hold UP and you press LEFT, it will go LEFT and cancel UP.
The PlayStation 3 gamepad is a lot better: It lets you hold down several buttons at the same time, and only calls KEY_RELEASED when you actually release them - as it should. Unfortunately this doesn't apply to the directional buttons for some reason. Here again you can only press one directional button at a time. This means you can't press UP + LEFT - but you can press UP + any other non-directional (supported) button ().
The PlayStation 4 gamepad is the clear winner on the list: It lets you hold all (supported) buttons and only fires KEY_RELEASED when you actually release them. You can go UP + LEFT while pressing any other (supported) button ().
In the group of great performers we also have the Blu-Pads, which comes in 2 versions:
Both of these are great performers, equal to the PlayStation 4 gamepad. But the Adapter version isn't supported on all devices. It only works on devices that also supports a USB keyboard.
The WiFi version runs on all platforms you can think of, as long as the device and the phone is connected to the same LAN.
But before your players can play your game using any of the Blu-Pad options, you have to add support for them in your game. Some source files will be downloadable from this site in the near future.
Based on these facts we can divide user-input into 3 groups:
The is the most optimal user-input we can get. You can register multiple buttons. KEY_PRESSED will be fired for each button as the player press and hold them one by one. When you release them one by one, KEY_RELEASED will be fired for each of them too. So this class of input-controls really has no limits. Devices in this category includes the PS4 gamepad, and the PS3 gamepad - although the PS3 gamepad only lets you press one directional button at a time.
There's a big step down from a Class 1 to a Class 2 input-control device. Devices in this category only lets you press a single button at a time. It fires KEY_PRESSED when you press the button, and KEY_RELEASED when you lift your finger again.
The absolute worst class of input-control you can find is the class 3: Only a single button can be pressed - and not held down. KEY_PRESSED and KEY_RELEASED is both fired the instant you press the button. So there's no way of knowing when the user actually releases the button.
|PlayStation 3||DualShock III *1|
|PlayStation 4||DualShock 4|
|Xbox One||Blu-Pad Adapter|
|Blu-ray player||Blu-Pad Adapter|
DualShock 4 v1 *2
|Dune HD Smart D1||Blu-Pad Adapter|
1 The DualShock III only lets you press one directional button at a time. But you can press all other buttons at the same time too.
2 The DualShock 4 v1 can be connected to certain Blu-ray players. See platforms.
The limited user-input options for Xbox One and standard Blu-ray players means there are certain game-types you can only create for the PlayStation 3 and 4 - if you want to stick with standard controllers.
In order for your game to be playable on Xbox One and standard Blu-ray players (without using the Blu-Pads), it needs to require only one button press at a time.
Luckily there are many game-genres that can be done under those requirements. Tetris and Snake comes to mind. But you're free to choose to only target the PlayStation consoles.
If you add Blu-Pad support for your game though, you're pretty much limitless. You can even develop your own input controls using the same technique as the Blu-Pads. For example, turn the phone into a touchpad, and/or make the game react to the phone accelerometer.
Here you can see an overview of the buttons on the gamepads and their corresponding keycodes.
|PlayStation 3||PlayStation 4||Xbox One||Keycode||Remote control|
|10||Enter / Select|
As you can see, most buttons on the gamepads share the same locations and keycodes. There are a few exceptions though:
On PlayStation 3 and 4, the button is mapped to keycode 461. If the buttons should match on the Xbox One gamepad, then the button should have had the same keycode, but it doesn't. Instead, the button on the Xbox One gamepad is mapped to keycode 19. The button assigned to keycode 461 is the menu () menu button, which is placed too far away to be useful in a game.
On PS4 keycode 19 is assigned to the button, which is placed to the upper right in relation to the button - i.e. the opposite side as the button relative to the button on the Xbox One. Meanwhile, the PS3 doesn't even have a button mapped to keycode 19.
One solution, if you wish to give the same controls on both platforms, is to assign both keycode 461 and 19 to the same action in your game. That way, the button on the PlayStations and the button on the Xbox One does the same thing. This of course also means that both the button and the button does the same thing on the PlayStation 4.
Another solution is to offer a "Redefine control buttons" option in your game. That way your players can decide for themselves what buttons to use.