So yea, the title pretty much explains everything, I have a number of tiles in screen, this number changes, so I was thinking about the best way to check collisions only with the needed tiles, and I thought about having a vector of tiles that had only the tiles being render at that moment so the character had to only check with them, and not with all the tiles of the map. But one question I had is, how would I go about deleting the tiles that aren't on screen anymore?
Maybe for the tiles that aren't being rendered search them in the collision vector and if they are there, delete it?
Just clearing the whole vector each frame and only filling it with the tiles on screen?
Anything else?
Thank you very much in advance.