Exercises

Remember that when you get into tweaking one particular game mode, it saves time to have the Pop program start up in the game mode that you want to play with. The way to control this is to edit the CPopDoc constructor in popdoc.cpp. Simply comment in exactly the one setGameClass line corresponding to the game you want to play. If you make a new game class, add a line for it.

Exercise 17.1: Have the popped bubbles shrink

A general principle in designing games is that things shouldn’t happen abruptly. When an object is destroyed it shouldn’t instantly disappear; instead it should show itself dying. Change Pop so that when you pop a bubble, it puts on a ‘dying act.’ You might do this by overriding the die methods by turning on a BOOL ...

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.