How to create co-existing worlds ?
by Browser_ice · in Torque Game Engine · 10/24/2007 (11:17 am) · 4 replies
How can we create whole Torque worlds co-existing with each others ?
Only one of them at the time can be chosen by the user. Choosing another one would mean to completly switch to it.
Do I have to create different root folders for them or are they all sharing the same Torque folders ?
I would prefer having different root folders like a MOD. I would make it alot easier to maintain and not get mixed up with all the other files of all the other worlds. How can I do it and what would be the minimal folders and files required for a blank world to work from ?
Only one of them at the time can be chosen by the user. Choosing another one would mean to completly switch to it.
Do I have to create different root folders for them or are they all sharing the same Torque folders ?
I would prefer having different root folders like a MOD. I would make it alot easier to maintain and not get mixed up with all the other files of all the other worlds. How can I do it and what would be the minimal folders and files required for a blank world to work from ?
#2
If this is single player,
- Create a trigger in your mission that causes the server to load the next desired mission.
- When the player walks up and activates the trigger, the server loads the new mission
and the client follows.
If this is multi-player,
- The server must be running a dedicated copy of each mission that you need active.
So if you have 3 missions names, mission1.mis, mission2.mis, mission3.mis then you
could have a batch file like this..
C:\Game\MyGame.exe -dedicated -mission C:\Game\Data\Missions\mission1.mis
You'll need a batch file like this for each mission you want running, and you'll have to
create a new Prefs file in the server directory for each mission you want running. Each
Prefs file have the unique settings for that mission, and add -prefs (your prefs file) to
each of the commands to start your servers. You'll also want to modify the game.cs
file in \servers\scripts so that your missions don't end or reset if you want a persistent
world.
- On the client it's the same concept as a single player, except the trigger causes the server
to save the client's data then causes the client to change to the next mission by connecting
to your server again on a different port to connect to the next mission.
There's more to do to get it all to work just right, but this should help get you going in that
direction. Again, hopefully this is what you were talking about.
10/24/2007 (12:52 pm)
Hopefully this is what you're talking about..If this is single player,
- Create a trigger in your mission that causes the server to load the next desired mission.
- When the player walks up and activates the trigger, the server loads the new mission
and the client follows.
If this is multi-player,
- The server must be running a dedicated copy of each mission that you need active.
So if you have 3 missions names, mission1.mis, mission2.mis, mission3.mis then you
could have a batch file like this..
C:\Game\MyGame.exe -dedicated -mission C:\Game\Data\Missions\mission1.mis
You'll need a batch file like this for each mission you want running, and you'll have to
create a new Prefs file in the server directory for each mission you want running. Each
Prefs file have the unique settings for that mission, and add -prefs (your prefs file) to
each of the commands to start your servers. You'll also want to modify the game.cs
file in \servers\scripts so that your missions don't end or reset if you want a persistent
world.
- On the client it's the same concept as a single player, except the trigger causes the server
to save the client's data then causes the client to change to the next mission by connecting
to your server again on a different port to connect to the next mission.
There's more to do to get it all to work just right, but this should help get you going in that
direction. Again, hopefully this is what you were talking about.
#3
The users will switch by simply loading up the mission.
I was just wondering how can I have each missions in a separate folder with all its data in subfolders instead of being in the normal all shared folders and subfolders. Just like the principal of having a game MOD in any other games like Quake or HalfLife. They have the MOD in a separate folder.
Having each mission with seperate MOD folders would make it easier to maintain the data and files.
10/24/2007 (4:04 pm)
This is in a multiplayer session.The users will switch by simply loading up the mission.
I was just wondering how can I have each missions in a separate folder with all its data in subfolders instead of being in the normal all shared folders and subfolders. Just like the principal of having a game MOD in any other games like Quake or HalfLife. They have the MOD in a separate folder.
Having each mission with seperate MOD folders would make it easier to maintain the data and files.
#4
You'll probably want to keep the mission files all in one folder just to make it easier
for the engine to find them.
You could create a separate folder for each mission under the data folder, and then
go through all the mission files and adjust the path for the objects and artwork that
belong to that mission. That should work for what you want.
10/25/2007 (9:39 am)
Ah, I see.You'll probably want to keep the mission files all in one folder just to make it easier
for the engine to find them.
You could create a separate folder for each mission under the data folder, and then
go through all the mission files and adjust the path for the objects and artwork that
belong to that mission. That should work for what you want.
Associate David Montgomery-Blake
David MontgomeryBlake