Hi,
I want to make a tilemap, but with million of tiles. I know about split the map, and drawing only the part i see. The problem is not the fps, is the memory(RAM).
So doing something like sf::Sprite[10000000], is not a good choice.
So, i have classes TILE, MAP, WORLD. World contain maps, maps contain tiles.
The problem is that loading 10000000 tile Object,even without declaring each Sprite... just a few methods , vars.......etc, memory goes to hell.
Before i know this, i notice that with a lot of sprites memory die, so, i split the map in smaller maps, and i load only the Sprites that i need. But that dosent work. Because memory die without loading any Sprite, "only" the tiles object(10000000 objects). When i say die, i say 1GB of memory running.
I dont know how to implement this. If i create and delete tile objects, every time i create the object i have to load every single var again, like sprite, pos of the sprite, layers, anim, all.
Hope you understand my question.
Thanks