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?



    Part I: Software Engineering and Computer Games
    Part II: Software Engineering and Computer Games Reference