Exercises
Exercise 6.1: Timing the critter motions
Min speed (units/sec) | Max speed (units/sec) | Avg speed (units/sec) | Approx. seconds to move ten units | |
---|---|---|---|---|
Spacewar | 0.5 | 3.0 | 1.75 | About six |
Defender3D | 0.5 | 10.0 | 4.75 | About two |
Get a watch with a second hand, start up Game | Defender3D, and time how long it takes a critter to move across the screen. Is it about two seconds? Now make the window very small, and time again. Now make the window big, add more critters by selecting Game | Large, and time again. Do you still get about the same speeds? Now try with Spacewar. Time the critter motions again. Try editing the cGameDesign::CRITTERMAXSPEED value in gamedesign.cpp and try that game again.
Exercise 6.2: Estimating sizes
When you try and estimate ...
Get Software Engineering and Computer Games now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.