With this being my first game, and having no object-oriented experience whatsoever, I've come across a small problem I'd like an opinion on...
When one of the 4 players hits a wall, I draw an explosion - LoadAnimImage strip of 32 frames
I have a type, Texplosion containing fields such as
x,y,frame,flag_active
I create an array to hold the 4 player explosions then in my main loop I loop thru each player and check if explosion[x]flag_active is true. If it is I draw the eplosion.
Trouble is, each player can trigger an unknown quantity of eplosions
So my question is, instead of using an array (which is fine for a KNOWN quantity of explosions) is there an alternative way to draw as many explosions as I need ?
When one of the 4 players hits a wall, I draw an explosion - LoadAnimImage strip of 32 frames
I have a type, Texplosion containing fields such as
x,y,frame,flag_active
I create an array to hold the 4 player explosions then in my main loop I loop thru each player and check if explosion[x]flag_active is true. If it is I draw the eplosion.
Trouble is, each player can trigger an unknown quantity of eplosions
So my question is, instead of using an array (which is fine for a KNOWN quantity of explosions) is there an alternative way to draw as many explosions as I need ?