Game Development Community

Tips on modifying the startup process to load at a later time

by Tariq Zaid · in iTorque 2D · 06/22/2009 (4:43 pm) · 6 replies

Hey all,

Has anyone tried to delay the loading of the main engine for the iPhone games? Currently I can only drop a regular PNG while it loads, however I'd like to be able to have an animated loading screen. I don't necessarily want it to show progress, however it'd be really nice if I could load a loading screen, load the engine, show the torque splash screen and then show the game. (Or in whatever order, you get what I mean)

Before I start hacking away and doing this, I'd like to know if there's anything that I should absolutely not touch just to prevent some headaches. Has anyone done this? Any pointers out there?

Thanks

#1
06/23/2009 (1:57 am)
If you get this working would you mind posting how? I briefly looked into this but couldn't get it to not show Default.png until after everything was loaded.

I was going to go back and look at this later on but you could probably save a lot of people a lot of time if you figure it out.

Justin
#2
06/23/2009 (3:53 am)
Default.png is loaded by the OS, displayed, THEN your executable is loaded into memory. Your program has zero code referencing it by default, so you can't tell it not to display.
#3
06/23/2009 (4:19 am)
Why would you want it to not show anyway? Black screens aren't something people like when they start an app and apple likely wouldn't approve an app that does not notify the user of anything.

You would normally put your logo into the Default.png and show the torque logo afterwards in the splashscreen gui
#4
06/23/2009 (6:23 pm)
Well ideally you delay your loading to show an animated screen and reduce the amount of time that Default.png is displayed. There are plenty of games on the iPhone that have a black screen for 2-3 seconds and then an animated loading screen as the engine loads up and it looks just fine.

The main reason I'm avoiding the static Default.png image is that flashing an image for a few seconds and then flashing something else is jarring. There is no transition from the image to anything else. There is no technical reason to do this other than from a visual stand point.
#5
06/23/2009 (8:23 pm)
Plenty of games also don't use a highly powerfull and feature rich and thus bloated common purpose engine with stuff that does not even work on the iphone.
You will never get in the range of 2s till the init screen vanishes, so you better plan it as part of your intro phase as it will be there anyway and why waste further time the user has to wait if you can reduce it.


Also that there is no transition past the pure initial phase is a myth.
Use obj c and the corresponding things from the UIKit and it is very well possible. A little overlay and fade animations and thats it.
If you have to wait for torque and the script end to be init, that transition won't start before 8++ seconds have passed which is by no meanings acceptable.
#6
06/23/2009 (8:42 pm)
As to the "why waste further time" comment, I'm not. Here's what we get out of the box:

1) Application launches (Default.png is displayed). This takes roughly 3 seconds.
2) Torque engine commences initialization in the 'applicationDidFinishLaunching' method of the application delegate. The whole initialization phase takes about 5 seconds or so, sometimes more if you have a lot of debug code and poor setup for scripts.
3) Scripts are first called and then you can display splash screens in scripts.

It is, as you pointed out, unacceptable to wait until the scripts are executed to display splash screens. You're just wasting the user's time.

What I'm planning on doing (and have started to do) is A) Strip out pointless things for my application from the game and B) Add a loading screen between steps 1 and 2 to start displaying the splash screens there. What I want to do is display an image using the Default.png and as soon as 'applicationDidFinishLaunching' gets called, I start an animation and transition from the default.png to an animated loading screen (for example the iTGB logo) rather than wait 5 seconds for the engine to actually load and THEN waste 4 seconds showing the iTGB logo.

In case I didn't make myself clear: I want to use the time that the engine takes to load and use it for splash screens. I do not want to wait for my scripts to be executed.