The most rewarding part of the game development process is seeing the end result of all your toiling over game code. In fact, one of the most exciting aspects of game programming is how you can experiment with tweaking the code and seeing how it impacts the game play. There admittedly isn't a whole lot to be tweaked on the Brainiac game, but it's nonetheless a neat game to try out now that the code is complete. Figure 8.2 shows the game upon initially starting out, which shows all the tiles hidden and ready for you to attempt a match. Figure 8.2. The Brainiac game begins with all the tiles hidden, waiting for you to make the first tile selection.
When you click to select a tile, its image is revealed, as shown in Figure 8.3. Figure 8.3. Clicking a tile reveals its underlying image, which lets you know what you're attempting to match.
After making your first move, the next step is to try and make a match by selecting another tile. Of course, on the first round of the game, this is essentially a shot in the dark. When you fail to make a match, you have to click once more to return the tiles to their hidden state and attempt another match. This gives you time to memorize the locations of the tiles you attempted to match. Making a match simply involves selecting the same two tiles, as shown in Figure 8.4. Figure 8.4. Matching tiles involves selecting two tiles with the same bitmap image.
If you're one of those people who can recall the name of every classmate in your kindergarten class, you'll probably find the Brainiac game easy to master. Otherwise, you might just end up clicking aimlessly until you luck out on a few matches. Either way, the game will eventually end, and you'll be able to judge how well you've done by the number of tries it took to match all the tiles. Figure 8.5 shows the window that is displayed upon completing the game. Figure 8.5. Upon completing a game of Brainiac, you are presented with a window that lets you know how many tries it took.
If you're the obsessive, competitive type, you will no doubt spend hours trying to get the number of tries down to a ridiculously low number. Or you might decide that Brainiac is nothing more than a light diversion on your path toward creating new and more interesting games . Either way, it's a good example of how to pull together a variety of different skills toward the creation of a complete game. |