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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:37:36+00:00 2026-06-08T22:37:36+00:00

I have an iOS game that uses Box2D. When I run it in Debug

  • 0

I have an iOS game that uses Box2D. When I run it in Debug mode everything is fine. When I run it in Release mode all game objects speed up and it seems like the mass of game objects is higher or something like that. It’s very strange.

The frame rate is pretty much the same on both versions so that isn’t the problem. Everything in the game should be frame rate independent anyway.

Any idea’s what project setting’s in XCode might be causing this?

  • 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-08T22:37:37+00:00Added an answer on June 8, 2026 at 10:37 pm

    When you run in debug, the compiler does no optimization, so the binary is much bigger, and the code often does useless work. In Release, the optimizer (defaults to -Os) is run, which agressively finds away to shrink the code. This is one reason developers should normally use Release not Debug when testing their code, and only switch to Debug when they really need lldb.

    EDIT: So there are several things that could be in play here for differences. First, is Box2D an included project or a linked in library? If the first, make sure it has both a Debug and Release configuration. Look at your and Box2D’s Build Settings, and see if there is anything defined in one config or the other (that is you might find a -DSLOW) or some such define statement that would be setting (or not setting a flag). Ah, and Debug I normally defines DEBUG=1 (in the preprocessor section ) which Box2D (or even your code) might be using for some purpose.

    If you cannot find a another build setting different, then you can see if the optimizer is having the affect by actually changing the value used in the Debug configuration from -O0 to -O1, -O2, and =Os. Likewise you can change the Release setting from -Os to -O0.

    I’m going to guess that either the “DEBUG” setting in the Debug configuration, some other define in Release, or the optimizer is the reason, and by playing around with Debug and Release you can figure out what is the issue. In fact you can even add (temporarily) DEBUG=1 to the Release configuration too.

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

Sidebar

Related Questions

I have an iOS app that uses a number of enums for valid values,
I am making a small iOS game, and have finished everything, except the sound.
I am working on an application that uses the Game Center feature from iOS
I'm building an iOS game that will have both singleplayer and multiplayer modes. I'm
I'm writing an iOS game that draws many cubes on screen, but I have
I have an Android game that includes a screen that lists all ongoing games,
I have an existing iOS app on the App Store that includes Game Center
I'm making a multiplayer iOS game and have run into the following issue: i
I have developed a ios game with 20 levels. I have menu at starting
I am working on a game for iOS and I have to schedule an

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.