Ok, in my game, I want to be able to delete the oldest of two types of entities...decals and spent casings. I have these entities created and working properly, but instead of using my normal "lifespan" setting to limit their existence, I want to be able to set a specific limit of entities and if that limit is reached, delete the oldest one before creating a new one, thus enforcing a maximum number of each entity type.
I have a few ideas about how to do this, but I'm not sure if they will work, and if they do they seem hacky at best. So, let me hear some ideas...how would you go about keeping track of which entity is oldest?
I have a few ideas about how to do this, but I'm not sure if they will work, and if they do they seem hacky at best. So, let me hear some ideas...how would you go about keeping track of which entity is oldest?