Giter Site home page Giter Site logo

selimanac / daabbcc Goto Github PK

View Code? Open in Web Editor NEW
49.0 5.0 4.0 2.36 MB

Dynamic AABB Tree native extension with Branch and Bound Algorithm for Defold Engine

Home Page: https://selimanac.github.io/

C++ 88.70% Go 1.20% Lua 4.06% C 6.05%
aabb defold-game-engine defold collision collision-detection native-extension defold-library

daabbcc's People

Contributors

8bitskull avatar selimanac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

daabbcc's Issues

Query functions ordered by distance

Would love to have either separate functions or a function option that returns hits ordered by distance.

Use case for example would be a unit seeking to target an enemy. It gets a list of enemies within its range using daabbcc.query(), and saves the first instance as a target because the table is ordered by distance.

Need more performance testing

This lib definitely need more testing on different device and platforms. Any help would be most welcome... I'll be glad if you can share your results

Add fps limit

Currently it update positions as fast as it can. Limit by using fps.

raycast / raycast_query crash when length of raycast is 0

Noticed this when I was doing a raycast for a moving object. For some reason some of my frames had a dt of 0, meaning I would check the same starting and end position.

Assertion failed: r.LengthSquared() > 0.0f, file upload/daabbcc/include/DynamicTree/b2DynamicTree.h, line 209

Automate position updates (track game object position automatically)

I use go.animate() to move a lot of objects in a performant way. However I need to constantly update the aabb position for these objects, which means go.get_position() followed by aabb.update(). In my test, doing lots of updates was worse than the collision checking queries.

Britzl on Defold forums:
"The dmGameObject namespace has getPosition() but it requires a dmGameObject::HInstance. Not sure if there is a way to pass ids from Lua and turn them into dmGameObject::HInstance. If there is then you could provide the extension with a bunch of ids to keep updated and in the extension update function you could get the positions and update the aabb’s. @JCash will know if this is possible or not."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.