Graphics Programs Reference
In-Depth Information
use buttons for spins, or use motion and position sensors to detect tilt (left-right) for
different types of spins. In some cases, translation can be made automatic (a clever
design principle becoming very common in popular modern games) so the screen can
be used for rotation. This way, a lot of screen space can be left for a spacious look to
the game.
Tank Fence
Having explained the necessary relationship between inputs for gameplay and object
transformation (using graphic rendering APIs), it's time to introduce the game we
will be working with.
This game is Tank Fence , a simple 3D shooting game in which the player gets to
control a tank to guard a region against invaders. The UI for this game ( Figure 2-6 )
consists of buttons for forward-backward movement of the tank, another button for
firing weapons at the invaders, and touch (or optional use of motion and position
sensors) to rotate the tank. The buttons intended for forward-backward movement
will actually update the translate matrix we associate with the tank, and the touch
(or optionally motion & position sensors) will update the rotate matrix used in com-
bination with the translate matrix .
Figure 2-6 . Tank Fence
 
 
Search WWH ::




Custom Search