How to cull liquids
- by Cyral
I use culling on my Tiles in my 2D Tile Based Platformer, so only ones needed are drawn on screen. Thats easy to do.
However, My Liquid tiles (Water, lava, etc) require an Update Method aswell as the normal Draw, which does checks against tiles, makes it flow, etc.
So how should I cull liquid updates in my game? Not culling is to slow, culling only on screen looks awkward when you move.
What do you think would be best for the player? Maybe someway of culling the visible tiles PLUS also adding the width/height of the viewport to start culling tiles at a fast enough rate in front of the player so it dosent look awkward when moving? (Not sure how to do this though, something with MaxSpeed of player and width of screen)