DuckHunt ported to JS and HTML5
Branch: master
Clone or download
Latest commit abc4d1d Sep 9, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist Add built files Sep 9, 2018
eslint Deprecate browserify in favor of webpack and reduce gulp tasks. Vendo… Feb 3, 2017
src Show replay message with score commentary and reload the page when cl… Sep 28, 2017
vendor Deprecate browserify in favor of webpack and reduce gulp tasks. Vendo… Feb 3, 2017
.eslintrc Deprecate jshint/jscs in favor of eslint Feb 2, 2017
.gitignore Add gitignore file Mar 20, 2015
LICENSE Update license with name and year Jun 10, 2015
README.md Workflow changes and documentation Feb 3, 2017
gulpfile.js Update to use new gulp api Sep 9, 2018
infrastructure.tf
main.js Refactor to use Greensock, cleanup method names, commenting, etc. Nov 8, 2015
package-lock.json Update dep versions to be 'vulnerability free' Sep 9, 2018
package.json
s3policy.json Add deploy task Oct 2, 2015
terraform.tfstate Update tfstate Mar 3, 2016
terraform.tfstate.backup Update tfstate Mar 3, 2016
webpack.config.js Absolute paths in webpack config Feb 15, 2017

README.md

DUCK HUNT JS v3.0

Play the game

This is an implementation of DuckHunt in Javascript and HTML5. It uses the PixiJS rendering engine, Green Sock Animations, Howler, and Bluebird Promises.

Rendering

This game supports WebGL and Canvas rendering via the PixiJS rendering engine.

Audio

This game will attempt to use the WebAudioAPI and fallback to HTML5 Audio if necessary. Audio is loaded and controlled via HowlerJS.

Tweening

The animations in this game are a combination of PixiJS MovieClips built from sprite images and tweens. Since PixiJS doesn't provide a tweening API, Green Sock was used.

Game Logic

The flow of this game is managed using Javascript. The main chunks of business logic are implemented as ES6 classes which are transpiled to ES5 using Babel.

Working With This Repo

  • You must have nodejs installed.
  • Clone the repo into a directory of your choice
  • cd into that directory and run npm install
  • Use npm start to start a local webserver which will make the site available at http://localhost:8080/. Cross origin errors prevent this project from being accessed in the browser with the file:// protocol. This will also trigger automatic builds and reloads of the page when changes are detected in the src directory.
  • If you want to manually cut a build of the application code run npm run build
  • If you want to rebuild audio assets use npm run audio
  • If you want to rebuild image assets use npm run images

Bugs

Please report bugs as issues.

Contributing

Pull requests are welcome! Please ensure code style and quality compliance with npm run lint and include any built files.