I know what arrays are, I'm just not used to using them to store objects.
For example, my space shooter game has asteroids floating around. If I understand correctly, these can be 'destroyed' once they get outside of a certain range but their movement can be tracked in the array so that if the camera ever gets close, they can be created and given the associated speed/direction.
Maybe that's a bit complicated, but that's what I was thinking of. Sure, one can leave them unrendered since they are off the screen, but if they are moving, they are still consuming memory. Updating in an array takes up a smaller amount of memory, and so for performance reasons I can see this being done.
procrastinator's example seems to apply to tiled/grid based games, whereas a game like my shooter isn't bound to a grid.Excal2013-04-24 04:03:31