Controller
Developers have a few options for input controls, when making a BD application (especially a video game).
- Remote control
- Gamepad
- Keyboard / Mouse
- Second-screen app via WiFi
Remote Control
The standard remote control is the default controller for all BD players. It uses IR to connect input signals to the player. A remote is suitable for simple navigation and playback controls.
When it comes to BD-J video games, it's suitable game types are simple arcade games like Arkanoid, Tetris, Bejeweled, or space shooters with auto-fire. It only lets you press and hold a single button at a time.
Inputs
- 5 × input buttons: 🔴,🟢,🔵,🟡, ENTER
- 4 × digital directional buttons (d-pad): ⬆️, ⬇️, ⬅️, ➡️
- 4× digital buttons*: Top Menu, Pop Menu,Subtitle, Audio
- 7 × playback buttons: ▶️ Play, ⏸️ Pause, ⏹️ Stop,⏭️ Next,⏮️ Previous,⏩ Fast Forward,⏪ Fast Forward
- 9 × number keys**: 0️⃣, 1️⃣, 3️⃣, 4️⃣, 5️⃣, 6️⃣, 7️⃣, 8️⃣, 9️⃣
* The Multi-angle feature is part of the BD standard, however, unlike DVD, most BD remotes do not include an angle button. So, it's best to use the colored buttons as an alternative.
** Numbered keys are usually for chapter search or interactive apps. Some BD remotes do not have numbered keys, so, it's best to provide a "virtual keyboard" in your BD-J application.
All BD remote controls use Virtual Keys and Keycodes, an international standard to assign button keys to remote controls and keyboards. The Virtual Keys and Keycodes are defined and recognized by Java (via GEM).
Here's the list of keycodes and virtual keys for a standard remote control (and compliant gamepads) for developers:
Keycode | Virtual Key |
Name | Symbol | Description |
---|---|---|---|---|
10 ? |
VK_ENTER |
Enter |
ENTER |
Activate current selection or accept current input. Also called "OK" or "Select." |
37 ? |
VK_LEFT |
Left |
⬅️ |
Navigate or traverse leftward. |
38 ? |
VK_RIGHT |
Right |
➡️ |
Navigate or traverse rightward. |
39 ? |
VK_UP |
Up |
⬆️ | Navigate or traverse upward. |
40 ? |
VK_DOWN |
Down |
⬇️ |
Navigate or traverse downward. |
403 |
VK_BLUE |
Blue |
🔵 |
General purpose function key for interactivity. Equivalent to VK_COLORED_KEY_0 |
404 |
VK_GREEN |
Green | 🟢 |
General purpose function key for interactivity. Equivalent to VK_COLORED_KEY_1 |
405 |
VK_RED |
Red |
🔴 |
General purpose function key for interactivity. Equivalent to VK_COLORED_KEY_2 |
406 |
VK_YELLOW |
Yellow |
🟡 |
General purpose function key for interactivity. Equivalent to VK_COLORED_KEY_3 |
19 |
VK_PLAY |
Play |
▶️ |
Initiate or continue playback. |
415 |
VK_PAUSE |
Pause | ⏸️ |
Pause playback. |
503 |
VK_PLAY_PAUSE |
Play/Puase |
▶️⏸️ |
Toggle media play/pause state. |
417 |
VK_FAST_FWD |
Fast Forward |
⏩ |
Initiate or continue forward playback at faster than normal speed, or increase speed if already fast forwarding. |
412 |
VK_REWIND |
Rewind | ⏪ |
Initiate or continue reverse playback at faster than normal speed, or increase speed if already rewinding. |
424 |
VK_TRACK_PREV |
Track Previous |
⏮️ |
Seek to next media or program track. |
425 |
VK_TRACK_NEXT |
Track Next |
⏭️ |
Seek to previous media or program track. |
413 |
VK_STOP |
Stop |
⏹️ |
Stop media playing, pausing, forwarding, or rewinding (if not already stopped). |
461 |
VK_POPUP_MENU |
Popup Menu |
POPUP MENU |
Toggle display of content or popup menu (if available). |
48-57 |
VK_0 to VK_9 |
Number Key 0-9 |
0️⃣-9️⃣ | Number entry. |
Keyboard & Mouse
Some BD players are natively compatible with a keyboard, however, they have worse input controls than a remote as only a single button can be pressed and not held down.
When you play a BD into your computer using a BD player software (VLC, Kodi, Cyberlink), all HDMV titles are compatible with the mouse by default, however, not BD-J. It is up to the developer if they wish to add mouse support for BD-J and it's recommended if you want to appeal to PC gamers.
If you're making a BD-J application and want both keyboard & mouse support on a BD player. It is possible to use an Ethernet-to-USB cable or local WI-FI to connect to a keyboard or mouse, but you (the developer) must implement this feature.
Just like the remote control, a Keyboard and Mouse uses Virtual Keyboards and Keycodes
See: Virtual Keycodes for Keyboard and mouse (external link)
Gamepad
Most modern TVs and Blu-ray players with the CEC feature, lets you control the BD player through HDMI with a gamepad. Unlike a remote and keyboard, gamepads, like the PS3 and PS4 controllers, lets you press and hold multiple button at a time.
Besides game consoles, there are some BD players that natively support Sony DualShock 4 controllers.
See: Gamepad support
Though uncommon, there are some gamepads with IR support (Sky Gamepad, Sega Saturn) that can connect to any BD player, but it's not recommended for fast paced games due to the IR being slower than a USB or WI-FI.
See: Generic BD Gamepad
Second-screen app
Second-screen is an type software app that lets you use your smartphone or tablet as a virtual remote or gamepad. The term commonly refers to the use of such devices to provide interactive features along with a Blu-ray movie.
A second-screen app is a great alternative if a player has mediocre controls. It runs on most all BD players, as long as the player/console and the phone/tablet is connected to the same LAN.
Controller Categories
According to Blu-Play.com user-input controls are divided into 3 groups:
Class 1: Holdable multiple buttonsClass 1 is the superb user-input, and you can register multiple buttons. KEY_PRESSED
will be fired for each button as the user presses and holds them - one by one. When you release them one by one, KEY_RELEASED
will be fired for each of them as well. Meaning, this class of input controls has no limits. Controllers in this category include the Sony DualShock 5, DualShock 4, DualShock 3 and second-screen controllers.
Suitable game types: All types.
Class 2: Holdable multiple buttons
Class 2 is a big step down from a Class 1 input-control device. Devices in this category only let 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.
Suitable game types: Simple arcade games (Arkanoid), Turn-based games (Fallout, Monopoly, X-Com, Final fantasy Tactics, Chess, Pokemon), adventure games (LucasArts, Telltale) and space shooters with auto-fire.
Class 3: Clickable single button
Class 3 is fine for movies, but it's the absolute worst class of input-control for video games. Only a single button can be pressed and not held down. KEY_PRESSED
and KEY_RELEASED
are both fired the instant you press the button. So, there's no way of knowing when the user releases the button.
Suitable game types: Most puzzle games (Tetris, Bejeweled, Solitaire), Visual Novels, Interactive movies, and auto-moving arcade games (Snake and Pacman).
Class 1: Holdable multiple buttons |
Class 2: Holdable single button |
Class 3: Clickable single button |
|
---|---|---|---|
Blu-ray player | Second-screen |
Remote control DualShock 4 v1 *2 |
USB keyboard |
PlayStation 3 |
DualShock 3 *1 DualShock 4 *1 Second-screen |
USB keyboard |
|
PlayStation 4 |
DualShock 4 *1 Second-screen |
USB keyboard |
|
PlayStation 5 |
DualShock 5 *1 Second-screen |
USB keyboard |
|
Xbox One | Second-screen |
Xbox Controller |
|
Xbox Series X |
Second-screen |
Xbox Controller | |
Dune HD Smart D1 |
Second-screen |
Remote control |
|
PowerDVD |
Second-screen |
||
VLC | Keyboard |
Compatible game types
For your BD-J game to be playable on standard Blu-ray players (without using Second-screen or Ethernet-to-USB cables), it must require only one button click at a time.
Thankfully, many game genres are compatible with those requirements, like Pac-man, Tetris, Snake, Chess, Bejeweled, Turn-based games, and Visual Novels. You could make your Class 2 game compatible with Class 3 devices with optimizations.
But, if you're going to make or port a game to BD that requires multiple buttons (Class 1 devices), it's highly recommended to display a visual indicator or warning to inform users. This will ensure that users are aware of the need for Class 1 devices and can properly prepare to play the game.
Keycodes
Here you can see an overview of the buttons on a remote and gamepads and their keycodes.
Keycode | BD remote |
PlayStation 3 | PlayStation 4 | Xbox One |
---|---|---|---|---|
37 |
Left |
|
|
|
38 |
Up | |
|
|
39 |
Right | |
|
|
40 |
Down |
|
|
|
10 |
Enter / Select |
|
|
|
461 | Popup Menu | |||
19 | Pause | Not Supported | ||
415 |
Play |
Not Supported |
Not Supported |
|
424 |
Previous track |
|
|
|
425 |
Next track |
|
|
|
412 |
Rewind |
|
|
|
417 |
Fast forward |
|
|
|
As you can see above, most buttons on the gamepads share identical locations and keycodes. However, there are a few exceptions:
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 button (), which is positioned far away to be useful in a game.
On PlayStation 4, keycode 19 is assigned to the button, which is placed to the upper right about the button - i.e. the opposite side as the button relative to the button on the Xbox One. Meanwhile, the PlayStation 3 doesn't have a button mapped to keycode 19.
As a solution, if you wish to give the same controls on both platforms, assign both keycodes 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 also means that both the Square button and the Circle button do the same thing on the PlayStation 4.
A recommended solution is to offer a "custom control buttons" option in your BD-J game. That way users can decide for themselves what buttons to use.
Sources
- Blu-Play Input Controls - by Mistalu
- Blu-Play Platforms - by Mistalu
Author(s) : Æ Firestone
Popular Pages
-
Type Programming /scripting language Paradigm Multi-paradigm: event-driven, functional, imperative, procedural, object-orie...
-
HDMV (High Definition Movie) mode is an interactive framework with the well-known features of DVD, but it's more advanced than DVD m...
-
MPEG-2 Transport Stream Type of format Container format for video, audio, data First released August 2004 Latest relea...