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

8.3. Critter methods

In order to run a game, we repeatedly call six methods for each critter, cycling through the calls over and over. The cGame::step method orchestrates the calls.

Figure 8.4 isn’t any particular kind of official UML diagram, it’s simply an informal way of showing the order in which a critter object is cycled through its main method calls, with time flowing in the clockwise direction.

Figure 8.4. Critter methods called by the cGame step method

The Update, Feelforce, and Feellistener methods

We give the cCritter a basic update(CPopView *pactiveview, Real dt) method. The argument isn’t often used; a bit more about it appears ...

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