O'Reilly logo

Software Engineering and Computer Games by Rudy Rucker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exercises

Remember that, when 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. Do it now, it’ll save you a lot of clicking later on. So make your startup game be cGameAirhockey or, if you’ve taken the trouble to make new files and change the names, cGameBasketball.

Exercise 16.1: Better hitting and other tweaks

It feels a bit cumbersome hitting the puck with the player. It would probably be easier if you make the player smaller. Try using a setRadius call in its constructor to make it smaller. In doing this you reduce the mass of the player (normally equal to the density times the radius cubed), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required