Hello all. I've gotten some wonderful help here in the past, and my friend and I have a problem that we can't seem to answer ourselves, so we thought we'd turn to you.
We are developing a game with some fairly intricate animations. Some of our characters have as many as 70 different frames across their running, jumping, etc. animations.
We are currently loading one texture for each character and each frame setting that character's sprite to a different subrectangle of the texture (which seems to be the preferred method around here). As suggested here:
http://en.sfml-dev.org/forums/index.php?topic=9855.0Here is our problem:
When we had others try our game on their machines, many of them encountered problems as our textures were too large. Many reported an error that said their maximum texture size was 1024 x 1024. That seems tiny. (EDIT: Many of our sprite frames are around 200 x 200 or even 300 x 300 pixels in size to retain image quality. We could make them smaller and scale them up, but it looks bad) Is this a reasonable maximum texture size? How new of a system would someone need to increase the maximum to, say, 8192 x 8192? Especially considering if we have animation frames that are 100 x 100 (doesn't seem unreasonable), that means we can only have about 10 animation frames per texture if we go 1024 x 1024.
Should we load multiple textures and cycle through them? Should we create multiple sprites and cycle through those? How do we deal with this limited texture size?
Here are the hypothetical approaches we discussed: (Objective is efficient, GPU-independent display of animations)
1. Load a texture for each frame of an animation. Obviously this comes with a greater load time.
2. Load a single texture from one of two files: a large texture for strong machines and a scaled-down, smaller texture for slower machines. Scale the sprite up for the slow machines. (We tried this and it looks awful)
We checked out Thor's Animation library which has bigTexture and bigSprite. We are curious how that works exactly. Does the library need to be in a writable directory? In other words, is it creating new files somehow? If so, that could be problematic. If not, it seems like it might be our answer.