Exercises


Exercise 12.1: Spaceship listener with friction

Note that a player with the cListenerSpaceship is still able to feel forces such as gravity. Try giving the player friction in the Spacewar game and see if this makes it more pleasant to use the spaceship keys.

Exercise 12.2: Move the world or move the viewer?

Test out the effects of Ctrl+Arrow and Ctrl+Shift+Arrow in some 2D and 3D views. The visual effect of these keys is that you are moving the world. Now open the listener.cpp file and find the line #define MOVEVIEW 1 . Read the comment on this line and change the line to #define MOVEVIEW -1 . Now test the same Arrow keys in some 2D and 3D views. The visual effect of the keys is now to move the (invisible) viewer rather than the world. Which interface do you like better? Which do you think will be preferred by most users?



Software Engineering and Computer Games
Software Engineering and Computer Games
ISBN: B00406LVDU
EAN: N/A
Year: 2002
Pages: 272

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net