I've seen a lot of sites that recommends to use Quadtree for splitting the array by levels and nodes for a better performance for example in CollisionSystem there's a lot of collisions needs to be handle. I need to ask this question because I'm planning to create my own Quadtree class, if there it didn't exist.
\$\begingroup\$
\$\endgroup\$
1
-
1\$\begingroup\$ So are you asking if you can implement a QuadTree in Java (LibGDX)? Or if LibGDX has a QuadTree? Or if the LibGDX architecture supports (custom) QuadTrees? It is a little unclear right now. \$\endgroup\$user35344– user353442016-09-27 16:35:10 +00:00Commented Sep 27, 2016 at 16:35
Add a comment
|
2 Answers
\$\begingroup\$
\$\endgroup\$
1
GDX doesn't support it directly.
A version for LibGDX https://github.com/alwex/QuadTree
-
\$\begingroup\$ It's not "for" libGDX, it uses
ArrayListinstead ofArrayand so it probably doesn't care about GC \$\endgroup\$Winter– Winter2019-09-16 00:09:21 +00:00Commented Sep 16, 2019 at 0:09
\$\begingroup\$
\$\endgroup\$
A bit late but here is an implementation that is specifically developed for use with libgdx: https://github.com/nahumrosillo/quadtree-libgdx