/Asteroids.js

A one day experiment to bringing the Asteroids game to the browser, using a mobile device as controller, Node.js, Raphaël, and socket.io.

Primary LanguageJavaScript

Asteroids.js

Based on the well know Asteroids game, this project introduces another way to pilot your ship using a mobile phone.

The original game was reimplemented in JavaScript and SVG with Raphaël.js, and a custom gaming loop. The synchronization between the desktop and the mobile screens also uses JavaScript (Node.js and Socket.io). The mobile webapp uses Hammer.js for gesture and orientation detection.

It was developed in a single day (about 9 hours) during one of the marmelab Hacking Days by Emmanuel Quentin.

Demo

Tiltable asteroids demo

Installation

git clone https://github.com/marmelab/AsteroidTilt.git
cd AsteroidTilt
npm install

Configuration

The desktop & mobile application should connect to the node server via his host. This host can be configured in the constants.js file.

Getting Up And Running

npm start
  • Desktop URL: http://{your host}:3000/display
  • Device URL: http://{your host}:3000/