Jump to content

DarkMultiPlayer 0.3.8.0 [KSP 1.12.0]


godarklight

Recommended Posts

As for surface positioning, DMP does not yet interpolate along the velocity path which is why you see planes jumping back and forward in flight - This would be a very easy feature to implement and should help things a great deal, so long as I don't go interpolating people into the ground ;). Disappearing is likely caused by KSP killing vessels in atmosphere as they get put on rails, which isn't something I have a lot of control over, and although the "pack" range can be increased, it makes the game lag quite badly when mods do this.

Can't wait for it, if it's good enough so you can get hits with weapon mods it will be just a matter of the mod supporting multiplayer for epic dogfights and tank battles.

Link to comment
Share on other sites

My friend is trying to join my server but he gets a "Server didn't respond in time" message. Does anyone know how to fix this?

I can't figure out what server IP I use while hosting and what server IP I give to my friends for them to connect.

Update: It looks like it could be a firewall issue. I have been trying for hours now to get the port to be allowed but to no avail. Someone told me to use my own IP address, but that doesn't work either. I even completely cut off the firewall and it still didn't work. Just to make sure, it is port 6702 I want to allow, correct? Because I have allowed it on my computer and router settings but it still will not work. Also, which IP do I put into the router settings to allow? The DMP server, my WAN or LAN, or one of the other countless IPs?

In the GUI I get this error too:

[01:37:34][iNFO] : Error setting up server, Exception: System.Net.Sockets.SocketException (0x80004005): Only one usage of each socket address (protocol/network address/port) is normally permitted

at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)

at System.Net.Sockets.Socket.Bind(EndPoint localEP)

at System.Net.Sockets.TcpListener.Start(Int32 backlog)

at DarkMultiPlayerServer.ClientHandler.SetupTCPServer()

Edited by snashkille
Link to comment
Share on other sites

@snashkille: The key word is port forwarding. You need to setup port 6702 from your router being forwarded to your local (LAN) IP's port 6702. You should be able to google how that can be done for your specific router.

The WAN IP address is the one your router uses to communicate with your ISP and thus the web. This is the IP your buddy needs to enter to connect to your server. Not sure what "other countless IPs" you found. Every device in your local network has a LAN IP (everything "behind" the router, usually 192.168.x.x. This can be your computer, your laptop, your network printer, your smartphone, your TV...), and a single WAN IP, which basically is the address of your internet connection (other side of the router) in the web. The router handles your LAN IPs, the WAN IP is being handled by your ISP.

If an outside connection needs to send you data on a specific port, it will arrive at the router first (WAN IP and port). The router however doesn't know which device in your LAN needs this data to, so it drops it. By setting up a port forward, your router knows that this particular data should be forwarded to the specified device.

Link to comment
Share on other sites

@StarDrive85: In about 1-3 hours after I get my hands on 0.25 until there's a version that "works" for dev. As for specific 0.25 bugs, that could take up to a week. However, I'll have to encourage people to use dev for the time being, I'm not releasing 0.1.6 until I nab all the features I want in DMP, and I'm estimating the end of october (Plus, releasing the "finished" version of DMP the day that KMP was first release would be nice).

Since the media group has released the KSP 0.25 videos, I suspect it will be out within 1-3 days if we look back at KSP's history :).

@Dacan: Rotations are currently set, but they aren't interpolated. I'm not familiar enough with quaternion interpolation with angular velocity to accurately guess how that would work. Would probably be a worthy goal to figure out though.

TCP isn't faster than UDP because of the speed-of-light / processing delay you still have. TCP sucks when you try to stuff a lot of things down the pipe, but you'll get the same thing if you implement TCP-on-UDP which is what most games / libgren does :).

I try my best to keep the pipe empty - DMP only queues 1 message at a time, and there's injection points for high priority messages every 8kb, which shouldn't be too much lag for most people.

@SeventhArchitect: Most mods should just work, but you'll need to edit (or generate with Options -> Generate DMPModControl.txt) a DMPModControl.txt file for the server that includes the mods / mod parts. If you have the same game data folders and this is a private server, you can also turn mod control completely off.

By default, vessels with modded parts will not get synced to the server. There's also an option that completely prevents launching.

