Dice Wars Project

A JavaScript game and project to teach programming through game creation

by Kasey Chang

An idea came to me when reading reddit.com/r/learnprogramming in that a lot of people who start programming are completely lost. They don't see how to apply what they learned. I thought I would give them something simple, then gradually adding more and more to it until it became a full game.

I chose the simple little dice game called Dice Wars, and the Dice Wars Project was born.

Right now, the project has three chapters, with a few more chapters coming soon. Each chapter has a corresponding blog entry. Starting with simple Bootstrap starter code, this also introduces the programmer to jQuery DOM manipulation, Bootstrap grid, and various JavaScript functions and how to use them.

Chapter 1: The War Begins

This is the basic version which rolls 3 dice and displays the results.

Blog Entry: Link

Source Code: Link

Demo: Link

Chapter 2: The War Intensifies

This completes the game, even though it is very plain looking. There is a win/lose condition, and there is a reset.

Blog Entry: Link

Source Code: Link

Demo: Link

Chapter 3: The War Enters a New Phase

This part deals with minor edits to the game to enhance playability and user interface to something a modern user would expect, like confirmation before reset, tooltips, etc. so it looks a lot better by using fontawesome (tm) icons for score and dice.

Blog Entry: Link

Source Code: Link

Demo: Link

Coming soon

Chapter 4: The War Expands

Change the functions to allow more parameters so game variants (different number of dice, different starting pieces, etc.) will be supported.