2D Scene with many objects...

Started by
1 comment, last by Zoomby 18 years, 5 months ago
Hi, I have a very big virtual landscape with 10000s of objects (very small ones and very big ones) I want to visualize. What is the best data structure for these objects? I must be able to quickly find objects to render the viewport, and I quickly want to find objects of a specific size category to exclude small objects from rendering when zoomed out. The scene is very static, one should only be able to move single objects. bye Chris
Advertisement
If you can afford a book, get Christer Ericson's 'Real-Time Collision Detection'. It discusses many spatial partioning schemes, most if not all of which are applicable in 2d. Some options for you might be a grid, a quadtree, or a loose quadtree. If your objects differ considerably in size, the latter two might be worth investigating. If you need more information you might tell us a little more about the simulation. For example, I'm not clear from the description whether it's actually 2d, or a 3d environment that can be described in 2d-ish terms (such as a terrain or maze).
Thanks! I'll try a quadtree...

This topic is closed to new replies.

Advertisement