Hi, I recently learned about quadtrees but I have plenty of questions google wasn´t able to answer so if you could help me I would be grateful.
First though, I should explain what I intend to use them for. I would use them for my infinite/very large (millions x millions)-procedurally generated-rolling world (the world loads and unloads around player to give the impression of massive world) game.
I intend to use quadtree to:
A) Search for the correct parts of world to load/unload (square “chunks” of certain size that load/unload everything in them) based on the location of players
B) Contain data of the chunks - Probably structs representing objects in the world
C) Save them in files (binary) with that data and load them back
Is that possible? Are quadtrees capable of those? If not why, if yes, how and by how I mean I have NO idea how to construct quadtree so please help me with code or something. Thanks a lot.