Giter Club home page Giter Club logo

darkmultiplayer's Introduction

DarkMultiPlayer

DarkMultiPlayer is a multiplayer mod for Kerbal Space Program. It supports subspace style (and master controlled warp) warping and career mode, with an easy to edit server database.

The DarkMultiPlayer client and server are cross platform, see Install.

Install

Client

  • Download the DMPClient zip and extract to [KSP root folder]/GameData
  • Download DMPUpdater, place the program on your KSP folder and run it.

Server

The DarkMultiPlayer server is cross platform, meaning you can run it on any platform that supports .NET. In Linux or macOS, you must have Mono installed to be able to run the server.

  • Download the DMPServer zip
  • Download DMPUpdater, place the program on your server folder and run it.
    • NOTE: you must have a previous server version in the folder for DMPUpdater to work.

You can configure your server by editing Config/Settings.txt.
If your server's game difficulty is set to CUSTOM, you can alter gameplay settings by editing Config/GameplaySettings.txt.

Compiling

  • Copy the assemblies from [KSP root folder]/KSP_Data/Managed to External/KSPManaged: Run msbuild /p:Configuration=Release (or build with your preferred IDE) to build the plugin and the .NET Framework version of the server. This single build is completely cross platform. Navigate to DotNet/Server/ and either run dotnet publish -c release -f netcoreapp3.1 to build for only your OS, or ./compile.sh to build for every OS

Mod Control

Read DMPModControl.txt, it's commented. The file can be copied from a development KMPServer (The one where you can use SHA sums, not the one with the !md5 section) as the file format is the same.

If you are running a private server, it's safe enough to just add the missing parts.

You can get the DMP client to make a DMPModControl.txt file specific for your GameData directory by pressing Options -> Advanced -> Mod Control -> Generate. The whitelist option will only allow you to connect with the mods in your GameData directory. The blacklist option will allow you to connect with any mods.

darkmultiplayer's People

Contributors

81ninja avatar awdavenger avatar bdurrer avatar benjamg avatar brianerikson avatar coolguy3289 avatar deluxe2 avatar dsonbill avatar godarklight avatar hvacengi avatar johannesmp avatar joshblake avatar mrfreake avatar neouni avatar norgg avatar rcurtin avatar samschlegel avatar tbg10101 avatar themalkavien avatar wisperer avatar xandaros avatar xinayder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

darkmultiplayer's Issues

Sync issue when players disconnect

Hiya, we are currently playing (and bug testing) the development versions hosted on a dedicated Linux server and are experiencing issues with vanishing craft.
These seem to occur when only one of us is playing and then logs off and then the other player logs on at a later time leaving a period where the server has no active players.
It is as if there is no forced sync of craft when a player disconnects to save the state when the other player connects which seems to be causing loss of craft.
Our gameplay is set to the following:
warpMode: 1 (MCW_VOTE)
gameMode: 1 (CAREER)
loglevel,0 (DEBUG)
If you require more information or need us to test things out, we will be more than happy to participate.

Kerbal Passenger Issues

There seems to be some random bugs related to the Kerbals contained in pods.
Some examples -

-In a 3-person capsule, I send one of the Kerbals out to make room for my friend's EVA Kerbal. When he tries to get it, it still shows up as "full".

-I go back to the space center and my friend takes control of my craft. He flies around for a bit, and then when I come back, there is a Kerbal missing from my craft...

Just some mysterious stuff.

Alt + F4 crashes KSP

I've seen this a while ago, happens to me every time I try to force close my KSP while connected to a DMP server.

Just connect to the server, and press Alt+F4 when something like syncing is happening - your game should crash.

Account-bound Kerbals

While I've already discussed this at great length on the Single Kerbal Mode issue on KMP, I did want to mention it here as well:

It should be possible to have specific Kerbal(s) bound to an account. This would mean that only account(s) defined as an owner of a given Kerbal should be able to EVA or control them.

Here is some examples of functionality that I would like to see, ordered in terms of expected difficulty/when they might be possible:

  • The server stores Kerbal names and user ownership
  • The server admin can rename a kerbal via the database, which is reflected on clients after resync.
  • The Client allows the owner of a Kerbal to change their name. Initially this could be done with a simple /rename command while on EVA for example. Much later this could be integrated in some sort of Mission/Inspector UI.
  • If a vessel's current pilot does not have ownership of a given Kerbal, that kerbal can not be EVA'd. Same for Kerbals in Pods/Lab/etc.

I think this could lead to a very intuitive permissions system, where a kerbal is assigned to another player, which would allow them to take over the controls of the vessel. similarly a player that is EVA'd and enters a vessel would also be able to request command of said vessel. If a player has none of their kerbals on a vessel, they can't take control of it, simple as that. For an even more hardcore mode, you can only spectate a ship if one of your kerbals is on board.

Wrap server as a Windows service

