   A way to hold all objects?
  I need a way to hold all the things currently blitted so that I can easily update the scene but I'm not sure how to hold everything though. The main things it'd be used for is updating the position of things, collision what's actually on screen and depth.I was thinking of using a class with all the other classes as it's variables but then how would I keep track of the amount of each class and how would I know how many to thingy-ma-bobs to declare (When making the array)? A int keeping count?:3 ConfusingOn a different note, sorry for the amount of questions I'm asking :3   
  You might try looking into vectors.   ;  1. The solution.This is where you use either C-style arrays or C++ style containers OR roll your own linked lists - which isn't recommended, and then combine that with a common interface that your game object inherit from. The interface will probably used in ways such as the following:IRenderable* rend_obj = s_Renderables[index];vector3 pos = rend_obj->GetPosition();// ... etc ...C-style arrays are often of a fixed size. They are possibly the fastest of the methods here if used correctly, but that really isn't important at this stage. Often you would use them as follows:#define MAX_RENDERABLES 128static IRenderable* s_Renderables[MAX_RENDERABLES];void init_renderables(){    memset( &s_Renderables, sizeof(s_Renderables), 0 );}C++ style containers are commonly referred to as the STL. The STL is completely useless for professional game development, but at this stage that also really isn't important. STL containers work using template magic and are generic containers for storing your objects in an optimal way. For this particular task let me recommend using vector - which is in reality a linked list. You would use it something like this:typedef std::vector<IRenderable*> RenderableList;static RenderableList s_Renderables;static const int MAX_RENDERABLES = 128;void init_renderables(){    s_Renderables.reserve( MAX_RENDERABLES );}The last option I wont go into detail. At some point everyone has to roll their own linked list solution and see why their invention has the performance characteristics of a dog with a hackney leg and more holes in the code than a sieve, so have a good bash, and when you're done you can come back to the STL and breathe a big sigh of relief ;-)2. Why it's a bad ideaThe solution is sound in theory, but in practise it quickly becomes a bad idea when you start to over generalise and write an interface that might as well just be a C-style pure pointer (void*). You wont entirely understand what I mean and I can't sit and write an essay on the topic but you'll find later on that keeping generic lists is bad because often you need to use the list of objects to do something specific, and that means getting a specific interface, which means lots of nasty casts, and that eventually leads to bugs which are a pain to resolve. It can get pretty hairy :-) It's better to keep specific lists for specific things, so make your renderables list, but keep it specific and if you need more lists then just make more lists.Hope that helps :-)   ;  What language/library are you using?   ;  I'm using SDL, I have made classes for all the different types of things I have, Houses, trees, etc. Just I needed a way to keep track of them all by having a "master" that would tell them all what to do (Eg When you move the person it'll tell all the things to update aswell instead of updating everyone individually.)TheGilb and BoohillieThanks, I'll mess around with vectors, thanks for the suggestion.;C++ FAQ Lite to the rescue! When you're done with that question, read the rest on the page for good measure, and then while you're at it, any others that strike your fancy. That site is a gold mine.That question actually may be a step or two ahead of where you're currently at, but I bet you can figure out what to do from it.   