Any minecraft players here should understand what i mean but if not here it
comes...
I've just come up with a good concept for object collision detection that should work really well providing that there is not too many objects waiting for the event. Somebody suggests using like a chunk system to keep, lets say 16 lots of 64x64 areas in space, pending for collision events and the rest of the objects in the whole game can remain dormant.
However i don't exactly know how todo this. I've figured that the best way for performance should be that each chunk has a list of objects that are spawned there the first time loaded and lets say if one of these objects is some kind of loot we don't want the user abusing the re-rendering so i each instance of an object could have a simple boolean which tells the spawn chunk whether is should be loaded again or not (Some things may need loading again)
But how do i set up the game to load only so much area at once?
(Little hints/advice is just as welcome (if not, more welcome) as answers)
Pretty much all games handle collisions in chunks. Minecraft just happens to use sections, chunks, and regions for its file format as well. Unless you want your game to be very, very similar to Minecraft, you should only use the chunk concept for collisions. Basically on loading a level and when moving objects, you add objects to very small chunk segments and when objects need to check collisions they only check the objects cached in the same or neighboring chunks.