Is this wise?

Started by
1 comment, last by azjerei 19 years, 4 months ago
Would this be a wise layout for a 3D game using OpenGL? The game world is constructed from several objects. When the game starts, the bounding box extents for each of those objects is read from a file. Each frame, there is a distance check between the player position and each object's bounding box. Those objects within distance are then dynamically loaded and rendered, the rest remain unloaded and unrendered. I have no clue as to how effective or uneffective this would be. All I know is that it is a complex procedure. Would I be better off just keeping the entire level in memory instead of dynamically loading the parts I want to draw?
Advertisement
If the level fits in memory, keep it in memory.

Sounds like manually paging bits in/out is premature optimisation. So unless you are likely to have 1 zillion objects, don't.

Even if your level is too large for memory, you can probably break it up into distinct zones of which only a few need to be loaded at a time (say the one the player's in and all adjacent ones).

If the level is small(ish) and doesn't fit in memory, your designers have made it much too detailed :) . If your level is huge and doesn't fit in memory, you can break it up.

Mark
Yes, that would seem like the case. Hmmm. Is there any game out there using an engine that does this?

This topic is closed to new replies.

Advertisement