Multiplay and Star systems
20 years 1 month ago #18241
by Joco
Multiplay and Star systems was created by Joco
Okay these are probably real dumb questions but I I haven't found clear answers, so:
1. When in multiplay games is it possible to have players traveling into different star systems of the badlands cluster. I realise that the standard multiplayer games don't support this but with the right setup is it possible?
2. Is there a source code distribution of the what_rocksv2 module? I am particularly interested in learning how much of the multiplay code hangs together. After looking at the examples in the SDK I was hoping to see how things were done in this modification.
Why I am asking? I have a small group of friends interested in i-war2 LAN sessions. We like co-op style games and are trying to determine if it is possible to operate in such a way under the i-war2 engine. One of the keys being an open universe where you are not locked into a set "cube" of space. For example a simple mission might be to escort three freighters through multiple jump points and cargo drop-offs/collections before returning to the original point of hire. Now if someone has built said system already please point me to it. From what I have read what_rocks is not such a thing.
Thanks very much for any information.
Cheers,
Joco.
1. When in multiplay games is it possible to have players traveling into different star systems of the badlands cluster. I realise that the standard multiplayer games don't support this but with the right setup is it possible?
2. Is there a source code distribution of the what_rocksv2 module? I am particularly interested in learning how much of the multiplay code hangs together. After looking at the examples in the SDK I was hoping to see how things were done in this modification.
Why I am asking? I have a small group of friends interested in i-war2 LAN sessions. We like co-op style games and are trying to determine if it is possible to operate in such a way under the i-war2 engine. One of the keys being an open universe where you are not locked into a set "cube" of space. For example a simple mission might be to escort three freighters through multiple jump points and cargo drop-offs/collections before returning to the original point of hire. Now if someone has built said system already please point me to it. From what I have read what_rocks is not such a thing.
Thanks very much for any information.
Cheers,
Joco.
Please Log in or Create an account to join the conversation.
20 years 1 month ago #11602
by MajorTom
Replied by MajorTom on topic Multiplay and Star systems
Not dumb questions at all. What you are looking for is much closer to the Epic Online mod than what_rocksv2.
1) It would be possible to have different star systems at least to a limited extent by using a work around and a bit of scripting. As demonstrated in the Epic Online mod you can run a persistant universe by hosting a dedicated server. As also is demonstrated, you can exit a MP game (via a jumpgate) into your SP game while transporting cargo from one game to another. It is also possible to run a dedicated server on your PC while playing on another server (asuming you have a average powered gaming PC).
The concept would be:
Each LAN player could run a dedicated server with it's own system (Map)in your LAN. Each map could have 2 or three "Jumpgates" that would provide a hyperjump to the next server (next system map). You would basically be moving from one server to the other via a scripted sequence that would be triggered by entering the Jumpgate. The script would require you knowing the IP address of the other servers in the LAN (Thats not usually a problem in a LAN as you often set the IP adresses manually anyhow).
The limitation would be primarily the map size. We have have no experience with maps larger than 200 km in diameter. Larger map sizes may well cause inconsistent hit and damage rates due to system inaccurancy (8 bit floats?). Since LDS doesn't work in MP however, it would take considerable time to cross a 200 km map with a conventually driven ship at a speed of around 900 m/sec or less. Of course, you would have to make your own maps for each system with the resources like stations and Cargo pick-up points ect. Epic Online also has a number of examples for this.
2) We never distributed the source code for what_rocksv2 or Epic Online because of the hardcoded anti-cheat functions integrated into the scripts. Basically they are however the same scripts as in the SDK samples (with lots of functional additions). The Jumpgate function in the Epic Online mod is just a scripted sequence that (like all the other functional additions to the scripts) uses standard pog. It has nothing to do with a change of the MP game functionality itself. If you are interested, I could provide you with some example scripts for the jumpgate function as well as the functions for moving the cargo from one game to another.
Notes:
This wouldn't be either really easy or quick to do. A good map takes about two weeks of hard work. Scripting and testing the additional jumpgate and cargo transport functions would take probably take more like 4 weeks of steady work. It isn't something you can just whip up quickly for a LAN party, but it could be fun and rewarding to do as a serious project together with your LAN buddies.
I've never actually tested a scripted jump from one server to another but in theory it should work without a hitch. Jumping from MP to the SP game works fine. Standard MP pog functions do allow you to exit the current game and you can reset the MP application command line to join a specific server. So, it should work just fine.
Iwar2 Multiplayer Fan Site
1) It would be possible to have different star systems at least to a limited extent by using a work around and a bit of scripting. As demonstrated in the Epic Online mod you can run a persistant universe by hosting a dedicated server. As also is demonstrated, you can exit a MP game (via a jumpgate) into your SP game while transporting cargo from one game to another. It is also possible to run a dedicated server on your PC while playing on another server (asuming you have a average powered gaming PC).
The concept would be:
Each LAN player could run a dedicated server with it's own system (Map)in your LAN. Each map could have 2 or three "Jumpgates" that would provide a hyperjump to the next server (next system map). You would basically be moving from one server to the other via a scripted sequence that would be triggered by entering the Jumpgate. The script would require you knowing the IP address of the other servers in the LAN (Thats not usually a problem in a LAN as you often set the IP adresses manually anyhow).
The limitation would be primarily the map size. We have have no experience with maps larger than 200 km in diameter. Larger map sizes may well cause inconsistent hit and damage rates due to system inaccurancy (8 bit floats?). Since LDS doesn't work in MP however, it would take considerable time to cross a 200 km map with a conventually driven ship at a speed of around 900 m/sec or less. Of course, you would have to make your own maps for each system with the resources like stations and Cargo pick-up points ect. Epic Online also has a number of examples for this.
2) We never distributed the source code for what_rocksv2 or Epic Online because of the hardcoded anti-cheat functions integrated into the scripts. Basically they are however the same scripts as in the SDK samples (with lots of functional additions). The Jumpgate function in the Epic Online mod is just a scripted sequence that (like all the other functional additions to the scripts) uses standard pog. It has nothing to do with a change of the MP game functionality itself. If you are interested, I could provide you with some example scripts for the jumpgate function as well as the functions for moving the cargo from one game to another.
Notes:
This wouldn't be either really easy or quick to do. A good map takes about two weeks of hard work. Scripting and testing the additional jumpgate and cargo transport functions would take probably take more like 4 weeks of steady work. It isn't something you can just whip up quickly for a LAN party, but it could be fun and rewarding to do as a serious project together with your LAN buddies.
I've never actually tested a scripted jump from one server to another but in theory it should work without a hitch. Jumping from MP to the SP game works fine. Standard MP pog functions do allow you to exit the current game and you can reset the MP application command line to join a specific server. So, it should work just fine.
Iwar2 Multiplayer Fan Site
Please Log in or Create an account to join the conversation.
20 years 1 month ago #11603
by Joco
Replied by Joco on topic Multiplay and Star systems
Thanks MajorTom for the quick response.
You highlighted a couple of limitations I wasn't aware of:
1. being the inability to use LDS
2. that a MP server map would seem to be fixed
As for the source code samples - that would be very helpful. I'll email you when/if I get to that point. As you said, doing things of substance in POG is not a quick exercise. The SP test scenarios I have tinkered with taught me that lesson.
The multiple server idea isn't bad. We normally have 4-5 machines available and all are of a pretty high spec (2GHZ+ CPU, 512MB+ RAM).
New questions:
1. On the MP server are you able to script map transitions on that server and have all the players connected pulled into the new map on that same server? Or could you fudge it by having two servers that you bounce between and have one server tell the other what map to start up as part of jump node scripting. That kind of remote control ability would open up the apparant expanse of the cluster.
2. Other than machine resource limits can I have multiple MP servers running on the same box?
Appreciate your answers. I realise I could work this stuff out myself but it is much faster to draw on the available knowldege base instead of burning my own time down dead ends.
Cheers,
Joco.
You highlighted a couple of limitations I wasn't aware of:
1. being the inability to use LDS
2. that a MP server map would seem to be fixed
As for the source code samples - that would be very helpful. I'll email you when/if I get to that point. As you said, doing things of substance in POG is not a quick exercise. The SP test scenarios I have tinkered with taught me that lesson.
The multiple server idea isn't bad. We normally have 4-5 machines available and all are of a pretty high spec (2GHZ+ CPU, 512MB+ RAM).
New questions:
1. On the MP server are you able to script map transitions on that server and have all the players connected pulled into the new map on that same server? Or could you fudge it by having two servers that you bounce between and have one server tell the other what map to start up as part of jump node scripting. That kind of remote control ability would open up the apparant expanse of the cluster.
2. Other than machine resource limits can I have multiple MP servers running on the same box?
Appreciate your answers. I realise I could work this stuff out myself but it is much faster to draw on the available knowldege base instead of burning my own time down dead ends.
Cheers,
Joco.
Please Log in or Create an account to join the conversation.
20 years 1 month ago #11605
by MajorTom
Replied by MajorTom on topic Multiplay and Star systems
OK, you can have the fruits of the many hours I've spent going down dead ends
The problem with scripting MP is not really POG itself. What makes it complicated is that MP games are event driven. You have to set up events and propogate them to all other players who then react on the event. You end up with something more like an industrial process control system than a programmed script.
1) The MP game offers map cycling as a standard function (there is information about that on my site). When the server cycles all the players that were connected will automagically join the new game (map). Cycling occurs either at a given time that you can preset or when the game is ended due to the point limit you set. You can however script the game end individually per player (like in Epic Online) or for all players simultanously, by making it dependent on a given event (for example all players are within a certain area, like flying through a jumpgate in formation, or have fulfilled an objective, ect.)
Note: the cycle process takes you to the next map as given in the [FcServer] section of flux.ini. That limits you to a pre-assigned map sequence, I think, because normally you cannot change the contents of flux.ini once the game/server has started. You can however change the maps via command line in the MP console. It might be possible to change maps dynamically, but I don't have (never seen) the code for the console so I don't know how it works. I think it's part of the iMultiplay.dll, and therefore hardcoded, but I'll look into it within the next day or so.
2) By changing flux.ini it is posible to run multiple instances of the game. (I've never used that in MP games though). I've never tried to run multiple servers on one machine intentionally. Due to a quirk in WinXP it does happen sometimes when the client application of the game crashes but the server app continues to run. (you can provoke this, for example, by intentionally selecting a non-spaceworthy ship on a standard, not dedicated, server: The client app will crash right after the server app is started).
In a case like that you see your own servers name in the ingame server browser or in gamespy (the same name multiple times if you had multiple client crashes). I never tried it, so I dunno, but you should also see which map each instance of the server is running and be able to connect specifically. Since the multiple games all run on the same IP address I would however expect poor preformance in the least, or even nonfunctionality, if you have players on each of the different instances at the same time. You'll have to try that and see if each instance is actually simultanously playable.
Iwar2 Multiplayer Fan Site
The problem with scripting MP is not really POG itself. What makes it complicated is that MP games are event driven. You have to set up events and propogate them to all other players who then react on the event. You end up with something more like an industrial process control system than a programmed script.
1) The MP game offers map cycling as a standard function (there is information about that on my site). When the server cycles all the players that were connected will automagically join the new game (map). Cycling occurs either at a given time that you can preset or when the game is ended due to the point limit you set. You can however script the game end individually per player (like in Epic Online) or for all players simultanously, by making it dependent on a given event (for example all players are within a certain area, like flying through a jumpgate in formation, or have fulfilled an objective, ect.)
Note: the cycle process takes you to the next map as given in the [FcServer] section of flux.ini. That limits you to a pre-assigned map sequence, I think, because normally you cannot change the contents of flux.ini once the game/server has started. You can however change the maps via command line in the MP console. It might be possible to change maps dynamically, but I don't have (never seen) the code for the console so I don't know how it works. I think it's part of the iMultiplay.dll, and therefore hardcoded, but I'll look into it within the next day or so.
2) By changing flux.ini it is posible to run multiple instances of the game. (I've never used that in MP games though). I've never tried to run multiple servers on one machine intentionally. Due to a quirk in WinXP it does happen sometimes when the client application of the game crashes but the server app continues to run. (you can provoke this, for example, by intentionally selecting a non-spaceworthy ship on a standard, not dedicated, server: The client app will crash right after the server app is started).
In a case like that you see your own servers name in the ingame server browser or in gamespy (the same name multiple times if you had multiple client crashes). I never tried it, so I dunno, but you should also see which map each instance of the server is running and be able to connect specifically. Since the multiple games all run on the same IP address I would however expect poor preformance in the least, or even nonfunctionality, if you have players on each of the different instances at the same time. You'll have to try that and see if each instance is actually simultanously playable.
Iwar2 Multiplayer Fan Site
Please Log in or Create an account to join the conversation.
20 years 1 month ago #11615
by Joco
Replied by Joco on topic Multiplay and Star systems
Thanks MajorTom. That has given me something to think about.
Time to get down and dirty with some POG I guess.
Cheers,
Joco.
Time to get down and dirty with some POG I guess.
Cheers,
Joco.
Please Log in or Create an account to join the conversation.
20 years 1 month ago #11622
by MajorTom
Replied by MajorTom on topic Multiplay and Star systems
I checked into the issue about setting the map dynamically per pog. you'll find several commands in the iMultiplay header, like for example:
iMultiplay.ClientOptionsSetServerMap( string map );
(that set of commands isn't listed in the scripting SDK)
I saw your syntax stuff for Crimson, so I'm really looking forward to sharing your other experiences and dead ends too.
Iwar2 Multiplayer Fan Site
iMultiplay.ClientOptionsSetServerMap( string map );
(that set of commands isn't listed in the scripting SDK)
I saw your syntax stuff for Crimson, so I'm really looking forward to sharing your other experiences and dead ends too.
Iwar2 Multiplayer Fan Site
Please Log in or Create an account to join the conversation.