Coder Social home page Coder Social logo

ping-pong's Introduction

Si Ping Pong

We hacked our Ping Pong table! Read the blog post.

Technology

Building

Gulp is used to build the client. From the project root, run npm install and gulp to build. The default Gulp task will build and then start watching.

Sounds

Audiosprite is used to build the sound sprite. You'll first need to install Audiosprite:

npm install -g audiosprite
brew install ffmpeg --with-theora --with-libogg --with-libvorbis

Then run gulp sounds from the project root to rebuild the sprite. This will:

  • Fetch audio announcements for all players from Google's unofficial TTS API
  • Fetch point announcements for scores 0โ€“40 from Google's unofficial TTS API
  • Include any .mp3 or .wav files in the ui/public/sounds directory
  • Rebuild the JSON file that contains the audio data required to play the individual sounds

gulp sounds depends on a DB connection in order to get the player list. You may need to specify the environment to use, for example: NODE_ENV=development gulp sounds

Remember to rebuild the frontend after regenerating the sounds in order to include the updated sprite JSON in the Browserify build.

Todo

  • General restructuring and refactoring (v1 โ€“ new architecture, tidy events, move game logic client-side)
  • Rather than mashing up audio, use full clips for each phrase for each player for more natural sounds (this should be automated)
  • Add an easy method for plugging in events from custom hardware (adding players, recording points)
  • Remove dependency on global vars (game, for example)
  • Aim for strict mode compliance
  • When an RFID tag that does not have an associated player is scanned, the ID should be emailed, posted to HipChat, etc. so that it can be easily added ... or just add an inactive player to the database?

UI

  • On first load, the leaderboard does not fade in like the other stats

CSS

  • Add Autoprefixer and strip vendor prefixes
  • Make variables for commonly used values

ping-pong's People

Contributors

juice49 avatar

Watchers

James Cloos avatar Christian Gossain avatar  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.