ok.. then why not use this in your overall framework as well...
like i mentioned above... create a GAME class which does nothing more than initialize any instance of itself, setting up initial params, and then enters a main loop at this point...
nothing more... we'll worry about the other stuff later...
now, within the main loop, have it send an event out once every iteration of the loop...
then create an overridable method that handles the event...
next create a GAMEOBJECT class... one that does nothing more than respond to the event the GAME class is posting...
in VB i do it this way...
1-create the GAME class which posts an update event continuously...
2- create an Update Method in the GAME class which handles the update event... make this overridable and inheritable...
3- create a GAMEOBJECT class which inherits GAME, and in tun, its update method... now every game object will be automatically update itself... override the functionality...
4- create specific game object classes which inherit the base GAMEOBJECT functionality and will be self updateable, and will contain the specific functionality that you want it to have in the game...
just whip up a simple template of this to test the concept...
each object will now be a self contained instance of its class... no LIST required...
--Mike
like i mentioned above... create a GAME class which does nothing more than initialize any instance of itself, setting up initial params, and then enters a main loop at this point...
nothing more... we'll worry about the other stuff later...
now, within the main loop, have it send an event out once every iteration of the loop...
then create an overridable method that handles the event...
next create a GAMEOBJECT class... one that does nothing more than respond to the event the GAME class is posting...
in VB i do it this way...
1-create the GAME class which posts an update event continuously...
2- create an Update Method in the GAME class which handles the update event... make this overridable and inheritable...
3- create a GAMEOBJECT class which inherits GAME, and in tun, its update method... now every game object will be automatically update itself... override the functionality...
4- create specific game object classes which inherit the base GAMEOBJECT functionality and will be self updateable, and will contain the specific functionality that you want it to have in the game...
just whip up a simple template of this to test the concept...
each object will now be a self contained instance of its class... no LIST required...
--Mike