Skip to main content

Game-in-a-day

Well, sort of...

I did this game over a period of several days. Altogether the actual time spent on it adds up to about 18 hours so that's why I'm calling it a "Game-in-a-day" even though most of the references I've seen to it actually use a contiguous 24-hour period. Over the next few days I intend on posting about the process I went through, my approach to the problems as well as my solutions. This doesn't have all the bells and whistles of a modern video game or the polish that would be there with a couple weeks of work. This was a quick, one-off project that provided a bit of practice and hopefully is a learning experience for others as well.

While it's not the best UI, design, or AI, I feel the game is fun to play and that overall the code is professional.

Click here to play the game

The goal was simple - to reproduce a board game in video game form with much the same features as was required for my soft-dev project in college.

There were a few exceptions from my college soft-dev project and I laid them out to define scope.

  • I didn't want to get hung up too much on graphics. I played the actual board game with a friend and really liked that the physical board game we played had a very simple look to it. Additionally, the game is a couple hundred years old. I wanted to follow the idea of a basic game because I knew that if I added a story and characters and cool graphics the asset creation alone could easily take days.
  • I ignored sound because it's a simple board game.
  • I wanted to explain the rules of the game but didn't feel I needed to go into tutorials and all sorts of other in-game help because when you have a board game usually all you get is what's printed under the lid.
  • No networking. While this would be cool it creates a lot of additional work that is beyond the scope of what I wanted this little project to be. Play against an AI, or play hotseat with a friend.

That being said, I wanted a playable game that followed the rules and looked good. I wanted an AI you could play against. The AI didn't have to beat you 100% of the time but it could at least hold its own. I called the game "Viking". It's based off "Tablut" or "King's Table" and there's some other names for it as well.

I've used C# and Silverlight 5 along with the silverlight toolkit. The only code I carried over from resources not done within this time period were the classes and tools I use on all my silverlight projects including:

  • A base implementation of INotifyPropertyChanged that accepts a linq expression as the property changed (thus, instead of RaisePropertyChanged("MyProperty"), using RaisePropertyChanged(() => MyProperty) which allows for the built-in refactoring "MyProperty" without manually changing it or risking misspellings, etc... as it will cause a compiler error if it's wrong.
  • An implementation I like of DelegateCommand
  • A code snippet for MVVM properties based upon the one by Steven Wilbur, mine is available here but it relies on code that I will make available in the next few days.

Additional tools: Visual Studio 2010, Sweeper

Click here to play the game