20 January 2010

I invited Clutter for Christmas

It’s now an established tradition at my mother’s Christmas Eve party, we all gather for a good meal, exchange gifts and then play a game. Not any game, an home made game built for this occasion only. For example, in the last 2 years, we played a giant Snakes and ladders game on my mom’s wall and an adaptation of Deal or No Deal. During the game, each player wins little gifts. Usually the games include special rules so that everyone finishes with the same amount of gifts.

The Snakes and Lader game of 2008

The Snakes and Ladders game of 2008 (the ladder is 20 cm long)

But 2009 was special. I was going to host the party. I was going to be the one to build a game for this occasion. My mother is creative and resourceful when comes the time to use whatever materials are at hand, but I am not. I decided to build a computer game instead! Noël de fortune was born.

Splash Screen of the game

Splash screen of the game

After consulting with my co-host, we elaborated the basic rules of the game: a turn-based game where players have to guess an expression. They would be able to give letters that would then be revealed. If the letter is not in the expression, the player loses one point and it is then to the next player to play. The players can try to solve but if they fail it costs them 5 points. Each player have their own expression to find. When he finds his expression, he wins a gift. There should be 3 rounds. To help the players, during the first round the whole alphabet is displayed with the letters he already said highlighted. During the second round, only the given letters are displayed, and nothing during the last round. It makes it harder :) The player who finds his expression with the less tries wins an extra gift at the end of the game. These rules probably remind you of The Wheel of Fortune without the wheel, or of Hangman.

During the game

During the game

We built a list of 400 possible expressions for the game so that we could also play with everyone. There were 3 themes, one per round: Christmas, Things to do and Famous People. Not unexpectedly, the first theme was quite easy to guess, but the 2 others were more challenging.

To create the game, I decided to go with Python as I wanted to have a language with rich built-in types such as lists, sets and dictionaries. They came handy in the implementation. A game has to be exciting to the eye and considering I already had a fair amount of experience with Clutter, it was an obvious choice. The graphics are simple: everything is an image (except text!) and is animated using Clutter. When the player says a letter, all the cards bounce as if something passed under to read them and they turn around if the letter matches. A nice magic sound is played out. There are error dialogs (the letter was previously given or the letter is not found) and solution dialogs too! When the turn is over, the score is displayed using vertical bars that show up one by one (adding a little stress hehe).

The solution dialog

The solution dialog

The bad solution dialog

The bad solution dialog

The points screen

The score screen (not actual game scores ;-)

It took quite over 80 hours to create the game. Overall, it was a great success :) Our guests liked it and fun lasted for hours!

Gabriel explaining the rules

Gabriel explaining the rules. You can see all the gifts surrounding the LCD screen.

I will not be releasing the game. Quite honestly, the code is a mess: it was my first game, my first Python application from scratch and in the end I was just fixing bugs without fixing core issues. But hey it works: I am sure there are worst proprietary apps out there :)

Some of the graphics are composed of images available under Creative Common such as the background. Unfortunately, I did a lazy job keeping track of my sources and I lost the link/name of the author of the nice graphics I used. If you find it, I’ll link it!

Oh by the way, since my mom got her hands free of creating a game, she invested herself in the packaging of the gifts. Has anyone of your ever received a gift wrapped like a Bûche de Noël or a drummer boy’s drum? :)

My gift was wrapped like a Bûche de Noël. I won this gift by finding the word "meat ball stew".

Comments (5)

  1. 20 January 2010
    mike said...

    absolutely lovely! great idea.

  2. 21 January 2010
    Matt said...

    Wow, very good job!

  3. 21 January 2010
    Phil Wei said...

    Hi: This is Phil. Remember me? The chinese guy at Poly9 last week! Great job on the game.

  4. 27 January 2010
    Stéphane said...

    Why don’t you release the source ? It could be a very good example for people willing to start programming with Clutter and Python (like me~~).

  5. 27 January 2010
    Pierre-Luc Beaudoin said...

    For that exact reason, this isn’t a good example of PyClutter usage :)