Giter Site home page Giter Site logo

imclab / playground2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from topheman/playground2

0.0 1.0 0.0 360 KB

An experiment with socket.io and accelerometer (control your desktop with multiple mobile devices)

Home Page: http://topheman-playground.herokuapp.com/

License: MIT License

playground2's Introduction

TOPHEMAN PLAYGROUND V2

##Intro

Try it at : http://topheman-playground.herokuapp.com (heroku instance).

Presentation : http://slid.es/topheman/topheman-playground

Once you snapped the QR-code with your phone, take control of the bouncing ball on your desktop screen, like a Wiimote, tilting your phone as you would do on a labyrinth game.

  • Connect with multiple mobile devices
  • Watch from multiple desktop/laptop screens

You can even use the devicemotion emulator to control the ball from your desktop.

Not a game, more of an experiment that could lead to a game …

Thanks to remote-tilt for the emulator.

Topheman Playground

##Install

  • npm install
  • node app.js 192.168.1.2:3000 (192.168.1.2:3000 being the public IP:PORT of your node server - port by default at 3000 - this is used to create the QR-Code)

##Next

I coded the v1 about a year ago, and now I decided to refactor it so that it could be a sort of a boilerplate for some other games.

Take it, make your own games and tell me about it !

##Notes

My heroku instance doesn't support WebSockets, so socket.io fallbacks to xhr-polling. If you want to test a version with real WebSockets, you can try : http://playground.topheman.kd.io:3000 although it only stays up for 20 min (after the VM goes asleep - so tweet me or whatever so I could lauch it).

When you'll browse the code, you'll see that there is a connection/disconnetion routine on the sockets which makes sure to disconnect any mobile client which has more than one socket opened (to prevent multiple dead balls). This was a tricky part, playing with the express session and the socket.io handshake :-) …

playground2's People

Contributors

topheman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.