Open alexanderfast opened 10 years ago
Any update on this issue? I just found your project recently and I am interested.
Hi,
Thank you for your interest in the library. Sadly, I don't currently have the time to implement this. I'm hoping to find some more free time in August. In the meantime, you could try out the basic grid. Same functionality, just smaller scale. It might turn out that this is not at all the thing you were looking for, rendering your request moot. :)
There is a maximum size for a TileMap (depending on MeshMode, max texture size for SingleQuad and max vertex count if QuadGrid). To get around this limitation a ChunkManager class should be added.
It's main responsibility is to automatically and under-the-hood split up the TileMap into several chunks, thus circumventing the above limitations.
It should support three ChunkModes which will most likely be three implementations/classes. Those are (names obviously subject to change):
Single Chunk
For use when the above limitations doesn't become a problem, easier to understand and work with for newcomers experimenting with the code.
Fixed Size
For use when the above limitations do become a problem and the TileMap needs to be split. The number and size of chunks are known upfront making it somewhat easy to work with.
Flexible Grid
For use when the TileMap becomes so large that it's impossible to keep it all instantiated at once. There needs be methods of loading and unloading chunks. This also supports the use-case of "infinite worlds". Like MineCraft, the first time a chunk is visited it's generated, when the player walks away it's unloaded, when the player returns it's reloaded (not re-generated).