change maxSize of quad tree's leaf nodes (from a max length of 3 to a max length of 9)

This commit is contained in:
2025-01-31 06:01:02 +00:00
parent e23e2f0997
commit 76c5f9d662
2 changed files with 11 additions and 2 deletions

View File

@@ -262,6 +262,15 @@ struct
, nextPlatID = ~1
}
val enemies = Vector.fromList [enemy1, enemy2, enemy3, enemy4, enemy5]
val startTime = Time.now ()
val startTime = Time.toMicroseconds startTime
val graph = Graph.fromPlatforms (platforms, platformTree)
val finishTime = Time.now ()
val finishTime = Time.toMicroseconds finishTime
val diff = finishTime - startTime
val _ = print ("TIME DIFF = " ^ LargeInt.toString diff ^ "\n")
in
{ player = player
, walls = walls
@@ -269,7 +278,7 @@ struct
, platforms = platforms
, platformTree = platformTree
, enemies = enemies
, graph = Graph.fromPlatforms (platforms, platformTree)
, graph = graph
}
end
end

View File

@@ -35,7 +35,7 @@ struct
type t = QuadTreeType.t
(* max size of vector before we split it further *)
val maxSize = 3
val maxSize = 9
fun mkTopLeft (x, y, w, h, items) =
let