im pretty new to game development. Before iI start making somea game, imI'm trying to figure out how iI will manage thingthings. One One of the first thing imthings I'm not sure about, is how to manage entityentities (enemy, player, projectile...)
Language i could use, since these are language i know or im learning:I'm going to be using either C, C++, JAVAJava, or C#
One of the idea i gotideas I have is to use anone array for projectile,projectiles and one for enemy, eachenemies. Each time iI have a new entity, iI grow my array. Here is the problem: If player/enemy is firing, that creates a new entity, projectil which means the projectile array is growing.
Suppose its projectilprojectile #2053, when it hit something, iI free it, then in my loop to check which projectilprojectiles are to do something, like getting closer to there target, iI check if every # of my array to see if its null, if not, check is trajectory. But the problem is that the array will grow each time a new projectilprojectile is fired, and iI will get a memory problem at the end, how should i manage entity? (sorry if its unclear, its even unclear to me on how i will do thing). Can someone explain me
So how toshould I manage entity, or point me to any good article about thismy entities?
I need an awnser that covercovers both, object oriented and standardprocedural, since iI mainly do thingthings in C.
Here is what i understand on how to use entity: