Jump to content


Annihilator

Member Since 04 Feb 2011
Offline Last Active Jan 05 2013 08:00 PM
-----

Posts I've Made

In Topic: 2D Map Sprite Visibility Detection

26 December 2012 - 12:24 PM

View PostStainless, on 26 December 2012 - 12:08 PM, said:

Otherwise it's a simple matter of checking which sprites intersect with the view rectangle.

Yes, i have thought about it. but what if the map is huge and we have like 10.000 sprites, starting from small dirt, stones, grass textures
up to trees, buildings, NPCs ? Then looping through array that huge is not a good idea. That is what i have right now. And In the future,
our maps might have a lot more then 10.000 sprites, as the Artist has a full freedom to load the editor and place any objects anywhere.

It is a top down 2d map and i am looking for a way to detect visible sprites for that and not having to go through a loop of all sprites. Any ideas?