Gaming/GameCenter
Communications
irc.mozilla.org backchannels
- #galaxy
Roadmap
- (games||gaming).firefox.com launch with splash page and directory: 9/15/2014
- v0.5 of galaxy: 9/15/2014
Questions
- length of run of directory metrics (used for gauging interest)
- risk of directory undercutting galaxy
- how galaxy and directory are integrated
- URL structure: g.firefox.com/directory and g.firefox.com/galaxy?
- allows repurposing of g.f.c for any strategic tack
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, Node.js, Gulp, Metalsmith.
Repository
Servers
- Staging: https://galaxy.dev.mozaws.net
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
Servers
- Staging: https://api-galaxy.dev.mozaws.net
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.
Screen Sharing
A demo of Sathya playing HexGL whilst sharing his screen with a friend. Using Chrome's desktopCapture API from an extension, the screen is turned into a Media Stream,
which is then streamed to another browser using WebRTC. (The API will be available soon in Firefox Nightly.)