Sign in to follow this  
Zoomby

2D Scene with many objects...

Recommended Posts

Zoomby    122
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

Share this post


Link to post
Share on other sites
jyk    2094
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).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this