Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Infinite Size Map Collision Detection  (Read 2372 times)

0 Members and 1 Guest are viewing this topic.

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Infinite Size Map Collision Detection
« 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.
I have many ideas but need the help of others to find way to make use of them.

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: Infinite Size Map Collision Detection
« Reply #1 on: April 27, 2014, 06:49:49 pm »
The common approach I always hear about is a quadtree.

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: Infinite Size Map Collision Detection
« Reply #2 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? ???
I have many ideas but need the help of others to find way to make use of them.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Infinite Size Map Collision Detection
« Reply #3 on: April 27, 2014, 08:30:56 pm »
See here.

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.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: Infinite Size Map Collision Detection
« Reply #4 on: April 27, 2014, 09:55:27 pm »
oops. >.>


Oh well meantime.  Might as well see what I can do. :)
I have many ideas but need the help of others to find way to make use of them.

 

anything