This is a Dynamic AABB Tree native extension with Branch and Bound Algorithm for Defold Engine.
DAABBCC build by using Box2D’s Dynamic Tree.
Branch and Bound implementation by Randy Gaul
Radix sort by Mathias Westerdahl
Box2D Copyright (c) 2009 Erin Catto http://www.box2d.org
What is DAABBCC?
A Dynamic AABB Tree is a binary search algorithm for fast overlap testing. Dynamic AABB trees are good for general purpose use, and can handle moving objects very well. The data structure provides an efficient way of detecting potential overlap between objects. DAABBCC does not contain narrow-phase collision detection.
You can use it whenever precise collision manifold(narrow-phase) is not required.
Installation
You can use the DAABBCC in your own project by adding this project as a Defold library dependency.
Open your game.project file and in the dependencies field under project add:
https://github.com/selimanac/DAABBCC/archive/refs/tags/v2.1.2.zip
Example
Release Notes
2.1.2
- Internal Update Frequency added. Default value is set from game.project file (display.frequency).
It is now possible to set a new internal(independent from Defold game loop) update frequency by usingaabb.update_frequency()
. - Fixed #9
2.1.1
- Table count added to query results.
- Documentation update
2.1
- It is now possible to sort results by distance. Use
raycast_sort
,query_id_sort
,query_sort
according to your needs #5. - Automated position updates for Defold Gameobjects #6.
- External Array and HashTable libs are removed.
- Group limit removed(Previously, it was limited to 20)
- Remove Gameobject when AABB or Group removed
- Clear function added for removing and reseting everything.
- Stop/Resume for automated Gameobject position update.
- All query results return nil when it is empty. No need to check
#count
anymore.
2.0
This is a complete rewritten version by using Box2D’s Dynamic Tree.
- API revised and simplified
- Nearly 6x performance increment according to v1.x (4800 sprites vs 500 sprites)
- Low cpu usage
- Experimental narrow phase collision detections removed
Final 1.x release.
- Updated cute_c2 version to 1.05
1.0
Initial release.