@tetryds: Most of the mod support burden actually lies with DMP - As DMP mostly works like single player (except other vessels spawn in and move around...), then most mods should (and actually do) work. The only place it gets iffy is when 1 client sees something that didn't happen in the other clients frame of reference (physics are calculated client side still - but just updated from other players) - Which is exactly what happens with weapon mods, as they likely kill individual parts from a ship, when the other client never saw them fire in the first place.

There is upcoming mod-support for mods to hook into already in dev, but DMP needs a relicence (unlicence is my current proposal) in order to allow non-GPL mods to use DMP's network system. And I also need to write a reflector for a soft dependency on DMP :)

@snashkille: While Senshi is completely correct about port forwarding, that's not what your error log is telling me.

"System.Net.Sockets.SocketException (0x80004005): Only one usage of each socket address (protocol/network address/port) is normally permitted" tells me something is already running on that port. If you're already running DMPServer, that explains it and it likely was a port forwarding problem, otherwise you'll need to pick a different game port in DMPServerSettings.txt.

Link to comment
Share on other sites

@tetryds: Most of the mod support burden actually lies with DMP - As DMP mostly works like single player (except other vessels spawn in and move around...), then most mods should (and actually do) work. The only place it gets iffy is when 1 client sees something that didn't happen in the other clients frame of reference (physics are calculated client side still - but just updated from other players) - Which is exactly what happens with weapon mods, as they likely kill individual parts from a ship, when the other client never saw them fire in the first place.

There is upcoming mod-support for mods to hook into already in dev, but DMP needs a relicence (unlicence is my current proposal) in order to allow non-GPL mods to use DMP's network system. And I also need to write a reflector for a soft dependency on DMP :)

Great, then that is why you can only destroy a target when both are completely still, and it can cause a lot of debris spawn, often not causing damage to the other player.

Would a temporary workaround be actually spawning launched missiles on the side of the client who is targeted (for missiles)?

And another question, when there are two players and an uncontrolled vessel, who is processing it's physics? Both? The server?

Link to comment
Share on other sites

Two (stupid) questions:

  1. How do you test DMP without adding a piece of code, restarting KSP, tweaking that same piece of code, recompiling, and repeating until the build looks stable? I mean, doesn't that take a bit longer than 2 hours?
  2. Would DMP be worthy of having unit tests? (Not that I know anything about unit testing.)

Link to comment
Share on other sites

@snashkille: While Senshi is completely correct about port forwarding, that's not what your error log is telling me.

"System.Net.Sockets.SocketException (0x80004005): Only one usage of each socket address (protocol/network address/port) is normally permitted" tells me something is already running on that port. If you're already running DMPServer, that explains it and it likely was a port forwarding problem, otherwise you'll need to pick a different game port in DMPServerSettings.txt.

I went into task manager to close down all DMPservers that were running but it still will not work. I will post below some of the info I need to get it running.

Hosts IP used in DMP to connect: (Unknown)

Port: 6702 (by default)

IP given to players wanting to connect to Host's DMP server: (Uses WAN IP presumably)

Port: 6702 (by default)

I have went into Windows Firewall and allowed the port by adding a new rule in the "Windows Firewall with Advanced Security" page. I have tried to allow the port on my router, though honestly I have no idea what IP to put in the Port Forwarding section. In the part where it asks for "Internal IP address", I have tried IPv4, IPv6, default gateways, IP subnet mask, and the routers IP. Either it applies and nothing happens, or I get a "Invalid IP address, please enter it again" message.

Link to comment
Share on other sites

I went into task manager to close down all DMPservers that were running but it still will not work. I will post below some of the info I need to get it running.

Hosts IP used in DMP to connect: (Unknown)

Port: 6702 (by default)

IP given to players wanting to connect to Host's DMP server: (Uses WAN IP presumably)

Port: 6702 (by default)

I have went into Windows Firewall and allowed the port by adding a new rule in the "Windows Firewall with Advanced Security" page. I have tried to allow the port on my router, though honestly I have no idea what IP to put in the Port Forwarding section. In the part where it asks for "Internal IP address", I have tried IPv4, IPv6, default gateways, IP subnet mask, and the routers IP. Either it applies and nothing happens, or I get a "Invalid IP address, please enter it again" message.

