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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:35:57+00:00 2026-06-16T00:35:57+00:00

I have a few animated sprites in my cocos2d iPhone game. By animated sprite

  • 0

I have a few animated sprites in my cocos2d iPhone game. By animated sprite I mean a CCSprite that has a CCRepeatForever action run on it. The repeat action cycles through the frames of the animation which come from a png spritesheet and associated plist coordinates file.

While I have only a few unique animations I have many animated sprites with the same animation. For example I might have 30 animated soccer players running around the screen all running a CCRepeatForever action. What’s an efficient way to pre-load and re-use the animations in this case?

My current approach is to create the repeat actions when the game starts-up. Then when I want to create a new animated sprite I run a copy of the pre-loaded repeat action on the sprite. I question whether this is very efficient since the animations sometime stutter when starting. All feedback is greatly appreciated! I’m open to pretty much any architecture/set-up.

Edit – more info: I’m wondering if “pre-copying” the actions could work? When the game loads I’d fill a queue with copies of the repeat action. Then I’d pop them off as needed. When the size of the queue is below some threshold I’d refill it on a background thread.

  • 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-06-16T00:35:58+00:00Added an answer on June 16, 2026 at 12:35 am

    Make sure you are using a texture atlas, and preload all the textures with animations in them. Ideally you’ll want to be using the .pvr.ccz format because it loads tremendously faster than PNG.

    Everything else you do probably has very little to no effect on framerate. Stuttering is most likely caused by loading textures on demand, or the same regarding audio buffers (ie playing audio without preloading).

    Don’t worry about optimizing the (frequent) creation of CCRepeatForever with CCAnimate and whatever else you are using unless you’ve run the profiler to measure and confirm that that’s exactly the problem you’re having. I’m 99.9% confident that the stuttering issue is not related to creating & running actions.

    Loading resources is by far the most time-consuming task you can run during gameplay, so it’s crucial to preload all resource files. In your case, you really only need to make sure the textures are in memory.

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

Sidebar

Related Questions

I have a few divs that I want to animate using jQuery. However, I
I have few graphic effects on image which i am able to run on
I have an animated .GIF image that I created with http://ajaxload.info/ and some editing.
I have a UITableView which sometimes has only a few rows. I would like
I have a big problem since a few days that I can't solve. First
I'm animating a sprite on a pixel grid. I have a few options, with
This is a fun one... I have an application that has a help screen
In my current problem, I have several hundred animated gifs that will preform a
I have a few lines of words (labels) that have been added to a
I have been coding in iphone platform for about a few months. One thing

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.