|
|
Kim André Bjørkede opened 2 years ago
|
||||
|
|
I'm leaning towards the second. Having the dictionary with the arrays of chunks that The chunk generation function could save the serialized tiledata to the dictionary upon generation. Saving the world would then be as easy as just returning the serialized array to the save function. |
||||
|
|
Kim André Bjørkede changed state to 'Closed' 2 years ago
|
||||
|
|
Implemented pr #8 |
| Type |
Improvement
|
| Priority |
Normal
|
| Assignees |
Issue Votes (0)
Currently the tilemap uses a shit-ton of memory, having a big island can use a few gigabytes of memory!
The proposed solution is to unload chunks that are far away from the player and then reload them when they are close.
The solution for unloaded chunks would be like the way it works in the savedata.
Should the game just use the save data? The problem with this is that the game would have to save the savedata every time a chunk is loaded. This would mess with players who would want to manually save the game.
Another solution would be to have the serialized chunk array in memory. It should use a lot less memory than the tileset does.