This was a rather successful end to my first attempt at using a quadtree to increase the performance of my collision detection. I'll certainly be using this technique in the future. There are probably some optimizations that can be made, but it was a good exercise in data structures and I used this project to learn Love2D and Lua too.
[youtube]https://www.youtube.com/watch?v=zoCdFle ... e=youtu.be[/youtube]
QuadTree Collision
-
- Prole
- Posts: 49
- Joined: Thu May 29, 2014 10:56 am
Re: QuadTree Collision
Would you mind sharing a love file? I would love to see your implementation.
--
My OOP implementation:
https://github.com/stefanstr/class-by-gestaltist.git
My dungeon / tiled map generator:
https://github.com/stefanstr/lua_maps_by_gestaltist
My Love2D experiments:
https://github.com/stefanstr/Small-Love2D-Projects
My OOP implementation:
https://github.com/stefanstr/class-by-gestaltist.git
My dungeon / tiled map generator:
https://github.com/stefanstr/lua_maps_by_gestaltist
My Love2D experiments:
https://github.com/stefanstr/Small-Love2D-Projects
-
- Prole
- Posts: 6
- Joined: Tue Jul 29, 2014 10:15 pm
Re: QuadTree Collision
Hey, Gestaltist.gestaltist wrote:Would you mind sharing a love file? I would love to see your implementation.
I'll have a love file to share in a day or two. I just want some time to clean up the code a bit, make sure it's properly commented, et cetera.
-
- Prole
- Posts: 49
- Joined: Thu May 29, 2014 10:56 am
Re: QuadTree Collision
Thanks man! Comments are very appreciated. I have been thinking about playing with quadtrees for a while now but was always to lazy to actually implement them. Having a good implementation to learn from will be very useful to me.i_love2d_you wrote:Hey, Gestaltist.gestaltist wrote:Would you mind sharing a love file? I would love to see your implementation.
I'll have a love file to share in a day or two. I just want some time to clean up the code a bit, make sure it's properly commented, et cetera.
--
My OOP implementation:
https://github.com/stefanstr/class-by-gestaltist.git
My dungeon / tiled map generator:
https://github.com/stefanstr/lua_maps_by_gestaltist
My Love2D experiments:
https://github.com/stefanstr/Small-Love2D-Projects
My OOP implementation:
https://github.com/stefanstr/class-by-gestaltist.git
My dungeon / tiled map generator:
https://github.com/stefanstr/lua_maps_by_gestaltist
My Love2D experiments:
https://github.com/stefanstr/Small-Love2D-Projects
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: QuadTree Collision
I have already came accross some nice quadtree implementations of quadtrees on Github, in Lua.gestaltist wrote:Thanks man! Comments are very appreciated. I have been thinking about playing with quadtrees for a while now but was always to lazy to actually implement them. Having a good implementation to learn from will be very useful to me.
See this one and this project.
I'd like to mention, besides this, there are also some other space partitionning techniques, like spatial hashes. The great vrld has a nice implementation of this, embed in his hardonCollider library. I have also written a library that you can find here.
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests