Showcase: a Facebook Game

Its not often that I get a client’s game released. Few times in the past I have worked on games that never saw the light of day – and this isn’t one of them.

So I’m taking the opportunity to show off a project I’m involved in that got published recently as a Facebook game.

Lottorace Facebook page

This project is  made of server side and client side. The client side is Flash, and several packages where used to create it. It’s based on Flex 4 with Spark controls, uses Robotlegs as mvcs framework and makes use of Facebook API for connectivity.

As part of my role in the development I had to implement the animations and effects entirely in code – based on prior designs by artists that where done originally as timeline animations.

Game Area

The main game level contains a ‘lotto machine’ that features physics, particle motion and plenty of sequenced effects. To achieve those, I relied heavily on Greensock TweenMax 11 with its excellent plugins as well as home-brew physics code.

The Game

Both the floating balls and the ones falling down the tube have particle physics with some collision, so they bounce off the glass and off each other in a ‘believable’ manner.  For the rest we used TweenMax.

A word on TweenMax: this is by far the best animation/tweening library in the market and I can’t start to imagine how I would do without it. Its really easy to use and produces nice smooth motion with tons of differnt options. If you plan on doing any animation in code you should definitely check it out.

Technically speaking the entire code was designed with performance in mind. There isn’t a single timer in the code (flash timers are bad for you) and only a single point were the ENTER_FRAME event is used. That proved as a valuable decision in regards to performance tuning and memory footprint – for the most part, the game runs in a steady rate of 30 fps.

So check it out here, and comment here if you like it.

I sure had a lot of fun working on it!