Godot Version
4.3
Question
for performance, i really want to know how to make tiles of the tilemap get deleted if they exit the screen and if they are in the screen the tiles are visible again.but i dont know how to make/code it.
if you know the answer, pls reply i will really appreciate it
Are you running into lag because your map is to big?
I would say the performace you’d gain from deleting and creating individual tiles would be lost in the constantly updating your tile map.
I would recommend chunking your map. So say you have a 100×100 map you could chunk it into 16 25x25 chunks(think scenes). Then you would load chunks that were so close, and unload chunks so far away.
I would recommend doing some research into chunking, I don’t know the specifics of your game, or how big it is. It may be that it isnt big enough to really need chunking, it just depends.
i’ve already fixed it by myself by adding a metroidvania system but that is helpful for other people so THX
1 Like