SFML community forums
Help => Graphics => Topic started by: Somnia on March 23, 2010, 10:44:39 am
-
Hi,
I'm just designing my systems for things like tilesets and animated sprites. I'm wondering if there any guidelines for how best to set up your sf::Images. Is there likely to be any disadvantage in having every frame of animation in a separate image/texture? Alternatively I could use subrects and have say one animation cycle per texture, This would probably end up being around 512 x 512, but wih a bit of empty space. Is that a good size?
It's possible this kind of thing is completely hardware dependent, or that I'll never tell the difference for a modest number of sprites.
-
Is there likely to be any disadvantage in having every frame of animation in a separate image/texture?
Yes, this will end up activating a new OpenGL texture every time the animation is updated, which is really bad. Using less images is always better.
This would probably end up being around 512 x 512, but wih a bit of empty space. Is that a good size?
Yes, it should be supported even by the oldest graphics cards :)