Exercises

Exercise 10.1: Starting in a zoomed-in mode

Comment in the last line of the cGameDambuilder::initializeView, rebuild and run the Pop program, and switch to the Game | Dambuilder. Note that it is in a zoomed-in mode. Is it still zoomed-in if you switch back to Spacewar? Why not?

Exercise 10.2: A multi-level game

Often people like to write games which have more than one level. To get you started the Pop Framework provides an int _level member of cGame which is initialized to 1 in the constructor (not everything has start counting with 0)! The reset method returns _level to 1 in case it’s changed.

To use level, in your adjustGameParameters you’d look for some trigger condition, such as score > 100, and have a block of code like this: ...

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.