Are you prepared? Grab your VR controllers and jump into A-Blast!
Make sure you have a WebVR-enabled browser. Firefox is ready in Nightly branch. In Chromium, enable the flags for chrome://flags/#enable-webvr
and chrome://flags/#enable-gamepad-extensions
.
Wave shooters are probably the most popular genre in the first crop of VR games. From an implementation standpoint, they are also the easiest to create. You don’t have to move the player, so there’s no need to implement a locomotion feature, which simplifies the stage to a single, fixed point of view. The interaction with enemies is also simple: just shoot and detect bullet collisions. As simple as wave shooters are, they are quite fun to play, and some of them really make you feel the anxiety of the player character (e.g., Raw Data).
With A-Blast, we wanted to create a game that focused on smooth playability, quality assets, and demonstrating the capabilities of A-Frame and browser performance. We also wanted to test our own tools (A-Frame and Firefox with WebVR).
During testing, we found many performance problems, so we needed to optimize several parts of the initial implementation. Some features were added to A-Frame to help with this task (like the pool component). We’ll share these details in a future post.
The gameplay is straightforward: grab your weapons, aim at the characters floating around, and pull the trigger. You can also dodge and shoot enemy bullets to keep your five lives intact. The more characters you blast, the more points you get, and then enter the (local) Hall of Fame.
We wanted to keep the gameplay time under five minutes to have a good turnover at demo stations at fairs and conventions. For a full game, we would have designed more elaborate levels. (Yep, we know it's short, but please keep in mind that this is a technical demo, not a full game with hours of content).
The game is designed for the HTC Vive but it can also be played with mouse and keyboard or in your smartphone by tapping the screen to shoot.
Using our A-Frame JavaScript VR framework, A-Blast was created by two programmers and one artist in just two months. A-Blast debuted to dozens of Mozillians in December 2016 at the Mozilla All-Hands event in Hawaii.
A-Blast also served as a tour de force for A-Frame, testing it with a relatively complex application (the source code is slightly larger than A-Painter's), which helped stress-test and improve the framework.
If you have ideas for improvements, like adding a global leaderboard or support for other controllers and devices, head to the A-Blast GitHub repository and send a pull request.
Many thanks to José Manuel Pérez Paredes (JosSs) for providing the soundtrack, which greatly improves the experience!