Giter Site home page Giter Site logo

duckhunt.js's Introduction

I still hear the dog's laugh echo every time a girl rejects me, when told they are no longer serving McDonald's Breakfast, and when a vending machine will not take my only dollar bill. This is for those who still think they look badass posing with an NES Zapper.

FAQ

Q. Why no sound?
A. I wanted to create something simple that could be added to most web pages as an Easter egg and started through some mechanism like typing in the Konami code. Plus most of the sounds overlap and are incredibly short. This would have been a mess to try to get working correctly in every browser. I'm talking to you Internet Explorer.

Q) Why does the screen flash? A) To keep original to the game. When the trigger on the NES Zapper was pulled, the screen would turn black and targets would be drawn as white. The contrast was enough for the sensor in the barrel of the Zapper to determine if a target was hit or not. (Wikipeida)

Q. Your code is bad and you should feel bad.
A. Not a question but I agree with you fully.

Usage

  • Only duckhunt.min.css and duckhunt.min.js are needed with no other dependencies. Load these on the desired page.
  • To start, simple execute the function "duckhunt()". This function has an optional callback sent when complete.
  • If your next step is looking for a library or javscript snippet to trigger Duckhunt.js via a key sequence like the Konami code, might I suggest cheet.js. It is the most robust of any I have seen and still simple.

Demo

Demo or it didn't happen

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.