Jump to content
  • Advertisement
Sign in to follow this  
Neuton Mouse

OpenGL Tonz of large animations [2d]

This topic is 2113 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello GameDev Community,

Ok, this covers 2d opengl (or it really doesn't matter). Before i do any further moves in my project i would like to ask for advices/comments/opinions here. I'm bit confused with some memory management issues.

I'm planning complete 2d game which will assume 10-20 object types. Each object type will have perhaps 50-64 128x128/256x256 frame animation (atlas size isn't specified). There will be other misc animations. 

I'm not sure whether video card will explode after such frame rush. Right now, i'm using default sprite sheet method - one animated atlas, each frame is done via clip draw. Currently, these are test sprites 64x64 in 512x512 and everything is fine. 

I could do future animations in huge atlases but that would result like 8192x8192 (or more?) for each object(~x20) - would that be fatal? Or loading each frame is the key? (i have doubts about it)

Maybe this is naive but anyway i'd ask: what are good algorithms that deal up with animation management? Or it would be fine to continue in such way and have no worries? False alarm then. The point is, i want older computers (let's take for example average laptops of 2004-2009) to be able to work out with it.

Thank you for attention!

Edited by Neuton Mouse

Share this post


Link to post
Share on other sites
Advertisement

20 animations * 64 frames * 256*256 pixels * 4 bytes each (RGBA) = 335,544,320 bytes: hefty to load, either acceptable as a single texture atlas or close enough to not worry about texture switching costs, probably affordable on any 512 MB card.  You might also use compressed texture formats to target 128 MB video cards and/or load textures faster.

Share this post


Link to post
Share on other sites

If you're targeting laptops (integrated Intel graphics), you'll want smaller textures. Even Sandy Bridge (Jan 2011 release date) has documentation suggesting you limit texture sizes to 256x256 and smaller. If you can access the hardware, it's worth testing if that's still the case or if Intel has improved their drivers in that area.

 

Are you using keyframe animation with 50+ keyframes or frame-by-frame animation? If you're not talking about keyframes, you might look into keyframe animation. It should get you better looking results, better support in 3rd party tools, lower memory requirements, and higher performance.

Share this post


Link to post
Share on other sites
Also, If you absolutely need the animations and cannot downSize them, then you may want to find some compression technique, and load/unload certain animation files only when you need them.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!