Multiple Concurrent Missions Redux
by Paul Rylance · in Torque Game Engine · 07/05/2005 (4:38 am) · 1 replies
Good day to you all,
I have been having a ponder about how best to have multiple missions running concurrently for a multiplayer RTS project I am working on. (Remind me to shoot the designer later).
Anyway I'll lay out a quick scenario, then a list of what my choices seem to be and then would appreciate some feedback from my esteemed peers here. I read a lot of old postings and saw one from 2002 with a few ideas but didnt want to thread necromancy too much and bring it back from the dead.
Scenario:
I have a strategy game with a tactical overview map, par for the course so far. To visualise easier lets say its a galactic map with 20 systems visible. I have a fleet of spaceships at my command and I want to go off and conquer. So I grab a few ships and send them to attack System A , and a few more to attack System B. In the meantime another player has sent some of his ships to attack my existing colony at System C. So now we are at the point of having 3 running battles in progress all of which need to be running with full AI simulation. The overview map shows the locations of the battles and the player needs to be able to hop in to any one of these in order to give his own direct orders if he doesnt want the AI to do all the work for him.
As far as unit counts being simulated at any one point would go, I dont imagine it to be excessively high. Its more on the squad based rather than army based scale of battles.
Solutions:
So I can see a few possible ways to go at this problem.
1) Create a very large mission, which includes the tactical map and all possible systems and then teleport the camera to the correct location when the player picks a battle to observe/mess around with. Of course there is stuff like swapping camera controls, constraining it to the area etc etc to take care of after the teleport.
2) Adopt an MMO style approach. Run the tactical map as a mission on a single server. Anytime combat is entered into spawn a new server instance on a free port to run that as a seperate mission. Do a seamless connection to that server when the player hops into a mission.
3) Rewrite completely mission handling in TGE. (I think not)
4) Make it turn based, only allow one mission at a time, shoot my designer, lose all our future adoring fans. (Possibly not the best choice)
Looking at the 2 more sensible options the second seems a lot cleaner for many reasons, however it requires multiple instances of the game running which is more than likely more resource hungry than a single large mission. On many occasions no spawned server is required, its only if combat has to be undertaken at that specific point, but on the large mission route, we would need every area included permanently regardless. I need to do some testing on the figures later but I would appreciate feedback from anyone who has experienced these sort of issues before, and comments on the route you chose.
The game is designed to be multiplayer via hosted servers, or over a lan so a solution that scales to both situations is required. If we were only in a hosted environment then resources become less of an issue. On a home PC, we need to make sure we can tweak to still have acceptable performance. Whether this is through changing tactical map size to reduce number of areas on the map, or in the case of (2) by simply limiting max # of simultaneous missions based on machine spec I dont know yet. I just got lumbered with this task yesterday so am still in the thought process.
Thanks in advance,
Paul
I have been having a ponder about how best to have multiple missions running concurrently for a multiplayer RTS project I am working on. (Remind me to shoot the designer later).
Anyway I'll lay out a quick scenario, then a list of what my choices seem to be and then would appreciate some feedback from my esteemed peers here. I read a lot of old postings and saw one from 2002 with a few ideas but didnt want to thread necromancy too much and bring it back from the dead.
Scenario:
I have a strategy game with a tactical overview map, par for the course so far. To visualise easier lets say its a galactic map with 20 systems visible. I have a fleet of spaceships at my command and I want to go off and conquer. So I grab a few ships and send them to attack System A , and a few more to attack System B. In the meantime another player has sent some of his ships to attack my existing colony at System C. So now we are at the point of having 3 running battles in progress all of which need to be running with full AI simulation. The overview map shows the locations of the battles and the player needs to be able to hop in to any one of these in order to give his own direct orders if he doesnt want the AI to do all the work for him.
As far as unit counts being simulated at any one point would go, I dont imagine it to be excessively high. Its more on the squad based rather than army based scale of battles.
Solutions:
So I can see a few possible ways to go at this problem.
1) Create a very large mission, which includes the tactical map and all possible systems and then teleport the camera to the correct location when the player picks a battle to observe/mess around with. Of course there is stuff like swapping camera controls, constraining it to the area etc etc to take care of after the teleport.
2) Adopt an MMO style approach. Run the tactical map as a mission on a single server. Anytime combat is entered into spawn a new server instance on a free port to run that as a seperate mission. Do a seamless connection to that server when the player hops into a mission.
3) Rewrite completely mission handling in TGE. (I think not)
4) Make it turn based, only allow one mission at a time, shoot my designer, lose all our future adoring fans. (Possibly not the best choice)
Looking at the 2 more sensible options the second seems a lot cleaner for many reasons, however it requires multiple instances of the game running which is more than likely more resource hungry than a single large mission. On many occasions no spawned server is required, its only if combat has to be undertaken at that specific point, but on the large mission route, we would need every area included permanently regardless. I need to do some testing on the figures later but I would appreciate feedback from anyone who has experienced these sort of issues before, and comments on the route you chose.
The game is designed to be multiplayer via hosted servers, or over a lan so a solution that scales to both situations is required. If we were only in a hosted environment then resources become less of an issue. On a home PC, we need to make sure we can tweak to still have acceptable performance. Whether this is through changing tactical map size to reduce number of areas on the map, or in the case of (2) by simply limiting max # of simultaneous missions based on machine spec I dont know yet. I just got lumbered with this task yesterday so am still in the thought process.
Thanks in advance,
Paul
About the author
I am a (not so) mild mannered .NET consultant by day and indie game developer by night.
Torque 3D Owner Jesse Liles