A TileMap with Sprites is pretty simple:
----
class Tile : Sprite {
    // ... more features
}
----
Each Tile is stored on fixed points on the screen and represent the Tile-Image.

Forget to mention: This construct is not as fast as the old implementation which use a VertexBuffer, but it is more dynamic. E.G. if you have a game with destroyable Tiles this approach is much more common and suitable because it is easier and cheaper to nullify an Tile.

See also my last implementation in my unfinished game "Quinn Quadrat":
https://github.com/Dgame/SDL-Game/blob/master/Tile.hpp
https://github.com/Dgame/SDL-Game/blob/master/Tile.cpp
https://github.com/Dgame/SDL-Game/blob/master/TileMap.hpp
https://github.com/Dgame/SDL-Game/blob/master/TileMap.cpp

Reply via email to