
DynamicTileBatch is a system for efficient rendering of tens of thousands textured tiles. Each registered texture holds its own vertex buffer that it uses for rendering. The cost of switching a texture is mitigated by rendering all tiles that use the same texture at once. Only when all tiles are rendered with the first texture, the texture is switched and the system continues with the second batch, and so on.
The system doesn't utilize any custom classes for adding tiles, so there is no problem with excessive class creation and subsequent garbage collections that would hider the game's performance.