The internal IP is your local IP.

Go on the adapter settings, status and details, its the IPv4 Address.

If your local IP is not fixed, make it fixed so you don't need to change it on the router every time.

Link to comment
Share on other sites

two (stupid) questions:

  1. how do you test dmp without adding a piece of code, restarting ksp, tweaking that same piece of code, recompiling, and repeating until the build looks stable? I mean, doesn't that take a bit longer than 2 hours?
  2. would dmp be worthy of having unit tests? (not that i know anything about unit testing.)

The struggle.

EDIT: Compiling takes like 2 seconds, though.

Edited by dsonbill
Link to comment
Share on other sites

Two (stupid) questions:

  1. How do you test DMP without adding a piece of code, restarting KSP, tweaking that same piece of code, recompiling, and repeating until the build looks stable? I mean, doesn't that take a bit longer than 2 hours?
  2. Would DMP be worthy of having unit tests? (Not that I know anything about unit testing.)

Use a trimmed down version of KSP's GameData and you can load it in seconds.

Dl has a video of what its like to debug DMP.

Link to comment
Share on other sites

Use a trimmed down version of KSP's GameData and you can load it in seconds.

Dl has a video of what its like to debug DMP.

This is the most recent thing I've found:

Dang, he's a lot better at this than I am. For starters, he has a workflow. I mean, look at that liberal usage of hotkeys and the clean desktop. Unlike me, he doesn't have 5 different explorer windows open at the same time and 7 tabs open in Firefox. Second, he doesn't seem to debug as much. I mean, you see him restarting KSP a couple of times for some reason, but his debugs-per-line ratio is lower than mine! :D

Just looking at people like him makes me wonder why I wasn't taught good project management/workflow skills. :(

Link to comment
Share on other sites

@SeventhArchitect: Most mods should just work, but you'll need to edit (or generate with Options -> Generate DMPModControl.txt) a DMPModControl.txt file for the server that includes the mods / mod parts. If you have the same game data folders and this is a private server, you can also turn mod control completely off.

By default, vessels with modded parts will not get synced to the server. There's also an option that completely prevents launching.

Uhm...I want to attempt it, but I'm not entirely sure what you just told me I needed to do.

What I'm wanting to do is make it to where me and my friends can play on one server with modded parts.

What do I do?

Link to comment
Share on other sites

@darklight

Can i suggest some features for 0.16?

What DMP really needs, is Co-Op. This being:

Shared science.

Shared funds.

Shared tech tree.

Shared contracts.

I know this is possible, as right now, you can just copy the scenario folder, from one player to another :)

I have been playing with this for quite a while, but my modpack makes my game freeze if i rejoin a server.

This means that i have to exit and reload KSP every time my friends make progress. which sucks.

Also, the co-op sharing being realtime, means that i don't have to move folders around all the time. :D

Edited by kasperhangard
Link to comment
Share on other sites

Harro!

If I understood the readme correctly, in order to join a game, the list of my installed mods should match that of the server. If there's a mismatch, either the server doesn't use mods which I use or the other way around, the list of mods should be modified.

My question is, what is the easiest way to do that? Having to take a backup of my actual Gamedata and Saves folder and placing those somewhere else each time seems like a hassle.

Looking forward to any good tricks!

Link to comment
Share on other sites

