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

  • Home
  • SEARCH
  • 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 3989226
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:20:50+00:00 2026-05-20T06:20:50+00:00

I am making a game similar to bust-a-move for the iphone. I am using

  • 0

I am making a game similar to bust-a-move for the iphone. I am using cocos2d. I am encountering lag sometimes during the game. I have 6 different types of balls. I am creating 30 instances of each type and I reuse them. The problem comes when I shoot the ball and the ball does not collide with either the wall on the sides or the balls on the screen. I believe it may be due to a lag. When the ball is shot I initialize a scheduler to run every 0.01s to check if it collides with any of the other balls. In each interval I create a rect for the ball that was shot and create a rect for all other balls and check for intersection.

I was wondering what the reason for the lag could be. I am also trying to figure out if there is any bottle neck by using the Instruments. Could having a lot of images loaded cause lag? or could a lot of numerical computation be the reason?

It would be helpful if you can share any similar experiences or if you can suggest some possible reasons for lag and how to avoid them.

Thanks
Abhinav

  • 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-20T06:20:51+00:00Added an answer on May 20, 2026 at 6:20 am

    a 100Hz (0.01sec) timer is going to slow your game right down. Most PC’s can’t even handle a scheduler with that frequency (mainly, the OS overhead, but I digress).

    Highly recommend that you use the CCLayer update method instead of a Scheduler or NSTimer.

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

Sidebar

Related Questions

So I'm making a simple UIKit based iphone game for a class. It's similar
I am making a skateboarding game with obstacles you have to jump over using
I'm making an ipad game using cocos2d and box2d. Among other elements, there's a
I'm making a game similar to Kaboom for my actionscript class http://www.groovz.com/play/kaboom/ I realize
So I'm making a game similar to Age of Empires 2. So far, what
I'm making some game, and I have made it pretty much all, but not
I am making a game, and have a Game model and a User model.
I'm making a game which is using sound and images. The weirdest thing is
I'm making a game using UIView. I use a large (8192x8192) UIView as the
I am making a program similar to the famous game Tetris and I've run

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.