Commit Graph

12 Commits

Author SHA1 Message Date
4c8b404c09 add code so that bat also moves vertically (in addition to previous horizontal movement) when updating enemy state 2025-02-12 00:25:55 +00:00
9e9675aaab decrease memory consumption of quad tree by refraining from storing bounding box metadata (except for the global root which stores the width and height) 2025-02-01 01:03:57 +00:00
547b5bac97 use an immutable vector (always of length 4) for representing quad tree's internal nodes 2025-01-31 06:24:51 +00:00
fac7a81767 trace path we can (move right + jump) using quad tree, as it is easier to implement than a pure math based approach 2025-01-29 19:12:24 +00:00
a6b04ff98e implement functor to fold over quad tree 2025-01-29 07:34:48 +00:00
7138a05cd3 move quad tree helper functions which are useful in quad-tree.sml and will be useful in quad-tree-fold.sml, to quad-tree-type.sml, so quad-tree.sml only exports public API suitable for users 2025-01-29 07:07:54 +00:00
6369be21fa tentatively refactor quad tree to make it more succinct + eliminate a class of potential bugs (passing wrong quad values through recursion) 2025-01-27 23:27:52 +00:00
42b42220d0 fully restructure quad tree from one that holds overlapping items in parent nodes, into one that holds overlapping items in each quadrant instead 2025-01-27 06:04:52 +00:00
f948d060ea progress with fixing path finding 2025-01-21 00:19:38 +00:00
9c46e09ce4 amend 'foldRegion' function in MakeQuadFolder functor, by ensuring we don't visit only one child if item has coordinates in more than one child 2025-01-20 10:46:09 +00:00
3939b0b3e2 done implementing functor to search through quad tree, adding to priority queue (for Dijkstra's algorithm) 2025-01-19 23:56:52 +00:00
84ea0ce24b code functor to fold through a specified region of the quad tree, without having to allocate an intermediary list or using a closure (which both have runtime costs) 2025-01-18 22:54:34 +00:00