Jump to content

[0.21] Kerbal LiveFeed: Passive Multiplayer Plugin/Client/Server v0.7.1


SodiumEyes

Recommended Posts

On-Topic:

Vanderburg, nice ideas but updates per client are retarded because the serverload would go even higher the more players are on the server.

Inactive ships per client could work..but for that you should ask Sodium if its possible. Still the server would have to transmit everything...every single ship every build..

"Last X number of screenshots" can be done with tools. I wrote one for my server.

It makes sense as long as you can switch between a global number and a per client number (Or a per client number, up to a cap). The machine the kerbalsp.com server is on is kinda way overkill with more than plenty resources to handle it and it would preventthe cap from being reached so quickly, without making it way too high with only a few players.

Besides, I haven't seen a server with more than 20 players on it.

Link to comment
Share on other sites

Besides, I haven't seen a server with more than 20 players on it.

Well... if you open the Map with 15 or more players flying around its pretty funny :P My GPU usage went up to 40% at that moment.. (KSP is usally not taking more than 20-25% :D)

EDIT: I included [GER] in the server name once, player numbers went down pretty fast.. Do you hate Germany? :P Changed it to GP as this is the clantag..

Edited by Byter
Link to comment
Share on other sites

I was playing this mod with a friend last night and it was awesome. I have been poking around with the code, and its really nicely made SodiumEyes!

I started to experiment with seeing if I could get a Vessel converted as a byte array, to serialize over the network. Basically to add a button like the Screenshot button, to to send your current vessel/spacestation/moonbase over the network. And I have just succeeded :D (getting it as a byte array that is)

My aim is to allow cooperative building of space stations/bases. After you have attached new modules press the sync button. It sends it across to the other clients they match it against the same station/base. Save their orbit data for it, destroy their instance, recreate the station from the incoming data, but use their saved local orbit data on it.

Of course this isn't perfect, (what happens if you are docked, and someone else hits sync etc). But I think this could be a lot of fun!

Link to comment
Share on other sites

Thanks for the offer, I got everything I need in house (see my sig).

Of course there are other caveats, that everyone will need the same mods installed (otherwise if a part is missing, it can't be created/loaded), and again this is only possible due to all the fantastic work by SodiumEyes. I don't have the time to write all the back end that has been written. This was just me doing some poking around in the Kerbal API to see if it was possible.

Link to comment
Share on other sites

I have the core of it all working. It took a bit of a fight, being new to the Kerbal API, and the documentation is a little sparse.

The main problem, is receiving the Vessel data, and working out if the client already has this Vessel, if so update it. To me the easiest method seemed to be to destroy the old vessel, and just load the replacement protovessel. I was tracking the vessels by the guid inside the Vessel class. The problem with that is when you dock vessels together they generate new guids. Which led to explosions, as the seemingly new vessel would telefrag the old one. To get around this, my inter-dimensional part module stores a unique guid that gets preserved between loads and the vessels are identified using that.

Occasionally I get a bug, that causes the protocrew members to fail to load, therefore the whole vessel fails to transfer. I have a feeling this might be due to some exceptions breaking the way the client exe talks to the Kerbal plugin.

Already I can see this getting messy, the idea is that the core module of your space station/moon base has the network sync module. When a new vessel is attach, you press sync, and everyone gets the update. If you have multiple sync modules on separate vessels the following case can happen:

Space Station Synced, New module near the station, but not docked get's sync'd. Now everyone sees a space station, and the new expansion module. The expansion module get's attached to the space station, and gets sync'd to all the players. Now all the players (but the player docking the new module), would see a space station, with the new module, and another module in space. As they have got no message that the old module has been removed.

Other problems, is what if 2 people (player A and player B) are docked with a space station at the same time, and player A hits sync? Does player B get their vessel destroyed as player A does not know about it? I think this could be circumvented by watching for all attaching and detaching and auto syncing then, but I don't know where to start on that being new to the api and all.

Oh, and you can be the ultimate troll by telefraging people's launches, by syncing your rocket on the launch pad as they get ready to go. :sticktongue:

Edited by Caswal
Link to comment
Share on other sites

Caswal, the problems you face are exactly why this 'interpretation' of Multiplayer has not been implemented by SodiumEyes. and also why the "general public" has been told that "multiplayer" will not work.

I feel your pain, as many people have tried to figure out how to get this stage of multiplayer to work.

But truly, I wish you good luck in your efforts. I just don't see how a fully player-to-player-interactive, "can see, can touch, can dock with other players ships" will work with the current KSP engine.

Link to comment
Share on other sites

@Fyren, I went into this knowing that it would most likely have serious design/useability problems. I was originally making it as a mod for myself and friends, with rules attached of how to use it. And if I can get it working well enough, release it to the public.

Link to comment
Share on other sites

Caswal, you could avoid the problems of telefraging and other issues with multiplayer by simply making the player receiving the data have to accept the transfer with a dialog in order for it to actually load the new ship. You could also allow you to choose which people to send the vessel to, thus avoiding the problems involved with multiplayer on servers with a lot of people.

Link to comment
Share on other sites

I am having an error starting http server. It reads:

Error starting http server: System.Net.HttpListener Exception <0x80004005>: Access is denied

at System.Net.HttpListener.AddAllPrefixes<>

at System.Net.HttpListener.Start<>

at KLFserver.Server.hostingLoop<>

Please try running the server as an administrator

Now, I have been running as an admin during all of this, and I have no clue what is going on, so any help would be appreciated.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...