Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7166127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:21:48+00:00 2026-05-28T14:21:48+00:00

I am given about 30 textures in PNG 32bit format. All textures are of

  • 0

I am given about 30 textures in PNG 32bit format. All textures are of equal size (wider than iPad screen). Size is not square and neither width not height is a power of 2. The same textures are meant to be used for iPhone version of the game.

In the game these textures are assumed to be used for an animation (each texture is a frame of the animation). Of course, 30 textures using 4MB each are not very fast to animate and memory consumption is nowhere near an acceptable level.

So, being novice in the OpenGL ES and Cocos2d, I am seeking for recipes how I can optimize these particular textures and textures in general.

Additional info about textures I should deal with: all textures have the same gradient background (surface of a sea) and areas that different (waves). Each wave is somewhat unique and waves occupy almost all the texture. Textures are exported from Flash (they are vector images initially).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:21:49+00:00Added an answer on May 28, 2026 at 2:21 pm

    First advice: change the design. If it’s not yours, use blunt force if necessary. This is hardly going to work reasonably well.

    You will have to frequently load and unload textures while animating to keep the memory consumption in check. This will limit the achievable framerate of the animation. I suspect it will be at best 30-40 fps on iPad and 4th generation devices, probably abhorrently slow on 1st to 3rd generation devices.

    The best optimization you can do is to not use the Flash exported fullscreen textures. Basically what Flash does is animate everything for you, and then output a fullscreen image for each animation frame. This is the worst possible solution for animating anything for mobile devices.

    Instead, recreate all of the animations within cocos2d using individual images and cocos2d actions to compose the same animation or one that’s close enough. It’s more coding work, but it’ll perform a lot better. There may be tools like LevelHelper which can assist you but I’m not sure if they can show you a realtime preview of the animations. There’s also a tool that can import Flash timeline animations but I can’t say how well it works, or whether it’s working at all.

    Use Texture Packer to create texture atlases from individual images to conserve memory and speed up rendering even more, in particular in conjunction with CCSpriteBatchNode. Plus Texture Packer allows you to experiment with the various texture formats, and it will export SD resolution images should you want to support non-Retina devices.

    Because another good optimization is to reduce the color bit depth as much as possible. If you go from 32-bit to 16-bit (RGBA4444 or RGBA5551 or RGB565 depending on what kind of transparency you need) you already cut down your memory consumption in half, and rendering speed increases a bit as well.

    If possible use one of the PVR compressed formats, in particular for sprites which are always moving because the degraded image quality will be almost impossible to notice with moving sprites.

    However, since you mention gradients those will be affected the most by a reduced color bit depth. If it’s a simple gradient you can replace the gradient background with CCLayerGradient to save the memory of the background image.

    Finally you may be able to use smaller images and scale them up. Especially for transparent images the fact that scaling the image up will make it look blurred can actually be beneficial.

    To summarize:

    • don’t use the fullscreen textures exported by Flash (really bad idea), at the very least try the Flash timeline animation importer for cocos2d
    • use individual images animated with cocos2d’s features
    • use texture atlases (and sprite batching) to reduce memory consumption, increase speed
    • reduce color bit depth as much as possible, again less memory more speed
    • experiment with the lossy compression format PVR for fast/always moving images
    • use smaller images and scale them up
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given a big city (square is about 800 km^2 ) with some layer over
I need to separate all possible suffixes (about 1000) from a given word. I
I have a class called UserInfo that contains details about a given user. There
Given my previous questions about the the usage of AMPL. Are there any other
I have just learnt about temporary tables and using them has given me some
I'm learning about pointers. Given this code: FILE* from = fopen("in.txt", "r"); FILE* to
How could I go about calling a method on a static class given the
After following the great advice given in a thread about service beans I have
Given data like this C1<-c(3,-999.000,4,4,5) C2<-c(3,7,3,4,5) C3<-c(5,4,3,6,-999.000) DF<-data.frame(ID=c(A,B,C,D,E),C1=C1,C2=C2,C3=C3) How do I go about removing
Two general questions I'm wondering about both in the case for a given file(.js,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.