Map/Mission Cycle?
by Tom Vogt · in Torque Game Engine · 12/17/2002 (5:39 am) · 4 replies
I'm looking for a way to define a mission cycle and run it on the server.
The most simple thing would be a list of missions. When mission 1 is done, mission 2 is started, then mission 3, at end cycle back to 1.
Further complications could easily be added once the basic cycle is done, stuff like "if team A wins, go to mission 3, otherwise 5" or whatever.
What I'm looking for is where and how to put the basic concept. I need a mission cycle definition somewhere and scripts to do the actual cycling. Any pointers?
The most simple thing would be a list of missions. When mission 1 is done, mission 2 is started, then mission 3, at end cycle back to 1.
Further complications could easily be added once the basic cycle is done, stuff like "if team A wins, go to mission 3, otherwise 5" or whatever.
What I'm looking for is where and how to put the basic concept. I need a mission cycle definition somewhere and scripts to do the actual cycling. Any pointers?
About the author
#2
For example: Our game supports 2-4 teams. I need a way to say "cycle only through _these_ missions" or "cycle only through missions with 3 teams".
12/17/2002 (1:12 pm)
Yeah, I found that. But I'm looking for a way to _define_ the mapcycle, through a configfile or something. The one in game.cs just cycles through all available missions.For example: Our game supports 2-4 teams. I need a way to say "cycle only through _these_ missions" or "cycle only through missions with 3 teams".
#3
12/18/2002 (9:22 pm)
EDIT: mixed up 2 post windows :OP
#4
Or in the missions themselves you could include some info about the missions like the game type, number of players, etc. Then the cycle function could be given some criteria and just pick out those maps, arrange them in order and go the the one after you are currently on.
I think that makes sense because if you want to do decent filtering of games on servers you need that info anyway.
In the Realm Wars code there is an example of reading a field from a mission file, in that case the game type. (CTF, DM, etc) You could also include things like suggested minimum and maximum number of players, map complexity, primarily indoor or outdoor, etc etc.
Then write a function that filter based on those params. If you set it up well you could use that same functionality for server filtering at least in part.
12/18/2002 (11:05 pm)
You could create a script that just loaded an array with the names of the missions to cycle.Or in the missions themselves you could include some info about the missions like the game type, number of players, etc. Then the cycle function could be given some criteria and just pick out those maps, arrange them in order and go the the one after you are currently on.
I think that makes sense because if you want to do decent filtering of games on servers you need that info anyway.
In the Realm Wars code there is an example of reading a field from a mission file, in that case the game type. (CTF, DM, etc) You could also include things like suggested minimum and maximum number of players, map complexity, primarily indoor or outdoor, etc etc.
Then write a function that filter based on those params. If you set it up well you could use that same functionality for server filtering at least in part.
CANON
Christophe CANON