Texture/VRAM Size Thoughts
by Jacob Vann · in Torque Game Builder · 10/14/2009 (8:53 pm) · 4 replies
TL;DR version: 128 (or even 64) frames for a 256 x 256 character seems like a huge texture. Advice? Is this an unreasonable size?
I have found some older threads on this topic, but I want to ask the community what kinds of texture/sprite sizes are they using for a typical 2d game.
I am working on a 2d game (using the Platformer Starter Kit), and I'm targeting a resolution of 1280 x 960.
The main character is not unreasonably large, about 1/5 to 1/4 of the screen height. With just a few animations, this quickly becomes huge. I originally planned for: frame size 256x256, 128 frames of animation. He has a pretty large move set (jump, walk, sprint, crouch, attack, throw, magic, etc.), but this would be a monstrous 2048 x 4096 texture, about 32 MB (before you add in mipmapping).
I managed to cull about half the animation requirements (and even removed 2 custom animations) and got it down to 64 frames (a 2048 x 2048 texture), but this is a squeeze and is still a 16 MB black hole in VRAM.
Is 64 frames way too unreasonable for a sprite that large? I really can't make the sprite much smaller without radically changing the feel of the game.
Is 1280 x 960 too high of an expectation? Should I try and target something like 960 x 720? That'll take my 2048 x 2048 texture and make it a "mere" 1536 x 1536. It seems like I need to target the highest resolution possible to try and "future proof" my game.
Anyone have advice? Anyone making a pretty big platformer game want to share their numbers?
BTW, I'm not nailed down on what minimum requirements I'm targeting, but I'd like for any $500 Dell or current-get MacBook to run it, or any reasonable PC that is less than a couple of years old.
I have found some older threads on this topic, but I want to ask the community what kinds of texture/sprite sizes are they using for a typical 2d game.
I am working on a 2d game (using the Platformer Starter Kit), and I'm targeting a resolution of 1280 x 960.
The main character is not unreasonably large, about 1/5 to 1/4 of the screen height. With just a few animations, this quickly becomes huge. I originally planned for: frame size 256x256, 128 frames of animation. He has a pretty large move set (jump, walk, sprint, crouch, attack, throw, magic, etc.), but this would be a monstrous 2048 x 4096 texture, about 32 MB (before you add in mipmapping).
I managed to cull about half the animation requirements (and even removed 2 custom animations) and got it down to 64 frames (a 2048 x 2048 texture), but this is a squeeze and is still a 16 MB black hole in VRAM.
Is 64 frames way too unreasonable for a sprite that large? I really can't make the sprite much smaller without radically changing the feel of the game.
Is 1280 x 960 too high of an expectation? Should I try and target something like 960 x 720? That'll take my 2048 x 2048 texture and make it a "mere" 1536 x 1536. It seems like I need to target the highest resolution possible to try and "future proof" my game.
Anyone have advice? Anyone making a pretty big platformer game want to share their numbers?
BTW, I'm not nailed down on what minimum requirements I'm targeting, but I'd like for any $500 Dell or current-get MacBook to run it, or any reasonable PC that is less than a couple of years old.
#2
I have a 24" (1920x1200) monitor on my development machine, and really don't have a good test/QA machine that is more "realistic", so on my machine anything less than 256 looks way too small. If I did do 128x128, the highest resolution I could do without TGB having to up-scale the character is 800 x 600, which is too small.
And yes, the character *is* about a fifth or a quarter of the screen's height. Think Super Metroid proportions. So in a 960 x 720 game, the sprite would be about 180px tall.
The 128 frames of animations are all the different moves for the character, which include idle, run, crouch, jump, fall, sword (with run, crouch, jump and fall animations), carry (with run, crouch, jump...), throw, ... you get the idea. I could/might break them up by animation, but they'll all get loaded into VRAM at once anyway.
I can (and have) planned the animations more conservatively, and I got it down to 64.
Right now I'm going to try a 160x160 frames, and I can fit 72 in two 1024 x 1024 imagemaps (actually it would be 960 x 960, but TGB will pad them), which is 1/4 of my original size.
I'm still curious what's a fair size for 2-d platform games on nowadays.
10/15/2009 (11:04 am)
I'm definitely sticking with powers of 2, or as close as possible without going over (like the Price is Right).I have a 24" (1920x1200) monitor on my development machine, and really don't have a good test/QA machine that is more "realistic", so on my machine anything less than 256 looks way too small. If I did do 128x128, the highest resolution I could do without TGB having to up-scale the character is 800 x 600, which is too small.
And yes, the character *is* about a fifth or a quarter of the screen's height. Think Super Metroid proportions. So in a 960 x 720 game, the sprite would be about 180px tall.
The 128 frames of animations are all the different moves for the character, which include idle, run, crouch, jump, fall, sword (with run, crouch, jump and fall animations), carry (with run, crouch, jump...), throw, ... you get the idea. I could/might break them up by animation, but they'll all get loaded into VRAM at once anyway.
I can (and have) planned the animations more conservatively, and I got it down to 64.
Right now I'm going to try a 160x160 frames, and I can fit 72 in two 1024 x 1024 imagemaps (actually it would be 960 x 960, but TGB will pad them), which is 1/4 of my original size.
I'm still curious what's a fair size for 2-d platform games on nowadays.
#3
The limit is how large a single texture can be on some cheaper hardware (TGB compensates by breaking it up, I think, and that can lead to MORE memory usage than just breaking it up in advance). Several sheets should be just fine, since I expect everything to have 256MB of main memory accessible as VRAM at the very least.
My MacBook has a not so weak integrated GeForce 9400m, but it only uses 256MB of the main memory. I'm guessing that there is a bunch of swapping back and forth between main memory and video memory. At least The TGB games I've seen aren't suffering.
This has been a general worry from people lately, and the usual solution is to recommend the latest drivers (maybe supply a link for convenience) and try to find a tester with integrated Intel graphics.
I say you should try 128 frames, split across as many 1024x1024 sheets as possible, then find a victim either here or on IRC. Just mock up a 1-level demo game with full logging to get a feel for it and receive some bug reports.
10/15/2009 (1:24 pm)
OK, a total of 128 frames of animation for ALL the movement is actually pretty good :)The limit is how large a single texture can be on some cheaper hardware (TGB compensates by breaking it up, I think, and that can lead to MORE memory usage than just breaking it up in advance). Several sheets should be just fine, since I expect everything to have 256MB of main memory accessible as VRAM at the very least.
My MacBook has a not so weak integrated GeForce 9400m, but it only uses 256MB of the main memory. I'm guessing that there is a bunch of swapping back and forth between main memory and video memory. At least The TGB games I've seen aren't suffering.
This has been a general worry from people lately, and the usual solution is to recommend the latest drivers (maybe supply a link for convenience) and try to find a tester with integrated Intel graphics.
I say you should try 128 frames, split across as many 1024x1024 sheets as possible, then find a victim either here or on IRC. Just mock up a 1-level demo game with full logging to get a feel for it and receive some bug reports.
Torque 3D Owner Ronny Bangsund
Torque Cheerleaders
But a 256x256 character is a quarter of the height of my 22" widescreen desktop screen at full resolution. A computer which can't handle large spritesheets would probably not be able to pump 1680x1050 screens out at reliable framerates, so you might as well make a different resolution character set for simpler systems.
How does a 128x128 version of the character look, while animated, scaled up to larger resolution displays? Animation can hide scaling artifacts a bit.
What's in the 64 frames you have? Is that just *one* animation, or are you stuffing several animations into one sheet? Even the lowest range of integrated GPUs can grab 256MB of VRAM, so you can manage a few tiles and sprites at those sizes. I dunno about the texture compression options, but if there were any, you could drastically reduce VRAM usage.