O'Reilly logo

Programming Video Games for the Evil Genius by Ian Cinnamon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Section Seven
 
Brain Busters
Project 50: Memory—Grid Design
 
Memory
Although the biochemical process of memory remains a mystery, you can test yours by playing this game. A set of images flashes before your eyes. The challenge? Match the identical pictures before time runs out.
 
Project
Plan and develop the 16 grid game frame.
Making the game
The game, “Memory,” consists of a 4 by 4 grid containing eight pairs of images. You will learn how to integrate photographs to create the images of your choosing in Project 53. For now, however, simply draw eight 100 by 100 pixel images and name them “img1.png,” “img2.png,” etc. In each generic image, write the image number, as shown in Figure 50-1.
Figure 50-1   Sample image.
Now that you have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required