Game Development Reference
In-Depth Information
The simple game design for this sample game is for each player to match the right
pieces—whoever matches the most pieces wins the game.
Before we dive deep into the multiplayer aspects of the game, we will first walk
through the code that manages the graphics part of the game. We will see how, for a
given image, we cut it up into jigsaw pieces and then how we manage to stick them
back together.
We will then see the game design schema required to implement it as a multiplayer
game. Lastly, we will put it all together by leveraging code from PulseUI and finish
the game.
Setting up the project
The complete source for the sample game may be found (in the freely available Pulse
SDK package) installed in $GAMANTRA\samples\jigsaw . To create a project in Flash
Builder from the existing source, please follow the steps similar to those described
for the Hello World sample in Chapter 2.
Files in the project
The list of files that are part of the game project is shown next. The game folder
contains all the classes required to implement the graphics part of the game, such as
scaling the image, cutting the images into jigsaw pieces, the mini-map showing the
complete image, and so on. All the generated class files are stored under gsrc . The
rsrc folder contains all the image assets required for the game. The ui folder contains
the class files that are subclassed from the PulseUI package and finally the main class
in the root package JigsawGame.as .
 
Search WWH ::




Custom Search