Game Development Community

Loading time

by PeterB · in Torque Game Builder · 01/15/2007 (11:12 am) · 4 replies

As I continue to add to my project my loading time gets longer and longer, predictably. What are some of the things you guys do to avoid a wait when the project first launches? No asset is large, but I simply have a lot.
- would it help to load datablocks soon before they are needed rather than all at the beginning?
- if so, my first splash screen could simply say 'Loading...' so users don't get thrown by 3-5 seconds of black?
- any general tips would help. How to start thinking about this.

-ty

#1
01/15/2007 (11:55 am)
One thing that definitely would help, would be using dynamic load and unload and loading the needed media assets on level loading instead loading all assets on game start as well as unloading them at the end of the level if not needed in the next level anymore.

This makes a large different, if many of your graphics are only used within single levels.
#2
01/15/2007 (12:16 pm)
Is loading equivalent to giving the datablock? like:
new t2dImageMapDatablock(tortoiseImageMap)
{
   imageMode = "full";
   imageName = "~/data/images/tortoise1";
};
I have all of them in datablocks.cs right now. I should spread them out appropriately as you say.
So instead I would:

function onLevel2()
{
    new t2dImageMapDatablock(tortoiseImageMap)
   {
       imageMode = "full";
       imageName = "~/data/images/tortoise1";
   };
}
//
Is this what you mean?
#3
01/16/2007 (5:50 am)
Yes, that's one way to speed up load time. Like Marc said, you'll also want to delete the image maps that are level-specific when you leave that level to free up that memory.

Here's a resource someone made a while back that allows you to manage when imagemaps are loaded/unloaded: ImageMap Datablock Manager.
#4
01/24/2007 (11:45 am)
@Thomas: If you make them loading dynamically... do they load automatically or do you have to do so yourself? Unloading is no problem.. you could just add all loaded media to a list.