Skip to content

JumpFit/DuckDuckJump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DuckDuckJump

Gamified fitness app 🦆

Duck Duck Jump

Overview

Duck Duck Jump is a work out platformer / side scroller game you can control hands free that combines both fitness and your inner gamer. Duck Duck Jump uses a Tensorflow.js machine learning model that is capable of detecting human movement and was taught to recognize actions like squatting and jumping. Since we had the goal of adding motion detection to a video game, Phaser 3.js seemed like the best choice to bring it all together. Phaser 3 is a 2D game framework that allows us to create a game using Javascript and HTML5 inside a web browser. Our goal is give people a fun reason to get the body moving, without having to invest in a console which can cost a lot of money, with tools that they normally would have at home.

Our latest version of the app is currently deployed on Heroku

Features

Gameplay

gamescene

We envisioned a game that wouldn’t end until you lost, a platformer that your character would run through until they fell off. To make this happen there actually isn’t a pre-existing world that your character moves through but a randomly generated world that runs into your character, so you’re always making forward progress.

Your objective is to stay alive for as long as you can, jumping from platform to platform while collecting those delicious grapes. When you jump, the duck jumps and when you squat, the duck squats. You can also squat right after you jump so that your duck can land faster. If you can't make it to the next ledge, game over!

TensorFlow.js Model MoveNet

jumping

squating

MoveNet is a tensorflow model, which uses your webcam, that has already been trained to quickly and accurately detect 17 keypoints on a human body. For each keypoint, it provides an x and y coordinate as well as a score based on how confident it is in its detection. We chose this model for its incredibly fast detection speed, which is very important when someone is performing quick actions like jumping and squatting.

In order to determine if a player was jumping, we first measured the distance from their ankles to their knees. Then we established a base position for their ankles, and for each frame, evaluated whether the distance from their ankles to their “base position” was at least 1/5 the distance of their ankles to their knees.

In order to determine whether a user is squatting, we first measure the distance between their hip and knees to establish a base. We do this for both the left and right sides of their body to make sure there’s no cheating. If the distance between the player’s hip and knees decreases by at least ⅓, we consider that a squat.

Future Plans

  • Multiplayer game mode
  • Game shop to unlock different characters
  • Different levels of difficulty

Technologies

Phaser.js TensorFlow.js for pose detection
Phaser.js Phaser.js for game engine
JavaScript Javascript
Node.js Node.js
Express.js Express.js
Sequelize Sequelize
PostgreSQL PostgreSQL
Webpack Webpack
Babel Babel
Bootstrap Bootstrap

Contributors

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •