Like in topic - does anyone have ideas how to optimize cube world game RAM usage?
Currently I am using this system (<> = reference to children in parent and reference to parent in children, > = only reference to children in parent):
World<>Chunk>Entity (one instance per type)>Model (one instance per mesh and texture)
I am rendering world with view radius 16 (33X33 chunks). Each chunk have 16X256X16 size, but only 16X80X16 is filled.
This system have one big issue - Tile don’t “know” its parent and location.
RAM usage: 520 mb
Previously I was using this system:
World<>Chunk<>Tile (store x, y, z, chunk and entity references)>Entity (one instance per type)>Model (one instance per mesh and texture)
RAM usage (map with the same size): 1,5 gb