Okay fellows. It took me ages, but I coded my very first game in JavaScript. It’s based on Quoridor, a really interesting “abstract strategy” board game, designed by Mirko Marchesi and published by Gigamic. The rules and logic of it are quite simple, so I thought it would be a nice project for my first experiment of this kind.
What I’m about to do here, is to review step by step how I made it. It was my first real use of Javascript Prototypes and HTML5 canvas, and I learned a lot, so maybe this little “tutorial” will be interesting for you.
- Introduction
- Markup
- Rules
- Classes
- Game Object
- Rendering
- Square Object
- requestAnimationFrame
- Player Object
- User Player
- Computer Player
- Fences Manipulation
- Setting Form
- Style Sheet
- Launching
The game “Quoridor” is legally owned and protected by Gigamic, so you guys understand that this code can’t go further than our private experimental use.
Maybe you would like to play the demo before we make this work and rock.