Game Development Community

Linking Mission Files/Paging Objects

by Will Pall · in Torque Game Engine Advanced · 11/06/2005 (6:44 pm) · 4 replies

Just wondering, has anyone been successful in getting TSE to either page in objects as they come into view, or link mission files together? I'm planning on creating an RPG, but the way the missions work now, I would have to have loading screens for every area. The terrain works great, and keeping one huge terrain and then paging in objects as the player gets closer would be preferable, but if I could just link missions together, that would be good too.

#1
11/09/2005 (7:56 am)
It isn't that hard. We've quickly put together "externGroup" objects in our codebase. They're basically simgroups that are saved to external files, and objects inside these groups are automatically saved into each group's individual file when the mission is saved. These groups have load/unload methods for bringing them in/out the main mission when needed.

To load the groups, I just need to exec it's external file, and to unload it I just clear() it.

We did them basically to store mission-specific triggers, paths, markers, spawnSpheres and some objects without having them clutter our mission and confuse everything. Each mission would load it's own group during start, and unload it upon completion.

If clouped with some sort of zoning, it could be possible to use it as dynamic loading. But of course there would be some issues: first the creating of many objects (loading a group with tons of things) can freeze the game for a few dozens/hundreds milliseconds, depending on how big the objects and the textures are. Interiors would be another problem, since they wouldn't get lit by Torque, bearing only the lighting they got when they were compiled.
#2
11/09/2005 (7:24 pm)
I was just wondering if anyone had done this yet. No reason to spend hours and hours on something that someone else has already done.
On another note, wouldn't the new dynamic lighting introduced by the final version of TSE solve the interior lighting problem?
#3
11/09/2005 (11:38 pm)
TSE will be much friendlier towards dynamically paged systems.
#4
11/10/2005 (6:16 am)
I know about terrain paging, but will TSE support background loading of resources? I mean, right now if I load a 4k poly DTS with a 1024*1024 texture and a normal map mid-game, everything will freeze for a few milliseconds until the whole thing is in memory.

I see a lot of changes to get the resource to stream in the background and have the object's instance wait until it finishes loading before completing it's creation, or somethow become avaliable even while the resource hasn't finished loading, or something like that, jut not being visible.