Linux can just run the game as a screen, but Windows requires an account to be logged in for any console programs to run in. .NET has wrapper classes to enable a program to run as a service, but this will have to be done in a Linux friendly way.

Add User Options

We need two components for User-Definable Options:

Options File

An options text file should be added where various variables such as keybindings can be exposed. This should be high priority.

Options UI

You can add an 'options' button next to the disconnect button on the status window. This would make sense since you wouldn't need the options button to be accessible when the status window is minimized. This does not need to be as high priority if you can have the options text file.

Connect sometimes hangs after syncing.

After disconnect and reconnect, "You have been disconnected" stays on the screen.

Paste from IRC:
[14:10] Log]: [146.8516] DarkMultiPlayer: Threw in UpdateEvent, exception: System.FormatException: Invalid format.
[14:10] at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in :0
[14:10] at System.Double.Parse (System.String s) [0x00000] in :0
[14:10] at KSPUtil.ParseVector3d (System.String vectorString) [0x00000] in :0
[14:10] at ProtoPartSnapshot..ctor (.ConfigNode node, .ProtoVessel protoVessel, .Game st) [0x00000] in :0
[14:10] at ProtoVessel..ctor (.ConfigNode node, .Game st) [0x00000] in :0
[14:10] at DarkMultiPlayer.VesselWorker.LoadVessel (.ConfigNode vesselNode) [0x00000] in :0
[14:10] at DarkMultiPlayer.VesselWorker.LoadVesselsIntoGame () [0x00000] in :0
[14:10] at DarkMultiPlayer.Client.StartGame () [0x00000] in :0
[14:10] at DarkMultiPlayer.NetworkWorker.Update () [0x00000] in :0
[14:10] at DarkMultiPlayer.Client.Update () [0x00000] in :0

Limit player name character length

Attempting to login with a ridiculously long name will, at least on mac OS, trigger a System.IO.PathTooLongException: http://pastebin.com/FjAMvw7g

However even using an unreasonably long name is currently possible:

I think it would be more reasonable if you capped the length of the player's name to something like 16 or 20 characters, and hardcoded the server browser Player Name field to only hold that many characters (so even pasting in a long name should just be cut off).

Renamed spacecraft show old name to other players

To reproduce:

  1. Player 1 connects to server, creates spacecraft and leaves the default name, launches spacecraft to orbit, then renames craft
  2. Player 2 connects to server, checks the tracking station and sees the old default name

Tracking Center is greyed out

For me under windows. Reopening doesn't seem to matter. Upon further investigation clearing the vessel cache seems to clear it.... which is odd.

Other player's craft doesn't appear for some time

  • Two players sync'd
  • One player launches while other player watches tracking station
  • Couldn't see the craft in tracking station until it hit about 70-80km above Kerbin
  • Neither player used time warp during the launch

Vessel cache can get very big

Mine is 108 megs. That's 1700 txt files, haha. Either have it save two or three servers, clear up old files, or clear upon connection to a new server. MAY also have a side effect of greying out the tracking center.

Connection Failed: error handling SPLIT_MESSAGE message | Disconnected from non-DMP server

[14:07] [DMPUser_788] hi, love your server software but we're getting an error... disconnected cannot access a disposed object... also occasionally getting an error that says cannot connect to a non dmp server... any ideas? everything was working last night
<><><><><>
[14:16] [DMPUser_051] hi, we set up this server / client system the other day, and everything worked fine..then we slowly added mods that we had been using on the KMP system (5 adds so far) and it seems that 2 of us can connect but then it starts giving errors for others who try any idea? the errors are: Connection fail: error handling SPLIT_MESSAGE Message and today's : Disconnecting from a non DMP server (that is running DMP)

