Game Development Community

Testing on the iPhone

by Dave Rushton · in Torque 2D for the iPhone · 11/04/2009 (3:00 am) · 6 replies

I am able to install my project on my iPhone and it runs fine. If I disconnect the iPhone from the tether, and try to restart the game, I get the iTGB screens and it ends...no game. Any ideas?

#1
11/04/2009 (3:05 am)
Watchdog timer is my first guess.
#2
11/04/2009 (11:20 am)
You are taking to long to enter the main loop of the game.. The game needs to do as LITTLE as possible before getting out of the splash screen. NOTE : This is a limitation of the iPhone operating system, not iT2D.

For example : If an application is taking longer than x seconds to load (x being anywhere between 5 and 20), the operating system decides that your app is not good for the user, and shuts the application down.

Solution

Do not load a lot of stuff at the beginning of the game, only load what you need when you need it. If your menus require a lot of loading, do it incrementally and - remember its a mobile device and a strict operating system - do not load tons of stuff in the menu. Usability determines that you need to make the app respond and present in the shortest possible time!
#3
11/04/2009 (4:14 pm)
Merge scripts, too! A single file at 100k loads faster than 10 files at 10k. You might also want to check out script packages (a chunk of functions that you can enable and disable, replacing functions), and make one for each level.
#4
11/04/2009 (9:18 pm)
drawback of the merge script is that you can not restrict and cut down execs to only be active at appropriate times.
#5
11/05/2009 (12:24 am)
But that's where packages come in handy.
#6
11/05/2009 (2:22 am)
This has nothing to do with "when is which function used" but "when does which script dso waste memory and processing time" and for the later, packages have not the least impact. Its all about exec