Skip to main content
11 events
when toggle format what by license comment
Oct 10, 2016 at 23:01 comment added ashes999 @RudiJansenvanVuuren that depends on your architecture. I had an explicit QuadTree class that had references to regions and sprites, and per update call, checked all objects per-quadrant for intersections.
Oct 10, 2016 at 21:38 comment added Rudi Jansen van Vuuren @Ashes999. If I may ask, what checked which object was in which region and when? For e.g. did every object update the list representing region 1 if it's currently in region 1 and while it's moving.
Oct 10, 2016 at 21:35 vote accept Rudi Jansen van Vuuren
Nov 4, 2016 at 15:14
Oct 9, 2016 at 0:52 comment added ashes999 @NealDavis I built something similar in Monogame with Lists of stuff, pretty much as described here. Works pretty well.
Oct 8, 2016 at 16:46 comment added Neal Davis @ashes999 can you give some input on the way to do that? I'd think pushing and popping an array.
Oct 8, 2016 at 16:44 comment added ashes999 This is essentially a quad tree. Tracking which object is in which quadrant is important, and usually not expensive.
Oct 8, 2016 at 16:43 history edited Neal Davis CC BY-SA 3.0
deleted 1002 characters in body
Oct 8, 2016 at 15:46 history edited Neal Davis CC BY-SA 3.0
added 187 characters in body
Oct 8, 2016 at 15:41 history edited Neal Davis CC BY-SA 3.0
added 815 characters in body; edited body
Oct 8, 2016 at 13:36 comment added Rudi Jansen van Vuuren Thanks for your answer. By creating small regions, I don't have to check collision between allot of objects. Since most objects constantly move, they need be sorted into a list representing their region. If I use a list, I constantly need to remove the object that changed region the the list representing it's new region. Or I could increase the region size to reduce the interval of changing regions. What do you recommend I use to represent region? It doesn't help I loop through all 3000 objects to see in what region they are and creating a new list for each region is not very efficient?
Oct 8, 2016 at 8:31 history answered Neal Davis CC BY-SA 3.0