Game Development Community

Dynamic content

by Laurence Grant · in Torque Game Engine · 08/02/2006 (8:37 pm) · 4 replies

Fogive me but I'm new to Torque and want to understand a few concepts before I invest in the Indie license.

Most engines are level based. I'm looking to do something a little different and would like to know if I could perform the following things:

I want to start in a town, so obviously I need to load a "level" if we need to call it that, with terrain, etc..

As the game progresses the player will have the option to construct new facilities. Can I add content such as buildings dynamically?

If so, can these facilities be complex structures that can be entered?

Depending on size and complexity, can I unload the terrain and other outdoor objects as I enter a facility making room for the very complex interiors, but with minimal interruption to the player?

Can I take it a step further and allow a player to leave a planet into space, therby unloading the whole "level" more or less and loading a new one, doing this dynamically, and again with minimal interruption?

Thanks for any details you can provide on these questions.

#1
08/02/2006 (9:18 pm)
Hi Laurence,
I'm not sure what sort of project you're working on -- are you envisioning a sim game, a real-time strategy game, or something like an MMORPG?

Tentatively, the answer to all of your questions is "yes", although you'll need to do quite a bit of coding to accomplish all of that. What you're outlining here is a massive undertaking. Torque is a very powerful tool that can potentially do anything you want. The real questions, however, are what is your skill level in C++ coding, and how much time do you have to invest?

Streaming terrain and buildings in and out of memory can be done, but not straight out of the box. You'll be re-engineering Torque's mission system, at the very least. Transitioning from planet to space smoothly? That also ties in with the streaming terrain issue above. Loading buildings on the fly can be done, although you'll have to architect your game very carefully to avoid issues like the need to relight a scene.

That said, with the proper skills and resources, you can create almost any type of game in Torque, level-based or otherwise.

I hope that helps! If there's anything specific you're curious about, the folks here on the forums are tremendously helpful -- just ask. =)
#2
08/02/2006 (10:10 pm)
I was wondering the same question as the OP. Is there a resource available that explains how to load content dynamically? I was thinking of making a random city renerator where buildings could be spawned with random floors into a flat plane. So there would be a model for the first floor, one for a generic floor and one for the roof. The script could then create buildings of arbitary height and random textures. How exactly would I go about doing this?
#3
08/02/2006 (10:30 pm)
I doubt you'll see a resource that fits your needs exactly... You'll need to grow your own.

A good place to start would be to simply examine how Torque generates and loads in a mission file. Once you have a basic understanding of how Torque sends that information to the clients, you'll be in a good position to modify it: place your buildings and objects dynamically, stream in adjacent areas, whatever floats your boat.
#4
08/02/2006 (10:52 pm)
Laurence the answer to your questions:

1. yes
2. yes
3. yes, this will happen automatically if you use portals correctly.
4. no