Gaming/GameCenter
Communications
irc.mozilla.org backchannels
- #galaxy
Roadmap
Projects
Below are the following GitHub repositories that comprise the Galaxy services.
Catalogue
Summary
Contains the catalogue, a static web page, that showcases the games, leaderboards, and friends' activity.
During the build step, via Gulp and Metalsmith, the HTML is generated from static JSON files, Markdown files, and HTML templates. The compiled HTML talks to the backend API (`galaxy-api`) via WebSockets to render any user-specific information (i.e., leaderboards and friends' activity).
Technologies used
HTML, CSS, JavaScript, WebSockets, Gulp, Metalsmith.
Repository
REST/WebSocket API
Summary
Contains the REST API server and the WebSocket server that the catalogue (`galaxy`) talks to and the in-game services (`galaxy.js`) talk to.
Technologies used
Node.js, Koa, Chai, Mocha, Redis, PostgreSQL, WebSockets, Gulp.
Repository
galaxy.js
Summary
Contains the JavaScript file that developers can include in their games to get access to the Galaxy in-game services.
Technologies used
JavaScript, WebSockets, Gulp.
Repository
Technical Architecture
Screencasts & Demos
USB/Bluetooth Gamepads
A demo of cvan using two USB-based controllers (N64 and NES) to play a version of HexGL, a WebGL-based racing game, which has been modified to work with galaxy.js. Included in galaxy.js is galaxy.getGamepads, a simple, cross-browser wrapper around navigator.getGamepads, also providing mappings for various controllers on the market. Instead of writing lots of boilerplate code, game developers can simply listen to events (when buttons get pressed or axes change) or inspect a state object in their game loop.
Mobile Gamepads
A demo of cvan using a Firefox OS phone to play HexGL with galaxy.js. Also included in galaxy.js is galaxy.getMobileGamepads, an interface for pairing a mobile device with the Galaxy in-game services to provide accelerometer gameplay controls. Using the browser's deviceorientation events, we identify which direction the player is turning and whether the player is accelerating.