Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
Displaying a game tileset which includes animated components.
Print
Pages: [
1
]
Author
Topic: Displaying a game tileset which includes animated components. (Read 1938 times)
0 Members and 1 Guest are viewing this topic.
Rietty
Newbie
Posts: 5
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.
Logged
DeathRay2K
Newbie
Posts: 24
Re: Displaying a game tileset which includes animated components.
«
Reply #1 on:
January 17, 2019, 09:50:30 pm »
The usual way is to do essentially as you said - static tiles in one layer, with animated objects rendered in a second pass.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
Displaying a game tileset which includes animated components.