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 720409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:45:17+00:00 2026-05-14T05:45:17+00:00

I have near about 255 image frames for background animation, 99 frames of enemy

  • 0

I have near about 255 image frames for background animation, 99 frames of enemy sprite and 125 frames of player sprite.
All animations are running simultaneously on the screen. That is background animation is running and 4-5 enemies are on the screen are present at a time, also player is there at the same time.

Take a look at the code below,

CCAnimation *_enemyAnimation = [CCAnimation animationWithName:@"Enemy" delay:0.1f];
   for (int i = 1; i<99; i++) {
       [_enemyAnimation addFrameWithFilename:[NSString stringWithFormat:@"enemy %02d.jpg",i]];
   }

   id action1 = [CCAnimate actionWithAnimation: _enemyAnimation];
   [_enemySprite runAction:[CCRepeatForever actionWithAction: action1]];       
   [self schedule:@selector(BackToGameLogic:) interval:5.0];

This makes my game too slower and consumes memory about 65MB in the allocations.

How should I manage my animations so there will be improvement in speed and memory consumption will be reduced?.

Please suggest me the way.

Thanks.

  • 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-14T05:45:18+00:00Added an answer on May 14, 2026 at 5:45 am

    Make your animations out of a sprite sheet. Sprite sheets only call the buffer once per sheet, so you get a marked improvement over individual jpgs per frame.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have about 40 workbooks with 1000+ columns and near 1 million records. Unfortunately,
I have imported near about 10 tables in Hive from MS SQL Server. But
I have near about six Activities and a service class with BroadcastReceiver that run
We have been kicking about an idea where UAT can be tested with near
I have a domain... let's say www.myOldDomain.com. It is currently running a site about
I have near about 100 entities and each entity has custom property of byteArray
I have been querying google for some material about kd-trees and image comparison but
I have an image on my site which is rather big (about 200kb). I
I have a table on near the bottom of the page, which I want
I have a text field that is near the bottom of the screen. When

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.