1
General / Displaying a game tileset which includes animated components.
« on: January 17, 2019, 07:23:45 pm »
Hi, so I was reading the SFML Vertex Array/Tileset articles and I understand them fairly well. But I had some concerns on how to implement/display a tilemap that can contain possible animated portions of a map. (Stuff like fountains on the walls, spikes on the floor, etc).
Right now I have a sprite animation class which is written like this:
https://github.com/Rietty/Hellcraft/blob/master/Animation.hpp
https://github.com/Rietty/Hellcraft/blob/master/Animation.cpp
And it works perfectly fine for my purposes.
What is the best way to animate different things on the map? Should I just include an empty tile in the tilemap/vertex array and then iterate over it later with an animated sprite? Is there a better way?
Any advice would be appreciated.
Right now I have a sprite animation class which is written like this:
https://github.com/Rietty/Hellcraft/blob/master/Animation.hpp
https://github.com/Rietty/Hellcraft/blob/master/Animation.cpp
And it works perfectly fine for my purposes.
What is the best way to animate different things on the map? Should I just include an empty tile in the tilemap/vertex array and then iterate over it later with an animated sprite? Is there a better way?
Any advice would be appreciated.