All Projects → markmandel → happy-angry-surprised

markmandel / happy-angry-surprised

Licence: Apache-2.0 license
A very silly, web based, Firebase and Cloud Vision API multiplayer game that works exactly the same as Rock, Paper, Scissor - except with facial emotions.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
Makefile
30231 projects
shell
77523 projects
CSS
56736 projects

Projects that are alternatives of or similar to happy-angry-surprised

SSTMCSPGAAS
Stupidly Simple Tiny Minimal Coming Soon Page Generator As A Service
Stars: ✭ 23 (-45.24%)
Mutual labels:  silly
Play-Notes
A simple Powershell function that lets you write/play songs in musical notation using the Beep() function in windows.
Stars: ✭ 17 (-59.52%)
Mutual labels:  silly
silly-android
Android plugins for Java, making core Android APIs easy to use
Stars: ✭ 40 (-4.76%)
Mutual labels:  silly

Multiplayer Happy, Angry, Surprised with Firebase

Happy, Angry, Surprised is a very simple, silly, web based multiplayer game that works exactly the same as Rock, Paper, Scissor - except with facial emotions.

The browser takes a photo of each of the player's faces, and depending on which emotion is displayed (determined through Cloud Vision API), a player will win, lose or draw.

Screenshot

The rules are as follows:

  • Angry beats Surprised
  • Happy beats Angry
  • Surprised beats Happy

Running the Demo

You will need a Firebase project, and a Google Cloud Platform project for the Cloud Vision API usage.

These should ideally be the same project, since it will make it much easier to run, but they don't have to be.

config.js

This is the file in which all configuration and authentication information goes for Firebase and Googler Cloud Platform. Currently it is set to placeholder values that will need to be replaced.

firebase

The Firebase configuration will need to be retrieved from the project overview page, by clicking the "Add Firebase to your web app" button.

visionAPI.key

This is the API key that can be used for Vision API (which will need to be enabled on your project).

If your Firebase project has an enabled Google Cloud Platform project, you can use the same API Key as your Firebase configuration.

If not, you will need to go to the Developer Console > API Manager > Credentials and create a new Browser API key.

NOTE: DO NOT DO THIS IN PRODUCTION. PUTTING YOUR API KEY IN CLIENT CODE IS NOT A GOOD IDEA

Single Player / Test Mode

If you are testing on your own, append ?debug to the URL, and it will make the picture taking countdown on that particular game increase to 10 seconds.

This means you can have two browser instances running, one with the standard countdown of five seconds, and one with ten. This make testing with one computer much easier.

Presentation Recordings

You can view the presentation that this demonstration was built around at the following URLs:

Licence

Apache 2.0

This is not an official Google product.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].