SFML community forums

Bindings - other languages => DotNet => Topic started by: StormWingDelta on April 27, 2014, 06:44:39 pm

Title: Infinite Size Map Collision Detection
Post by: StormWingDelta on April 27, 2014, 06:44:39 pm
Just wondering how to do this fast enough to where I won't kill over and die before the frame ends when detecting collisions.


The map I'm working with is so dang big that the usual collision detection of two loops won't work fast enough.  Is there anything that works for a map regardless of size and can handle a map with no size limits other than the Max/Min Values of the datatype being used?  With my current system I start lagging at a few dozen sprites so anything that could both handle a worst case of a sprite being at each end of the map and several thousand sprites in small clusters would help.  Also would have to be dynamic since I know most sprites that aren't controlled by the players aren't going to be any further out than the furthest player is.
Title: Re: Infinite Size Map Collision Detection
Post by: Ixrec on April 27, 2014, 06:49:49 pm
The common approach I always hear about is a quadtree.
Title: Re: Infinite Size Map Collision Detection
Post by: StormWingDelta on April 27, 2014, 08:19:19 pm
The common approach I always hear about is a quadtree.

Good if the size is limited but how to pull it off in my case? ???
Title: Re: Infinite Size Map Collision Detection
Post by: Nexus on April 27, 2014, 08:30:56 pm
See here (http://en.sfml-dev.org/forums/index.php?topic=14959.msg105454#msg105454).

No map is infinitely large. You can still adapt the data structure dynamically as soon as the map grows.

By the way, this has nothing to do with the .NET binding, you should rather use the Help/General forum for such questions.
Title: Re: Infinite Size Map Collision Detection
Post by: StormWingDelta on April 27, 2014, 09:55:27 pm
oops. >.>


Oh well meantime.  Might as well see what I can do. :)