@tetryds: For weapons mods, I suspect the only sane thing to do would be to let *them* hook into DMP and tell the other player which parts were killed, likely with plugin-glue between a weapon mod and DMP (I haven't yet written the public domain plugin API reflector for inclusion into other projects). This does imply client side trust though so it's exploitable, but it's probably a risk people will have to accept for now.

As SRB missiles are actual vessels, they should work assuming the lag is low enough (I've still got more to do in this area)

@longbyte1: Those aren't stupid questions at all - they are very valid ones :)

The first: I had this exact same question for gimp when he was active in the KMP project, the answer is you don't. Disabling the music helps preserve some of your sanity :).

Monodevelop gives quite sane warnings and compile errors which takes most of the problems away, and the debug window video above was quite a simple GUI, I copy+pasted the methods I needed from another window :P. I have a fairly good idea of what I need to do before I start coding, Generally I'll get ideas away from the PC and then try to implement them in either a simple test program or just directly into DMP. If I don't like the approach I've taken but the code does work, I'll put it in a branch, push it to github, and then start again using the first branch as a reference ;).

Compiling takes around 5 seconds, so that's not to big a problem, and I made a command that compiles and copies the mod to gamedata which saves a few seconds each time. Symlinking DMP doesn't work due to the incorrect install detection, perhaps I should disable that on the debug builds :P

Unit testing is basic automatic "does this work" type of testing. I've thought about adding unit tests to speed up debugging for docking and positioning problems, and I actually did write a unit test for KillVessel, but it totally wasn't worth it as it always passed :(.

(Second post)

I don't *really* have a workflow, I usually iterate a few times and I like testing things early to see if I'm on the right track, hence the "Ehhhyupp" and "Noooope" buttons. It took me a while to figure out how to say "DMP contacts the server you're connecting to!" without freaking people out over it. DMP does not phone home :). Some of that video was waiting for someone else to test it to confirm I haven't broken all the things, someone did actually point out that DMP didn't start from a fresh install in that video I think... But that wasn't from the debug window :)

Also I was never taught project managment / workflow skills, programming has *always* been a hobby for me, I've never ever worked in the IT industry. Everything you see I kind of learned by myself (or via some googling) :P. As far as my management of DMP, there's not all that much to manage, if a PR works and doesn't make me tear out my eyeballs, it will get merged. If I have a problem with the way it does something I'll mention the change needed, but it's good to catch me in IRC, I'll always answer questions there quickly if I'm online :)

@snashkille: Leave DMPServer bound to 0.0.0.0 in the server settings file, connect to it with 127.0.0.1 locally, and give other people your public address. I should probably add www.canyouseeme.org to my sig, It's handy for testing.

@dsonbill: The hardest part is waiting for KSP to restart...

@inigma: I'm a stock player when I actually do play KSP, so I have the stock parts there still. The wait is bad, but it's not too bad if you can get a lot done in one go. The hardest bit is figuring out KSP weirdness where I constantly need to restart KSP to try and make some variable value match what I expect.

@SeventhArchitect: DMPServer doesn't really do "kspy" things, nor does it run mods. The plugins folder is specifically for DMPServer plugins, of which there aren't many, and almost certainly no mods use this system yet. DMPModControl.txt just tells the clients what mods they are allowed to have and what parts are allowed to get synced to the server. A mod control file can be automatically generated from your own GameData folder (It hunts for all the parts and part adding mods), you'll just have to move it from your KSP folder to your DMPServer folder.

DMPServer doesn't work like a minecraft server - It's mainly a message relay that allows syncing to the latest subspace (It only holds the latest state), not a server side physics simulator - which is why it should use nearly no CPU and nearly no ram, only bandwidth, and is why you don't put GameData mods in the DMPServer plugins folder ;).

@kasperhangard: Shared* are all the same feature, and it will be built on top of groups, so you can have different groups with shared science/funds/contracts/kethane/etc, basically anything in the Scenarios/ folder of DMPServer.

I'm a co-op player (as opposed to a pvp one), and this feature has been long overdue :).

I might be able to help with debugging a freeze though, but you'll need to catch me on IRC.

@Kerbrud: You're correct, DMPServer just sends a list of mods that you need to have or not have, along with the parts allowed on the server.

And yes, messing around with gamedata is a pain, which is why I will one day port KMPModClient (which basically connected to a server and did automatic shuffling between GameData and folder called GameData-cached). Some people may use multiple installs or gamedata folders for this purpose.

If there's a mismatch, you get this:

http://godarklight.info.tm/data/kmp/darkmultiplayer/darkmultiplayer17-failed-modcheck.png

Edited by godarklight
Link to comment
Share on other sites

@Kerbrud: You're correct, DMPServer just sends a list of mods that you need to have or not have, along with the parts allowed on the server.

And yes, messing around with gamedata is a pain, which is why I will one day port KMPModClient (which basically connected to a server and did automatic shuffling between GameData and folder called GameData-cached). Some people may use multiple installs or gamedata folders for this purpose.

If there's a mismatch, you get this:

http://godarklight.info.tm/data/kmp/darkmultiplayer/darkmultiplayer17-failed-modcheck.png

Thanks for the reply! Oh well, as long as all connected parties agree upon the Gamedata-setup, and start off with a new save, then I guess I'll manage!

Cheers!

Link to comment
Share on other sites

Im running the latest DMP server and client build, and KAS.

I run occasionally now into a really freaky catastrophic bug with KAS and DMP. I twitched it last night, only to realize I wasn't recording.

It seems most easily duplicable in a new DMP server environment. Two fuel trucks, stock parts, freshly spawned off the runway, then connected via KAS fuel pipe - makes the linked new vessel disappear, or even simply ripping off a fuel port and reattaching it to a vessel makes that vessel disappear. Entirely. Gone from the universe. Nothing to send home to mama Kerbals. After a while though, and I'm not sure what event causes it, but the server stabilizes and linking between vessels works, and so does removing and reattaching things.

However, even in late game, even after vessels have existed for some time, even on a reload of the server, linking or attaching causes vessels to disappear entirely from existence before the hapless Kerbal's eyes. Only continued testing will have this new bug zeroed in on. Just thought I'd report it here.

Link to comment
Share on other sites

@Everyone: KSP 0.25 has dropped and I've done a very initial port to 0.25, but DMP isn't in a position to do a new release just yet - So I'll encourage people to use the development version for now.

If you're using DMPUpdater.exe, you can rename it to DMPUpdater-development.exe to update to the latest development version.

@inigma: That is almost certainly PartKiller playing up - it's supposed to remove illegitimate debris or bits that break off vessels. dsonbill: I'll try to reproduce it but I might need a few eyeballs just incase I miss something.

Link to comment
Share on other sites

dson and gdl: I'll work on duplicating the bug to the best of my ability. (I sound like a Danny fan, don't I?) Youtube and all. If I can. ;) For fun I'll do it in .25 and the latest dev build of the server and latest KAS.

