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 ...

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.