• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Best 2D sorted data structure for changing data?

Status
Not open for further replies.
Level 31
Joined
Jul 10, 2007
Messages
6,306
So, I need to be able to easily find all position in range of a given position. For this, using something like a Kd-Tree or a Quad Tree seems smart. For example, the KDB-Tree seems like a good bet.


However, I'm curious as to which of all of the possible 2D trees has the lowest add/remove cost while staying balancing.


My idea is to have a tree of all of the units in the map and update it on a timer =P. So is there a good way to resort the nodes based on the new data? The maximum change I'm anticipating is +-64 (.34 interval timer).
 
Status
Not open for further replies.
Top