Implemented Quad-Tree (#6) #11

Merged
david merged 5 commits from quad-tree-(#6) into main 2025-11-26 20:12:25 +00:00
Owner
No description provided.
Introduced a QuadTree implementation for spatial partitioning in Spelusion.Engine.Core. Integrated QuadTree usage and debug drawing into ComponentGameManager for testing. Exposed CameraMatrix in Scene for easier camera transformations. Removed redundant ProceduralContent.SetSeed call from GameSceneCreator.
Introduced a new Query method in QuadTree to retrieve items intersecting a given Rectangle area. Updated ComponentGameManager to use the new area-based query and order results by item bounds.
Replaces the previous List-based entity storage in Scene with a QuadTree for spatial partitioning and efficient querying. Updates ISceneCreator and related classes to support QuadTree configuration and entity insertion. Adds dynamic entity support, bounding box management, and optimizes update/draw loops to query only relevant entities. Includes benchmarking and debug improvements for QuadTree, and adapts test and factory code to the new structure.
Refactored camera to respond to window resizing by updating the viewport in the Camera component. Made GraphicsDeviceManager public in ComponentGame for easier access. Adjusted scene and entity creation: player now spawns at (0,0), camera entity is created with window reference, and tree entities are distributed within a circular area. Increased the number of tree entities for more robust testing. Set default window size, disabled fullscreen, and enabled window resizing in ComponentGameManager.
Refactor Camera initialization and usage
All checks were successful
Build and Publish NuGet / nuget-build-core (pull_request) Successful in 1m36s
a990390052
Refactored the Camera component to receive a Game reference instead of a GameWindow and to manage its own viewport internally. Updated EntityFactory and ComponentGameManager to match the new Camera API, and moved graphics setup logic into a dedicated method. This improves encapsulation and simplifies camera initialization and resizing.
david self-assigned this 2025-11-26 20:11:09 +00:00
david merged commit 5a6541f69d into main 2025-11-26 20:12:25 +00:00
david deleted branch quad-tree-(#6) 2025-11-26 20:12:25 +00:00
david referenced this pull request from a commit 2025-11-26 20:12:27 +00:00
Sign in to join this conversation.
No reviewers
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
david/Spelusion.Engine!11
No description provided.