Coder Social home page Coder Social logo

anniversary-game's Introduction

Tenth Anniversary Game

So, for our tenth anniversary, I thought I'd make something slightly more ... dynamic ... than your standard Hallmark card. I thought a simple JavaScript game might be fun.

Unicorns and Rainbows

Since everyone knows that a happy marriage is made of unicorns and rainbows, I figured I'd work with that. I didn't reflect on the fact that writing even a simple game in JavaScript is like going through a divorce. In any case, I decided to use animated GIFs as sprites, and do the rest in Canvas.

Note: This released version has a placeholder wedding picture (ring.jpg). Replace this with an appropriate image!

Lessons Learned

  1. It might be faster to write a game from scratch, but seriously, take the time to learn a framework and use it. With any luck, it will handle all those weird edge cases, and probably have better support for odd platforms.
  2. Sound in JavaScript is nasty, and not very portable. Again, use a framework (or commit to modern browsers, and use Web Audio API).
  3. Responsive design is all good, but for a game, it might make sense to commit to a fixed size for playability.
  4. Users will resize the window in the middle of a game. Code should probably trap for that, and do the right thing.
  5. Under iOS, things don't work quite as you'd expect. This game should have been optimized, and used something like the touchAction style to improve playability.
  6. I expected players to launch a single rainbow at a time. In fact, there was a whole lot more clicking than that.

License

This game, and all of the assets I have created are released under the MIT License. The sound files are either conversions or derivative works of the files from http://www.orangefreesounds.com which appear to be released into the public domain by the author. See the credits.html page for more information as to sources, and to help you determine if you may reuse the assets in your legal environment.

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.