Link to comment
Share on other sites

@inigma: If I had to guess, it's caused by using a kerbal to dock two vessels together that you don't control or have update locks for.

Get two rovers, Player 1 EVA's, player 2 switches to the other rover that was eva'ed out of (therefore having both the update locks for the rovers, banning updates from the kerbal player 1), and then get the kerbal (player 1) to dock the two ships together.

This may not be solveable though - There's many cases where allowing this type of thing would break gameplay, this is kind of the same category as allowing weapon mods to work correctly.

Link to comment
Share on other sites

@Everyone: KSP 0.25 has dropped and I've done a very initial port to 0.25, but DMP isn't in a position to do a new release just yet - So I'll encourage people to use the development version for now.

If you're using DMPUpdater.exe, you can rename it to DMPUpdater-development.exe to update to the latest development version.

@inigma: That is almost certainly PartKiller playing up - it's supposed to remove illegitimate debris or bits that break off vessels. dsonbill: I'll try to reproduce it but I might need a few eyeballs just incase I miss something.

Sorry I am new to this mod. When you say use the Development build, do you mean of KSP(if there even is one, i have no clue) or the DEV build of the mod? If so how do i obtain the dev build?

Link to comment
Share on other sites

Sorry I am new to this mod. When you say use the Development build, do you mean of KSP(if there even is one, i have no clue) or the DEV build of the mod? If so how do i obtain the dev build?

He's talking about the development build of the mod itself. So instead of putting the updater file into your KSP root folder and launching it to install/update the mod files, you rename the updater to DMPUpdater-Development.exe and run it. It'll give you the latest build of the DMP mod.

On another note; I just did this, and DMP doesn't show up in the main menu now. It did before I ran the dev build updater. Any clue as to why this happens?

Link to comment
Share on other sites

Has anyone else had extreme difficulty with Asteroids in DMP?

In a recent game, I got myself attached to one, hooked up several smaller probes with RCS on them around the asteroid to help it turn, then in the main vessel tried rotating the asteroid to make the burn and something very wrong and artificial was making the asteroid "spring" back every time I tried to rotate it. I know asteroids are large and hard to turn, but this was different from the usual behavior. Pushing more and more just caused the oscillations to get bigger, rather than actually making any real progress toward rotation. it was as if something was holding the asteroid in place and turning it only caused the spring back when I let go to be stronger.

I never had this outside of DMP.

Link to comment
Share on other sites

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...