1
SFML projects / Re: Roguelike
« on: April 04, 2018, 10:36:59 pm »
Update:
Well, it's been a while, but I've been quite busy. After investigating animated tiles, I eventually went down the path of making a tilemap shader. Unfortunately, great tilemap/tileset editors like Tiled did not support storing the tilemap data as an image, where each pixel contains information about uv, animation frames and length in the rgba channels. Rather than try to mess around with export scripts I made my own. This led to me abandoning the quad system I had in place before; so, once again, tons of rewrites. I also started working on the tileset for the game, to give it a unique look and feel.
Here's an image of the very simple tilemap editor I wrote to allow me to make the fixed maps (as opposed to procedurally generated) and that stores the information in the specific format I am using (as 1 pixel per tile for graphics). I would love to hear some opinions on the tileset's tiles.
Before proceeding I want to plan a little better, since I've been doing so many rewrites this far, and I have barely the skeleton of a game. I am ready to (once again) put moving character in the game. However, I foresee the need to have some graphical effects which would be difficult to support with my simple tilemap shader, so I want them to be sf::sprites, or at least quads so I can animate and move them in a more complex fashion (for attacks/walking/taking damage /special effects etc.).
With a tilemap size of about 32x32 tiles to maybe 64x64 tiles (but no more) I am looking at a maximum of 1024-4096 animated characters. It sounds a lot, and it is, but it would be fun to a have level swarming with that many monsters to hack through. Now if they were each a sprite, I would have to make upwards of 4096 draw calls, which sounds a lot. If I did it with vertexarrays, would it be better? Does anyone have experience with animating many 2d characters and moving them around (maybe even smoothly) each frame? Did you solve it with vertex arrays and the cpu animating them (by changing uv coords) while updating their AI?
Well, it's been a while, but I've been quite busy. After investigating animated tiles, I eventually went down the path of making a tilemap shader. Unfortunately, great tilemap/tileset editors like Tiled did not support storing the tilemap data as an image, where each pixel contains information about uv, animation frames and length in the rgba channels. Rather than try to mess around with export scripts I made my own. This led to me abandoning the quad system I had in place before; so, once again, tons of rewrites. I also started working on the tileset for the game, to give it a unique look and feel.
Here's an image of the very simple tilemap editor I wrote to allow me to make the fixed maps (as opposed to procedurally generated) and that stores the information in the specific format I am using (as 1 pixel per tile for graphics). I would love to hear some opinions on the tileset's tiles.
Before proceeding I want to plan a little better, since I've been doing so many rewrites this far, and I have barely the skeleton of a game. I am ready to (once again) put moving character in the game. However, I foresee the need to have some graphical effects which would be difficult to support with my simple tilemap shader, so I want them to be sf::sprites, or at least quads so I can animate and move them in a more complex fashion (for attacks/walking/taking damage /special effects etc.).
With a tilemap size of about 32x32 tiles to maybe 64x64 tiles (but no more) I am looking at a maximum of 1024-4096 animated characters. It sounds a lot, and it is, but it would be fun to a have level swarming with that many monsters to hack through. Now if they were each a sprite, I would have to make upwards of 4096 draw calls, which sounds a lot. If I did it with vertexarrays, would it be better? Does anyone have experience with animating many 2d characters and moving them around (maybe even smoothly) each frame? Did you solve it with vertex arrays and the cpu animating them (by changing uv coords) while updating their AI?