iOS Simulator Games Run Very Slow (Low Fps)

iOS Simulator games run very slow (low fps)

The Simulator is not a device. The Simulator uses the Mac's CPU (tons faster) and the Mac's memory (lots more). However the Simulator also emulates OpenGL ES via a software renderer, which is abysmally slow even on the fastest CPU.

Because of this and the fact that no end user will ever run an app on the Simulator, any performance measurements on the Simulator are utterly IRRELEVANT!

Sorry for shouting but I felt this needed to be said with conviction. ;)

Low FPS on iOS Simulator SpriteKit

SpriteKit uses OpenGL ES for GPU-accelerated rendering on a device. In the iOS Simulator, OpenGL ES support is provided by a software renderer. As such, any use of OpenGL ES — whether by itself or via SpriteKit or SceneKit — has very different performance characteristics on the simulator versus on an actual device.

Never rely on the iOS Simulator for performance measures, especially when anything GPU-related is involved.

How to set FPS in sprite kit

The FPS is usually slower on the simulator because the simulator is not as capable at handling the game as your device is. If you want an accurate reading of your FPS, always use your device.

A more in depth answer is given here....
iOS Simulator games run very slow (low fps)

Why does my App(game) has a low fps(30)? (xcode sprite swift)

Because your game is too graphics heavy and/or your programming is poor.

FPS stands for "frames per second". It is a quantitative measurement of the number of frames of your game that can be drawn in one second. Depending on your target hardware, there are a number of factors that could cause this. They are:

  • Too many graphics: Each sprite or character in your game, as well as backgrounds, enemies, entities, etc all must be drawn by the graphics processor. Each one of these takes a couple of milliseconds to draw. If the graphics are not optimized properly for your platform, then will game will slow down as the graphics hardware starts to lag behind the speed of your program.

  • Inefficient code: Game logic will be able to be executed very quickly in order for things to proceed properly. If your game uses a lot of functions that take time to execute, or has to do many complicated calculations often, then your game will slow down. In this case, I would recommend moving game logic to a separate thread or optimize your code. In Xcode, Instruments is a very useful tool for identifying slow sections of code so that you can speed them up.

  • Incapable hardware: It could be that your computer/device that your game runs on is simply not able to handle your game, whereas newer hardware may be able to. If this is the case, you may need to consider dropping support for older hardware. Running games in fullscreen mode is a very useful but often overlooked way to increase performance, as many operating systems suspend compositing and other graphics services so that your video card gets to dedicate more time to your program.

Here's the basics:

If you want your game to run at at least 60 FPS, then each frame must be able to be rendered in .0166666666666 milliseconds. As you can probably tell, that's not much time. That's why you must take the above suggestions seriously.

Unity game lag when test on iOS devices

You can try a few things.

  • At the very beginning of your app, keep a target frame rate to 30.

Application.targetFrameRate = 30;

  • Downgrade quality settings to medium. Within that, also disable or dull down things related to lighting in case yours is a simple 2D game.

  • Optimize art. Pack art in packing tags, and on iOS, keep their compression at PVRTC. Only the ones looking really bad after compression should be RGB24 or RGBA32. Disable options like Generate Physics shape(if you're not using that), and Generate mipmaps.

  • Have a look at your UI. Anything in UI that is not interactive(like simple images, or texts, which are not buttons or input texts, etc) should have Raycasting off. The Rich Text option in texts too should be off if that is not affecting your app specifically.



Related Topics



Leave a reply



Submit