Space station disappeared :(

Two nights ago, my and my friend docked a bunch of stuff together in a nice space station around the Mun.

Tonight we logged on and the station was totally gone - no idea what happened. No debris from the station - so it didn't explode (I think). Also, some of the other ships we had (like a rover on the Mun) stayed saved.

Pretty discouraging :s

I attached the latest output log...I'm not really sure if this will have any tips: http://eugk.com/output_log.txt

Server "status" page should be listed in JSON

I was thinking about this, instead of broadcasting the server information like KMP does (Server MOTD: string\nPort: int), it should be a json string, broadcasted to a default port which cannot be modified.

Example:

{
"result" : {
"server_name" : "A Test Server",
"server_address" : "127.0.0.1",
"server_port" : "6072",
"clients" : "1337",
"gamemode" : "career",
"subspace" : "MCW_VOTE"
}
}

Command to send a private message from the server

I had it working, but it's deprecated since it's a feature.

We should get it onto 0.1.4 or wait 'till 0.1.5?

And the API? I know "exactly" how to do it so: make a dll with the functions instead. that way, we can, for example, have a function SendChatMessageToClient(ClientObject client, string message) and use it externally.

Kerbals get left in orbit after EVA

Something is causing multiple Kerbals to be left in orbit after an EVA mission. I do not see duplicates of my personal kerbals, but I see the kerbals of others, even long after they've disconnected from the server.

Invalid DMP message + disconnect

During 2-player testing the other person was sometimes disconnected, server log:
INFO Invalid DMP mesage from :49755
INFO Client x disconnected, sent CONNECTION_END to endpoint :49755

It happened 9 times in about 45 minutes. I was hosting the server and connecting locally. I'm not aware of any connection issues, stable ping around 50-70ms to the other player. Each time the other player was able to reconnect easily.

Development build as listed on the dmp build site:
Tag: d25ca7de9bb33c7bca66d81d2688c2aea6636e11
Build date: Sun May 18 05:50:35 UTC 2014

Change protocol mismatch to something a little more player friendly

It appears from the client-side right now (Dev to Release) it gives EndWrite failure.
Server side it gives protocol mismatch.

Release to dev gives protocol mismatch.
Server side gives protocol mismatch.

It would be nice if the error message read something like:
Your verison x.x.x.x Server version x.x.x.x Update at xxxxxxxx.xx-xx.xxxx.

Unable to unlock parts from previously unlocked scenarios

If a scenario has been unlocked and then mods are added to the server that have parts from those scenarios then they cannot be unlocked. E.g:
Kerbal Engineer Redux adds parts to the start scenario.
When you attempt to unlock these parts clicking on them brings up the Research part and clicking research shows them as being unlocked.
Going to the VAB shows the parts as needing to be unlcoked despite the fact the already have been and going back to the R&D center shows them as being locked again.

Entering atmosphere doesn't drop vessel out of warp

Verrrry annoying. Missed a million captures this way. It also seems like aerocaptures are less effective than in single player. Perhaps because the warp rate is being forced to 1.5x and stopping atmospheric effects on a vessel? just a thought, as for not dropping you out of warp, that's assured.

Cannot quit or return to Space Center

This issue has happened to me once and my friend multiple times (in the ~3 hours that we played together):

Inability to exit the game, disconnect, or return to space center - the only way to leave appears to be alt-f4.

Nothing in particular seems to trigger it - all of the times we were just playing around in orbit, pretty close together I suppose. One time, I was at the space center and he was in orbit and couldn't leave. The other times, we were next to each other in orbit.

We are still able to fly our ships and whatnot...so the game is not "freezing". But you just can't leave :S

Wonder what could be causing this!

API ability toTimeWarp.SetRate to halt warp

Possibly only relevant to MCW_VOTE and my other feature enhancement suggestions (to be posted at the time of writing this - links to those related enhancements will be posted here).

Scenario

A KSP client side plugin needs to stop warp while another player has warp control or to prevent warp voting for a short period of time (and maybe a config option to set lock warp control for num seconds).

theoretical example

TAC life support mod detects that Jool Orbital station 1 is about to run out of oxygen (even though Bob Kerman is still 6 months away with the resupply, Charlie Kermans end of life is imminent).
If TAC decided to support DMP, it could hook into the DMP client and send 'HALT_WARP', 'Jool Orbital station 1 oxygen supply will run out soon'.
The server could then regain warp control and issue the following messages to all players:

If warp is already active, slow and stop warp:
"Warp has been halted - 'Jool Orbital station 1 oxygen supply will run out soon'"

If someone tries to gain warp:
"Warp is unavailable for num seconds - 'Jool Orbital station 1 oxygen supply will run out soon'"

This should give the players some time to address the situation, perhaps discuss or call for help in chat - and then finally continue warp voting.

Flags do not save

Personal flags left on locations are not present after disconnecting and reconnecting.

Craft Library appears to be broken in release 0.1.1.0 but not latest dev

http://imgur.com/b75zwmS

[WRN 14:06:43.909] Vessel Halburry Kerman crashed through terrain on Kerbin
[LOG 14:06:43.911] [119.4174] DarkMultiPlayer: Skipping the removal of vessel 6c3c18e5-048e-4805-965e-0e6a0c4ff559, name: Halburry Kerman, destructions are not valid.
[EXC 14:06:44.788] KeyNotFoundException: The given key was not present in the dictionary.
[EXC 14:06:44.802] KeyNotFoundException: The given key was not present in the dictionary.
[ERR 14:06:44.807] GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)
[EXC 14:06:44.808] KeyNotFoundException: The given key was not present in the dictionary.
[ERR 14:06:44.813] GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)
[EXC 14:06:44.821] KeyNotFoundException: The given key was not present in the dictionary.
[ERR 14:06:44.825] GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)
[EXC 14:06:44.827] KeyNotFoundException: The given key was not present in the dictionary.
[ERR 14:06:44.831] GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)
[EXC 14:06:44.840] KeyNotFoundException: The given key was not present in the dictionary.
[ERR 14:06:44.845] GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)
[EXC 14:06:44.846] KeyNotFoundException: The given key was not present in the dictionary.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.