Are There Direct Links?
The Github repository is open to the public. And the code is free! I hereby grant you the rights to copy it for your own benefit in any way you see fit, as long as you give me credit.
Feel free to even submit PRs to this repository!
What’s It All About?
Here are the technologies I used in creating this game:
- Classes. Used extensively, (perhaps too extensively), a Class represents an object on the screen. The
extendsyntax is used heavily.
- Modules. Everything is an ES6 module, including the single JS that is loaded by the HTML.
- Canvas. I have never worked with HTML Canvas before, so this was a great learning adventure.
- Animation and Hit Detection. Santa and the Bad Items move, so there needs to be some sort of animation routine determined. I started using
setInterval(), but found that it would not scale well.
requestAnimationFrame()saved the day.
- Read only Properties. I figured out a way to randomize a read-only property on a class – basically it changes each time you read it. Fun!
Things To Do
You are free to clone the repository and make any changes you want. You can make it your own, if you wish. It’s all free of charge and free to use. I do encourage you to create pull requests on the repository.
Given that, there are some things I know needs to be done:
- Canvas Rendering. I am certain that my animation and hit determination routines can be improved upon immensely. I am not a game designer.
- Class Consolidation. I feel there are too many classes, and these can be simplified.
- Common Data. A lot of common data is stored in the Game class. I don’t feel this is right. My gut tells me there has to be a better way to share data.
Above All, Have Fun
This is my holiday gift to you. Run with it and have fun!
We’ll see you next year!
Web Tinkerer. No, not like Tinkerbell.
Leave a Reply