Original Post
I have been working on a game project and was wondering how I would go about spawning entities such as players, bombs, rockets, etc. All of these entities need to be updated in the main loop. I can create class structures and create entities that way, but I need a way to enter a function (say SpawnEntity) that creates an instance. The main problem I am having trouble with is, how do I know all the names of all the instances created of a class, so I can loop through them and manage them. I am trying to think of a way to use unique ID numbers, like a relational database, but I cannot think of any ways. Any advise on how to set this up would be greatly appreciated. Thanks.