10.1. The cGame class

The cGame and cCritter classes are the key classes for writing games using the Pop Framework. In using the Pop Framework to write a game you will typically define a few new child classes of cCritter and a new child class of cGame. Your cGame child will include some new members and will override some of the base class cGame methods.

The most significant member of the cGame is a cBiota *_pbiota object. The cBiota object is a collection of pointers to all of the game’s active cCritter objects. The name of this class cBiota is based on the fact that the class is meant to hold the entire population, the ‘biota’ of the world of the game. This collection class is implemented as a type-safe, serializable CArray, and it has some ...

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.