Let\'s say I\'m creating an OpenGL game in C++ that will have many objects created (enemies, player characters, items, etc.). I\'m wondering the best way to organize these since
Is there a better way? How to commercial games like HL2 handle this? I imagine there must be some module etc that keeps track of all the objects.
Commercial 3D games use a variation on the Scene Graph. An object hierarchy like the one Adam describes is placed in what is usually a tree structure. To render or manipulate objects, you simply walk the tree.
Several books discuss this, and the best I've found are 3D Game Engine Design and Architecture, both by David Eberly.