   Game play programming
  I made a remake of wizball for the www.remakes.org remakes competition, and I completed it. It has been a long time since I actually completed a game, in fact the last time I finished a game was say 4/5 years ago. I have been doing a lot of graphical stuff, and so the graphical part of the game turned out very well, however, the part you might think that's the easiest, was the part I had problems with, for that's the game play.Right now my code for the gameplay is much like this: // anymate enemiesfor(i = 0;i < enemies.size();i++){bool deadlycollision = false;if(PowerUps & PowerUp_Bomb)if(enemies[i].GetPos().x > wiz.GetPos().x - 11 && enemies[i].GetPos().x < wiz.GetPos().x + 11)deadlycollision = true;// do enemy motionif(!enemies[i].DoMotion(SecSinceLastFrame)){// if DoMotion returns false, the enemy should be deletedFLASH flash(enemies[i].GetPos3D(),XRGB(255,255,255));effects.AddEffect(flash);enemies.erase(enemies.begin() + i,enemies.begin() + i + 1);continue;}// test for collisions with wiz, or catif(enemies[i].GetType() == Drop){if(cat.Collision(enemies[i]) && state == Playing){if(enemies[i].GetColour() == DROPLIVE)Lives++;else if(enemies[i].GetColour() == DROPFILTHRAID)StartFilthRaid(6);else if(enemies[i].GetColour() == DROPFREAKYBITS)freakybits = 10;else{// fill the cauldronpowerups.AddDropToCauldron(curpaintcolour);powerups.Update();Score += 2;}// delete the dropenemies.erase(enemies.begin() + i,enemies.begin() + i + 1);and almost all that gameplay code is one class, the KERNEL class.It works all fine, but it's a hell to debug, or change something, and I find bugs in it all the time. So are there better, oo, ways of doing this kind of stuff?   My Site[edited by - Quasar3D on August 1, 2003 7:09:50 AM]