Message-ID: From: Robert Humphris To: "'Mark T Logan'" , "'Art S. Kagel'" , "'Cesar Scarpini Rabak'" Cc: "'adalee AT sendit DOT sendit DOT nodak DOT edu'" , "'djgpp AT delorie DOT com'" Subject: RE: Quake vs. Demos Date: Tue, 3 Jun 1997 14:44:18 +0100 Encoding: 69 TEXT Precedence: bulk Further to my previous posting, think about this... A tank similar to those found in C&C... class tankObject : public gameObject { protected: int CurrentPositionX, CurrentPositionY, direction, requiredPositionX, requiredPositionY; // some pointers to hold the bit maps of the tank int requestedOrders; public; tankObject( mapObject *currentMapPtr; bitmapList *listOfTankBitmapsPtr; int startingX, int startingY ); // the tank object is instanciated with a pointer to the map, a list of bitmap pointers, and its position on the map // at instanciation time the tank selects the pointer to the starting bitmap, that say of a tank pointing north void setOrders( int orderPositionX, int orderPositionY, int action ); // the orders given to the tank are: where we want the tank to go, and what we want it to do when it gets there.. // in this method the tank will evaluate the direction that it must take, select the appropriate bitmap image of itself // as well as perhaps do some other calculations, and posibly play a "ready sir" type WAV file void dutyCycle(); // in the duty cycle the tank the tank will move along its route, check for items on the map within an area that may be of interest // such as enemy objects, obsticles etc and blit its current bitmap to the screen buffer .... }; Now if we set a number of these tanks off in life... typedef tankObject * tankObjectPtr; int main() { .... tankObjectPtr a, b, c, d, e, f; a = new tankObject( &map, bitmapsPtr, 10, 10 ); // set up b - f a->setOrders( 100, 200, ATTACK ); b->setOrders( 20, 200, GUARD ); .... // then in the game loop for( i=xxx; i=0; i--) { ... a->dutyCycle(); b->dutyCycle(); etc. The tanks would move around the screen quite nicely thank-you very much I know that this is not a proovable game, but I though that I would put my money where my mouth is and show what I meant Rob Humphris >