Original Post
I never really thought about this one before, I just assumed it didn''t need to be that complicated so long as it got the work done. Here''s how my main game loop looks like: (and by the way, this is really just psuedo code, I know there much more involved like loading a level and checking for end of game, but just work with me ok?)
while (!done)
{
// update the player and enemies
player.update();
for (i = 0; i < numenemies; i++)
enemy.update();
//do the graphics thing
player.draw();
for (i = 0; i < numenemies; i++)
enemy[i].draw();
}
Is that essentially how it looks?