Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
ryleyra

Registered:
Posts: 2,922
Reply with quote  #1 
Artemis War Server Proxy V1.0

WarProxy.png 
I am posting a preview of this project in hopes that I can get folks to try it out prior to Artemis Armada in April. This is a server proxy system which is intended to make it easier for ships to team up in the War Server and operate in the same sector. This image above shows the two parts of the system, the Controller, on the right, and an individual Proxy, on the left. There will actually need to be a Proxy for each Artemis server, which will manage the clients that connect to that server. The Controller lists all of the available proxies (with the name selected by the players for their ship), and the dropdown can be used to disconnect a ship from their home server, and connect it to the server for another ship. 

To clarify this example, in the image above, a ship named "Artemis" is connected to a server on IP address 192.168.0.101. The Proxy for this ship is located at 192.168.0.102, and clients should connect to the "server" at that address. The Controller displays that ship and the address of its server, and another ship named "Intrepid", whose server is on 192.168.0.102. (If this was a real example it would be 192.168.0.103 or the like, so there wouldn't be an IP address conflict)

Both servers are on port 2010, although they could be on another port depending on the command line arguments to the Proxy. The dropdown lists of all ships are the same, they just have a different server selected (matching their position in the list of ships) so all you would have to do is open the dropdown list next to Intrepid and select 192.168.0.101, and the Intrepid and Artemis would be on the same server, and able to participate in the same War Server sector.  

This project requires ArtClientLib. You will have to download the appropriate version of ArtClientLib for the version of Artemis you are running. (I have confirmed that ArtClientLib 2.6.0 will work with Artemis 2.3, at least for this app. It does not access any information that is different between the versions) Place the attached jar file in the same directory as ArtClientLib, and then run one of the two attached .bat files.

This is version 1.0 of the Artemis War Proxy. I think I have a finished product now, which will do the required job. You can transfer ships between servers, and they will retain their name and drive type, being assigned an open slot on the next server. Unlike previous versions, you cannot change ship info permanently while not on your home server; but you can change a name temporarily if needed to keep from matching another ship on that server. Clicking on the ship name button will also pop up a dialog with all ships assigned to that ship's server.

The Controller still needs to be started first. After the Controller starts, the Artemis servers and proxies can be started in any order. If a proxy crashes, it should be possible to just close it and restart it and reconnect. The proxy will appear on the controller even if it has not connected to its server, but it can't be switched to another server, and no other proxy can connect to it.

I have found that the system appears to work if the Proxies are on the same machine as a client, but NOT if it is on the same machine as a server, even if the port number is different. For best results, the Proxies and Servers should be running on their own machines, but this isn't always possible. One possibility is to run a Mainscreen client on the same machine as the proxy. This will allow direct control of the name of the ship, as well as providing a Mainscreen for use when you are not running on your own server. The Controller should work on any machine, it runs on port 2009.

I'd like some user input on the interface design. I have done some testing, as well, but I haven't tested it under game conditions. Please let me know if there are any problems.

 
Attached Files
zip ArtemisWarProxy_v05.zip (16.22 KB, 6 views)

ryleyra

Registered:
Posts: 2,922
Reply with quote  #2 
Before anyone asks, the main reason that the proxies are separate from the controller is that I needed some way to specify which client is associated with which server. I need to switch all such clients at once. Clients could connect on a different port for each bridge, but I figured it would be easier if the clients could just connect as if the proxy were a normal Artemis server. The players don't have to do anything different, just connect to the right IP address.

The other reason the proxies are separate is because if one of them crashes, the others do not crash at the same time. One server or proxy can be shut down, and the other bridges will not be affected.

EDIT: I'm not sure, but I think the attachment disappeared from the last post. I have fixed it. In addition, my first attempt didn't work with a live game. All packets were being echoed twice. I've fixed that too, so the attachment above should now work.
locqust

Avatar / Picture

Registered:
Posts: 70
Reply with quote  #3 
Unfortunately I don't have a big enough crew to run multiple ships to give this a try, however I think its a brilliant idea and am interested in the progress you make. I'm wondering if this set up would work inside one of the sandboxes in non-gm mode?
ryleyra

Registered:
Posts: 2,922
Reply with quote  #4 
Quote:
Originally Posted by locqust
Unfortunately I don't have a big enough crew to run multiple ships to give this a try, however I think its a brilliant idea and am interested in the progress you make. I'm wondering if this set up would work inside one of the sandboxes in non-gm mode?


Well, I was thinking about that, and I think it's possible, but there could be some issues if a ship tries to continue a game it previously left. For example, I was thinking about it in terms of a pair of missions, where each of two ships start in their own mission, one ship picks up something, leaves their mission for the other, drops something off, and then the two ships return to the first mission.

Technically this should work, but when the ship is transferred to meet its partner in the other mission, it will still remain in the original running mission. I THINK the game will freeze, as when the consoles disconnect, it should return to the "welcome to Artemis, you need to log in with some clients" warning screen. However, it's possible the game is still unpaused and the ship will wander around aimlessly in the old mission.

The players can power down their ship before the transfer, and this is probably a good idea. When they return to the sector with their ally (who was the host in the other sector) then they'll pick up with the ship where it was, and their ally's ship will idle in the old sector. Although they can probably shut down that server if they don't need to return to it.

The Sandbox should be a similar situation, with the added complication that the Sandbox represents several sectors. If the two ships want to fly into the same sector, they should switch to the same server. Then, when they separate, they'll go to their own individual servers. The War Server works exactly the same way, except the game isn't continuous, so you can switch around all you want before you start the game, and ships won't be left "idle".

I may think about a solution for this, but for now it's not a priority. I'm planning to upload a new release this weekend, though. It's greatly improved, ships will now pick their own slot when they transfer from server to server, you don't have to do that manually.

locqust

Avatar / Picture

Registered:
Posts: 70
Reply with quote  #5 
How would a pickup be transferred between servers then? Surely when a new ship joins the mission it would lose all the pickups it had on the old server?
ryleyra

Registered:
Posts: 2,922
Reply with quote  #6 
That would have to be handled by the GM. You're right, a ship transferring to a new server would be restored to its starting state, and that's a problem too.

It's really a bigger problem if there is another ship in the sector the first ship left. It would notice the ship just sitting there idle. Although I suppose the script could destroy the ship or something. That would actually be a good cue for the players to go and switch to the other server and log into it, as they would be forced out to the server select screen. That's not a viable solution for the War Server though.

For a non-GM Sandbox mission, you could have the ship that is transporting the cargo stay on the server, while the other ship transfers to deal with some enemies or something. But at this time there's no way for the two sandboxes to communicate with each other. You could fake a continuity between the two missions, but there wouldn't be anything to stop the players from bypassing that continuity if they wanted to.

Depending on what ArtClientLib is capable of, I may build an interface into the War Proxy to allow you to reduce a ship's energy or ordinance, or otherwise try to make damage carry over from one server to another. It would basically serve as the messaging mechanism. Thom's idea about including a user defined API in the networking system could help with that too.
locqust

Avatar / Picture

Registered:
Posts: 70
Reply with quote  #7 
Hmmm thinking out loud here...
So my java custom ops console I'm working on uses Artclientlib as a logged in observer console. I've been using popup messages to the observer console as a way of triggering updates on the java custom console. A certain keyword updates button x while another does y. I'm thinking you could use a similar method to trigger a write to a database to store the state of the ship. Very roughly of course, exact damage, shield strength etc would be hard to keep up with. But picking up a mission item or just a standard pickup from an anomaly could trigger the write and then store it to transfer over to the new server... how you then write that info back into the game I have no idea!
ryleyra

Registered:
Posts: 2,922
Reply with quote  #8 
It occurs to me this is similar to the issue with fighters, where every time you launch you get a fresh fighter. While that's not really considered a problem, it reveals the mechanic behind it, which is that Thom is creating a fighter when it launches and connecting it to the console. There's no way to carry over shield damage or leftover missiles from the last one that docked.

*pondering* Now that I think about it, the opposite is also true. When a fighter returns, it can't tell the ship whether it fired a missile or still has its entire stock available. So if the fighter needs to be restocked, it would need to load three missiles whether it had any left or not.

I'm sure it's not insurmountable, it's just something that needs to be considered.
locqust

Avatar / Picture

Registered:
Posts: 70
Reply with quote  #9 
Had a thought before I went to bed last night, what about a modified version of Arrews GM menu?
Server A sends updates as observer popups that triggers a write to a database about the state of the ship. Or even better I think Artclientlib can be configured to read the world state of the ship.
When the ship wishes to join server B it powers down and jumps across to server B joining ship B. There is a code in the mission script that says when I see ship A join this mission send an observer popup message to the database, it then works like Arrews menu codes to send GM keystrokes back to server B to modify the ship as much as it can.
Ship A's energy was recorded at 400, I need to send key X to the server six times to reduce new Ship A's energy to that level. Ship A was recorded as having 2 homing torps left, send key Y three times to remove torps, etc.

Clunky and prone to errors if played across the net rather than LAN but it could work. I'm also basing some of this off memory as I know some game object changes to player ships affect "player ship" not a particular ship.
ryleyra

Registered:
Posts: 2,922
Reply with quote  #10 

Yeah, I'm hoping this kind of thing will work much better once Thom makes his changes to the mission system to support multiple ships.

I must admit, though, that the idea of the ship firing off a bunch of torpedoes to exhaust its supply and energy to match the ship from the other server would be hilariously comical. [biggrin] That was the way I was thinking of doing it through ArtClientLib.

 

ryleyra

Registered:
Posts: 2,922
Reply with quote  #11 
I am now releasing version 1.0 of the War Proxy. I feel that this version of the software has all the features needed to make it useful. I will edit the post above to include the new changes.

So as not to lose the info, here's what I posted with Version 0.5:

This is version 0.5 of the Artemis War Proxy. Improvements over the last beta test include a new GUI for the proxy that includes the ability to specify an IP address for the server, and connect to it at any time, even after clients have been connected. The Controller will recognize that a Proxy is not connected, and will not let other ships connect to it. This version also adds display of the ship names, although when the Controller starts, it will display the IP address of the Proxy. You can still check the IP address with a mouseover hint on the button showing the ship name.

The Controller still needs to be started first. After the Controller starts, the Artemis servers and proxies can be started in any order. If a proxy crashes, it should be possible to just close it and restart it and reconnect. I have done some testing, so I am pretty sure it will work as described to connect multiple ships to the same server. However, if you spot any errors, be sure to let me know.

At this time, when the Controller connects a Proxy to a new server, all clients will lose their selected ship slot, and Helm will lose the name entered. The clients will have to manually determine which ship slot is open and connect to it. I am currently working on automatically selecting the ship slot and loading the ship's name, so transfer between servers will be truly transparent to the user. That will probably be version 1.0 when I manage to accomplish that.
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,935
Reply with quote  #12 
This is being moved to Off Topic since it is a game modification.
__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.