I'm programming a 2D game with C++ and openGL. I have implemented 2D water physics but it seem to eat lot of fps on slower computers. I have tilemap 200x200 size and water is a tile or many tiles.
My code runs through the whole tilemap with for() loops searching for tiles that are water and drops them or moves them, etc.
I've noticed the for() loops through the 200x200 tilemap is very slow and on my betatesters' older computers fps drops alot.
What would be the efficient method to check tiles for water and not lose too much fps on large tilemaps?
edit. so the question would be: what are the alternative methods for for() loop?
ps. if the video gives you any better perspective on this topic, here's a clip how the water/lava works