Object List Size

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Hey Roster,

      I'm not sure exactly what you're asking, but I think you're asking what the maximum number of objects that can exist in the game world is? For a small scoped game, I don't think that's something you really need to worry about. If you start running into performance issues, then better/more efficient culling, and partitioning the objects would likely be a better solution than just capping the number of objects.

      For example, you could group all of your objects together by which room they are in. Now when you're rendering, you do a bounding check on each individual room, and if a room isn't visible, you can quickly skip all of the objects contained within it.

      James
    • It completely depends on the game. Typically you have multiple lists, each with a different purpose and organized differently. For example, in Rat Race all actors were stored in an object manager that was a hash table so the logic code could quickly look up an object. The rendering component of the actors were stored in an BSP tree for fast partitioning and rendering. This all made sense for our world, which was relatively small.

      In a large world, you often need even more partitioning. For example, The Sims Medieval had a bunch of ObjectManager classes, each with its own object list. Each ObjectManager was tied to a Lot on the gameplay side (a lot is a single area, like the blacksmith's hut or the wizard's tower). When a Sim or other object moved from one lot to another, they would be switched to a new ObjectManager. This is especially important for a game like The Sims where Sims are often looping through every object on the lot. We needed a way to reasonably partition the objects they care about.

      Open world games like Skyrim have it even harder. They have to maintain a bubble of instantiation (a term I just made up) around the player at all times. In other words, as I walk from Whiterun to Winterhold, the monthers, bushes, objects, NPC's, and everything behind me starts getting flushed from memory while the things ahead of me are seamlessly streamed in. Extremely efficient object lists become incredibly important there.

      Hope that helps!

      -Rez
    • Thanks, any info is always appreciated. I will be trying to implement something like Skyrim then. Players could be outside in the world env, or inside a building or something, so rendering will fluctuate a lot. I'll have to do a lot of experimenting with the data structures.