Become a MacRumors Supporter for $25/year with no ads, private forums, and more!
  • Did you order new AirTags? We've opened a dedicated AirTags forum.


macrumors newbie
Original poster
Jan 3, 2013
pretty like the old-fashion low resolution game, with pixel charactor, like the 1980's NES games,
I just made a simple such old fashion game on the app store, but seems run slow , occationally below 50fps. what wondered me is how could a low-spec 8-bit NES game run in full fps, however my game is in unstable speed, even with dual-core modern machine...? maybe is my machine's problem, anyone try it? its free on app store. name is "Rock in Code"
here is some screen shot



macrumors P6
Nov 25, 2005
The speed of the software obviously depends on the developer. We don't know what you are doing, so it's hard to say what the problem or problems are.


macrumors regular
Nov 24, 2012
Can you post some code from your drawing routines? It's hard to tell what the problem is when you aren't giving any information as to what your code is actually doing.

Are you using OpenGL, SDL, what?


macrumors 6502a
Jan 4, 2002
Austin, TX
You need to use "Instrumets" in Xcode on your game to see where the performance problems really are. Many times the slow code is not at all what you may think it is. Maybe you are allocating and releasing a lot of memory blocks over and over in a tight loop instead of allocating once and reusing them, who knows.

To learn how to use Instruments you can go to the Mac Dev Center at and watch, for free, the "Development Videos" from WWDC 2012 for the "Learning Instruments" session. And you should probably look at the "Optimizing 2D Graphics and Animation Performance" session videos.

All of this is totally free and you can watch it over and over as much as you need to. Also there are sample code projects that go with the sessions so you can download and look at the exact same code as that used in the sessions.


macrumors newbie
Mar 10, 2011
What does your fundamental game loop look like?

Assuming that you're not inadvertently doing some crazy processing (which a profiler would tell you, as suggested by Sayer), this is probably down to a problem with the design of your basic game loop.

Could you summarize your technique? Are you rendering frames on a timer? NSTimer? Do you expect to get called 50 times per second (hence 50fps)? If so, you might want to study how timer invocations happen (you're likely not being called that often). As well, you might want to consider how these oddly-spaced game-steps affect your update logic. For example, if you assume that you step the game every N milliseconds, but actually you're stepping it every N+dt milliseconds, then eventually those dts accumulate to the point where you've missed several steps that should have happened.

You might get something out of this thread and the commentary linked to in it:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.