Loading Times - Any Tips?
by Daryll Todd · in iTorque 2D · 11/06/2008 (1:41 pm) · 22 replies
One thing ive not seen mentioned (unless I missed it), is loading times, how long roughly is it taking for peoples game to load?
My current project is taking about 20 seconds before getting to the main menu, my previous project was a lot more complex, but still took roughly the same time.
Does anyone have any tips for improving on this? Or possibly displaying some simple "loading" text while it does? At the minute its just a blank screen.
My current project is taking about 20 seconds before getting to the main menu, my previous project was a lot more complex, but still took roughly the same time.
Does anyone have any tips for improving on this? Or possibly displaying some simple "loading" text while it does? At the minute its just a blank screen.
#2
This is probably the upper limit for acceptable loading time for an app, but even then there'd need to be some sort of loading screen. I would expect a small test application like this to load much quicker.
11/06/2008 (4:33 pm)
I've made a test application with no audio and 500k of png textures. It loads in 10 seconds.This is probably the upper limit for acceptable loading time for an app, but even then there'd need to be some sort of loading screen. I would expect a small test application like this to load much quicker.
#3
Doing the initial loadingscreen (until the app really starts to load something outside the coreinit) is set through the plist.info file. The stuff after that hopefully is set through your first level ...
11/06/2008 (4:41 pm)
Well you need a loading screen as you have to show the iTGB screen anyway unless you have iTGB commercial.Doing the initial loadingscreen (until the app really starts to load something outside the coreinit) is set through the plist.info file. The stuff after that hopefully is set through your first level ...
#4
11/08/2008 (9:34 pm)
As soon as you end a level and start loading another one, the screen goes black. Is there some way to keep an image showing on screen during loading?
#5
But the real reason for it is to start loading the next level while the player is still reading this info.
I also have a PLAY NEXT LEVEL button on this gui that is not visible untill the next level is already loaded. this way they can't press the button untill I know the next leve is running in the BG.
11/09/2008 (8:28 am)
I always have a levelEnd.gui between levels. it's a good place to display score or other info for each level.But the real reason for it is to start loading the next level while the player is still reading this info.
I also have a PLAY NEXT LEVEL button on this gui that is not visible untill the next level is already loaded. this way they can't press the button untill I know the next leve is running in the BG.
#6
Going to keep looking into this, really need to be able to display the loading text for those 20 seconds, rather than it just flashing up afterwards.
11/09/2008 (10:47 am)
Hmm, ive tried creating a simple loading screen in xcode (just one line of text) but I still get nearly 20 seconds of black screen, then half a second of my xcode loading screen before my main menu appears..Going to keep looking into this, really need to be able to display the loading text for those 20 seconds, rather than it just flashing up afterwards.
#7
11/09/2008 (1:53 pm)
Sure you linked in the image at the right place ie the application init call?
#8
We definitely need a loading screen up there, and it should display your Default.png (check info.plist) file until Torque puts a new screen up for display, we will confirm that here.
We are working on speeding up scripts in general and we will research the load times, they are definitely on the long side.
11/11/2008 (12:05 pm)
I think the loading times are mainly the scripts loading and execing and getting everything prepared. The image load times will be a factor if you use loose images that need padding and your images aren't on power of two size boundaries (128x128)We definitely need a loading screen up there, and it should display your Default.png (check info.plist) file until Torque puts a new screen up for display, we will confirm that here.
We are working on speeding up scripts in general and we will research the load times, they are definitely on the long side.
#9
11/11/2008 (8:46 pm)
Good to hear you're looking into it Paul.
#10
11/11/2008 (10:09 pm)
One easy way to speed up script loading is to compile everything into one big DSO. You can pretty much concatenate all your scripts (removing exec()s) and call compile(). This speeds up loading quite a bit as there's no disk seeking, most operations get done in big batches, etc.
#11
That definitely shouldn't have any serious impact on loading. (for final runtime if you have many behaviors, I would assume that could make a diff)
11/11/2008 (11:06 pm)
The iTouch & iPhone use flash memory. The seak times are in the 0.1ms range normally on this type of memory, 0.5ms at worst. So even with 50 scripts, that still below a second seek time ...That definitely shouldn't have any serious impact on loading. (for final runtime if you have many behaviors, I would assume that could make a diff)
#12
11/11/2008 (11:54 pm)
Well, you still might want to try and compare - if script load is taking 20sec, SOMETHING is taking time. :)
#13
I sadly have not gotten iTGB to work when I disable the define that is enforcing the "don't use Apple PNG" in default build. Likely I miss something when attempting to do so, perhaps this would mean that I have to convert the png myself, no automatic conversion for deploy.
11/12/2008 (12:46 am)
I would have guessed it has more to do with the iTGB standard that disables Apples optimized PNG format for iPhone. So the ARM has to convert it in realtime when loading to my understanding which would not needfully the best idea. Also this leads to color banding as the iPhone does not have 32bit color support.I sadly have not gotten iTGB to work when I disable the define that is enforcing the "don't use Apple PNG" in default build. Likely I miss something when attempting to do so, perhaps this would mean that I have to convert the png myself, no automatic conversion for deploy.
#14
11/12/2008 (1:48 pm)
There's a flag in TorqueConfig.h that needs to match up with, you have to make sure those are in sync, unfortunately there's no way to have Xcode do it automatically, you just have to check it yourself. I think it's called USE_APPLE_PNGS or something similar. It should have a comment explaining how it's used though
#15
For now ive manged to get a loading screen to appear at least (used the screenshot option rather than just creating the default.png myself). Shame it cant be a gif as we could animate it :D
11/20/2008 (12:43 pm)
Thanks guys, ill have a look at this now.For now ive manged to get a loading screen to appear at least (used the screenshot option rather than just creating the default.png myself). Shame it cant be a gif as we could animate it :D
#16
Ive just timed it both ways and it didnt seem to make a difference :(
11/20/2008 (1:35 pm)
Ive just tried changing it to use apple pngs, it did alter some of my images slightly however it used more memory than not using them.Ive just timed it both ways and it didnt seem to make a difference :(
#17
I understand that you link it in the info.plist but I don't know how.
12/16/2008 (2:27 pm)
Can you guys tell me how to display default.png while the game is loading?I understand that you link it in the info.plist but I don't know how.
#18
Just make sure that in your XCode resources you have the following;
game folder (should be blue)
common folder (should be blue)
main.cs
Default.png
12/16/2008 (2:48 pm)
I believe it will be loaded automatically, so long as you put an image at 320 x 480(480 x 320 gets squished) name "Default.png" in your base directory.Just make sure that in your XCode resources you have the following;
game folder (should be blue)
common folder (should be blue)
main.cs
Default.png
#19
It works now.
Thanks again Mat :)
12/16/2008 (2:56 pm)
Sweet. I had a Default.png in the correct directory, but it wasn't linked in my xCode resources.It works now.
Thanks again Mat :)
#20
12/16/2008 (3:05 pm)
No problem.
Torque 3D Owner Marc Dreamora Schaerer
Gayasoft
I can't give much ideas on improving the load tips yet, have not timed the difference for dynamic load / unload.
but one thing that likely will have an effect - once available - is the usage of PVRTC for textures where usefull as they only have 1/8 to 1/16 of size in file and in memory.