Comments (6)
I have some ideas for a collision detection system. I want to write a quadtree data type for the spatial partitioning that will allow for fast collision detection. I'm glad you noticed the rect module. That's the first step towards this.
As far as collision response handlers and stuff, I think that is best left to the person writing the game. Giving the necessary primitives (rect and quadtree) will give users the means to do what they please. I don't want to embed a collision system deep into the game/scene part of the API.
So, as far as what could use work: a quadtree module would be awesome.
from guile-2d.
ok, I can work on a quadtree module.
from guile-2d.
EDIT: Oh right, you moved. Let me try there.
If it helps, I have a quad tree module written in Common Lisp. I can port it over, but I need to setup my guile environment and find some time first. https://github.com/Halfwake/cl-quad
from guile-2d.
Thanks for sharing the code. That makes 2 CL quadtree implementations that I know of. From what I can see, this implementation uses a mutable quadtree. In Sly (the new name for guile-2d), the quadtree must use a purely functional data structure. I've been meaning to look into how to implement a persistent quad tree, but haven't gotten around to it.
from guile-2d.
Are you sure my implementation isn't purely functional? There is no use of assignment operators. Methods return new quad trees instead of changing an existing tree. The slots for all classes are read only. It might even be a persistent tree. When a method creates a new tree, it uses references to the last tree without making copies.
from guile-2d.
In that case I didn't read the code carefully enough! Thanks for explaining. I would love to see it implemented in Guile.
I'd be curious about the performance profile of it as well. I imagine the time complexity for read/write are different than a mutable quad tree.
from guile-2d.
Related Issues (8)
- Error because use of "gl-generate-texture" or "gl-generate-drawable" in 2d/sprite.scm HOT 4
- Segfaut in ftglSetFontFaceSize HOT 1
- Dependencies installation docs are missing HOT 24
- file 2d/gl.scm missing HOT 3
- The example in Readme doesn't work HOT 2
- load-sprite segfaults when it can't find the image HOT 6
- Sprite batch draws parts of other sprites HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guile-2d.