Skip to content

Commit 224fcfe

Browse files
committed
docs: update future features page
1 parent 0ddba41 commit 224fcfe

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

docs/future_features.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,42 @@ If you really want any of these features, please let us know by opening an issue
55

66
If you have any suggestions or would like to contribute, please feel free to open an issue or a pull request.
77

8-
## Planned Features
8+
The features will likely be implemented in the order they are listed below, but this is not guaranteed.
99

10-
### 1. [COMPLETE] Quadtree serialization
10+
## 🚧 Planned Features
1111

12-
By serializing the quadtree, we can save its state to a file and load it later. This will allow us to persist the quadtree structure and data across sessions. For example, you could pre build a quadtree with all the walls in your video game level, serialize it to a file, and then load it when the game starts. This will heavily reduce the game load time since you won't have to rebuild the quadtree from scratch every time.
12+
### 1. Configurable Quadtree Coordinate Type
1313

14-
### 2. Circle support
14+
Currently, the point quadtree only uses f32 for point coordinates, limiting precision in favor of better performance.
15+
To make the quadtree more flexible, we could allow users to specify the coordinate type (e.g., f64, i32, etc.) when creating a quadtree.
16+
The f32 will remain the default, but users will be able to specify a different type if needed.
1517

16-
Currently, we support points and rectangles in two separate quadtrees.
17-
For example, in the ball-pit demo, we use a point quadtree, but then query a larger area to account for the radius of the balls.
18-
With a circle quadtree, we could directly insert circles and perform circle-circle collision detection.
18+
If the type cannot be made truly generic, then only the following types would be supported: f32, f64, i32, i64
1919

20-
### 3. KNN with criteria function
20+
### 2. KNN with criteria function
2121

2222
Currently, KNN only supports finding the nearest neighbors based on euclidean distance.
2323
By adding a criteria function, we could allow users to define custom criteria for finding neighbors by passing a function that
2424
takes in a point and returns a score. The KNN algorithm would then use this score to determine the nearest neighbors.
2525

26-
### 4. KNN in rectangle quadtree
26+
### 3. KNN in rectangle quadtree
2727

2828
Currently, KNN is only supported in the point quadtree. By adding KNN support to the rectangle quadtree, we could allow users to find the nearest rectangles to a given point. This would be to the nearest edge of the rectangle, adding complexity to the algorithm.
2929
However, it will allow for really quick collision detection between a point and a set of rectangles as the point can just do
30-
robust-collision handling with the nearest rectangles.
30+
robust-collision handling with the nearest rectangles.
31+
32+
### 4. Circle support
33+
34+
Currently, we support points and rectangles in two separate quadtrees.
35+
For example, in the ball-pit demo, we use a point quadtree, but then query a larger area to account for the radius of the balls.
36+
With a circle quadtree, we could directly insert circles and perform circle-circle collision detection.
37+
38+
A good alternative is to use the rectangle quadtree and insert the minimum bounding rectangles of the circles.
39+
40+
## ✅ Completed Planned Features
41+
42+
Once a feature from above is completed, it will be moved to this section.
43+
44+
### Quadtree serialization
45+
46+
By serializing the quadtree, we can save its state to a file and load it later. This will allow us to persist the quadtree structure and data across sessions. For example, you could pre build a quadtree with all the walls in your video game level, serialize it to a file, and then load it when the game starts. This will heavily reduce the game load time since you won't have to rebuild the quadtree from scratch every time.

0 commit comments

Comments
 (0)