Game freezing & crashing (iPhone)
notionr
Member, PRO Posts: 4
The AdHoc build will work fine for some period and then freeze or crash. It can be after 5 minutes of playing or after 60 minutes, and it has happened on various iPhones and iPads. I have been able to cause a crash in the viewer by pushing the buttons very fast for several minutes, but the crash occurs when users are not necessarily pushing buttons fast. In the game, buttons cause roughly 30 small images to change position and size on the screen.
Details:
- one-scene like Darren's templates with camera origin changes
- no spawning
- no physics (no movable)
- 85 actors
- 137 attributes
- <2mb total of images and sounds (113 images mostly at 4k each, 5 sounds)
- fair number of calculations
- not many timers ("after 0.1" on the buttons, one overall session timer)
Viewer Performance Stats at start:
FPS: 60.7
Images: 10.4MB
Sounds: 187KB
Engine: 26.2MB
Other: 13.4MB
Total: 50.1MB
Viewer Performance at time of crash:
FPS: 34.73
Images: 10.4MB
Sounds: 187KB
Engine: 32.5MB
Other: 13.6MB
Total: 56.7MB
Any ideas?
Details:
- one-scene like Darren's templates with camera origin changes
- no spawning
- no physics (no movable)
- 85 actors
- 137 attributes
- <2mb total of images and sounds (113 images mostly at 4k each, 5 sounds)
- fair number of calculations
- not many timers ("after 0.1" on the buttons, one overall session timer)
Viewer Performance Stats at start:
FPS: 60.7
Images: 10.4MB
Sounds: 187KB
Engine: 26.2MB
Other: 13.4MB
Total: 50.1MB
Viewer Performance at time of crash:
FPS: 34.73
Images: 10.4MB
Sounds: 187KB
Engine: 32.5MB
Other: 13.6MB
Total: 56.7MB
Any ideas?
Comments
Edit: also 85 actors in a scene will be hard on performance.
The older devices have pitiful amounts of RAM.
It is not an exact number, and Apple will not disclose the number, of when the device will crash. It seems to be based on a percentage, and varies per device.
If you want your game to work on old devices (ones older than an iPhone4 or a Touch 4th gen) then I would make sure the RAM usage never gets above 40MB.
The biggest culprit in your stats above seems to be the Engine usage, which I believe is tied to the number of Actors you have in the Scene. To be honest, 85 is pushing it.
edit: too slow joe beat me hehe
Is there something that describes what impacts "Engine" and "Other" memory usage? How do I get those down?