Jump to content

DarkMultiPlayer 0.3.8.0 [KSP 1.12.0]


godarklight

Recommended Posts

On 10/12/2016 at 10:28 AM, DoctorDavinci said:

Please understand that KSP v1.2 was released less than 24 hours ago and it will take time to adapt the code from this mod to the new version.

 

okay i guess that makes sense.

Link to comment
Share on other sites

Question: by latency of 500 ms is it that the server runs then at 2 fps or I am getting something worng here? Cause DMP as Gooddarklight said in this topic in the past runs at 5 fps as far as I can remember...

Or I am getting it totaly wrong?

Link to comment
Share on other sites

13 hours ago, Nightmare said:

Question: by latency of 500 ms is it that the server runs then at 2 fps or I am getting something worng here? Cause DMP as Gooddarklight said in this topic in the past runs at 5 fps as far as I can remember...

In last year, @godarklight had answered your question that was similar to that.

On 2015/2/24 at 0:21 PM, godarklight said:

@Nightmare: It's currently hardcoded but there's no real reason for it to be, I can move it to a server setting very easily :).

I thought that he could set it easily and but it didn't mean DMP ran stably on every environment.

Then @Dagger said,

On 2016/9/20 at 4:28 AM, Dagger said:

Well the interpolation is what I want to achieve as it what modern FPS implement although my maths are a bit rusty after so many years :) Anyway, I will look into it once I understand how to spawn and update a vessel as I don't know much of the KSP API. Right now vessels that are closer than 20km are updated at 30FPS, the ones that are farther away at 5FPS and the ones that are really far (other planets) at 1FPS

The latency of server won't correspond to the FPS of client, probably.

13 hours ago, Nightmare said:

Or I am getting it totaly wrong?

You shouldn't mind it, I think.

Edited by EBOSHI
Link to comment
Share on other sites

11 hours ago, Nightmare said:

Question: by latency of 500 ms is it that the server runs then at 2 fps or I am getting something worng here? Cause DMP as Gooddarklight said in this topic in the past runs at 5 fps as far as I can remember...

Or I am getting it totaly wrong?

What I meant is that you see the other people 500ms "in the past" (even if you receive the position updates earlier).
Most of the games use this technique (but with less than 500ms) as the UDP packets are unreliable and you can't be sure that they will arrive in a fixed interval. Therefore, you buffer the packets and reproduce them as if you are in the past and interpolate the position of the client between packet updates (otherwise you would see as if the player jumps from one position to another)

People confused it with latency, that is (roughly) the time it takes a packet to travel from one computer to another but actually latency is low as all the time I have around 10+ packets in the queue to be interpolated, that's why I said that you can reduce that "interpolation time" down but then you might run out of packets in the buffer.


You can get more info here:

https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
http://www.gabrielgambetta.com/fpm3.html


And in this video:

https://www.youtube.com/watch?v=6EwaW2iz4iA

Edited by Dagger
Link to comment
Share on other sites

So I've just bought my little brother KSP and was hoping to use DMP to fly rockets together! I went and installed it manually to the right place and the server list on the main menu didn't show up. Then I did a complete reinstall of KSP and used the DMP updater which put the files in the same place and then ran KSP again. Same problem - KSP just seems to be unmodified. I've already done it on my PC and it works like a dream, but it just doesn't seem to install on the other machine. Can anyone give me more ideas to fix it?/tell me what i'm doing wrong? Thx

Edited by Beno11224
miss-spelled 'other'
Link to comment
Share on other sites

2 hours ago, Beno11224 said:

So I've just bought my little brother KSP and was hoping to use DMP to fly rockets together! I went and installed it manually to the right place and the server list on the main menu didn't show up. Then I did a complete reinstall of KSP and used the DMP updater which put the files in the same place and then ran KSP again. Same problem - KSP just seems to be unmodified. I've already done it on my PC and it works like a dream, but it just doesn't seem to install on the other machine. Can anyone give me more ideas to fix it?/tell me what i'm doing wrong? Thx

Make sure that you're both updated to the same versions of KSP, as well as using the correct DMP version. I am fully updated on KSP and use the 942fbbb Dev version of DMP on my client and my server that has 6 of my friends on it and I have no issues. You're using the updater so it is probably not grabbing the dev version that you need if you're fully updated on KSP.

Edited by HellsGuard
Link to comment
Share on other sites

Dagger/godarklight:

Do you have, or can you point me to a howto on how to compile DMP?  The readme didn't have any compilation instructions. I'm trying to compile LunaMultiPlayer but I don't even know the commands.  I was able to clone the repository, but now I'm stuck.

 

I've got some Unity experience, but I don't even know what resources we need for KSP 1.2 or anything else.

 

Thanks,

Lothsahn

Link to comment
Share on other sites

Quote

Hello! I got a question about DMP. Is it multicrew? Can i fly a spacecraft together with my friend? And another question is it laggy a lot or not?

No, it's one craft per person. And...lags depend on connection(ping etc.). But lags is usually 1 second(In 1.1.3). Sometimes synchronization isn't perfect so other person craft explode and then reappear, like at landings. :D It's fun to play with it.

Edited by Toonu
Link to comment
Share on other sites

9 hours ago, Pisatel said:

Hello! I got a question about DMP. Is it multicrew? Can i fly a spacecraft together with my friend? And another question is it laggy a lot or not?

it is not general multi-crew but you can track (can't control) other person's vessel. and when the person release control, you'll have control.
Certainly lags trouble us in some situation. particularly when several vessels stand by each other. But recently, it shows some signs of improvement.

Link to comment
Share on other sites

Overall some great improvements to the mod, dagger!

 

So I managed to compile and run the mod with a friend and I.  

 

Few thoughts:

1) It's definitely a developer build.  So take everything below with that in mind...

2) Interpolation is still not good, but massively better than before

3) We were able to undock a rocket payload (carried under fuselage) from a carrier plane and fly the rocket into space, and land the plane.  Amazing.

4) Crashed.  A lot.  Frequently, especially when recovering ships--there appeared to be some sort of desync errors.

5) Timewarp did not work properly.  Using it didn't warp as expected, and the sync button let me sync backwards in time.

 

Looks like I've got some bug hunting to do.

 

 

Link to comment
Share on other sites

12 hours ago, Lothsahn said:

Overall some great improvements to the mod, dagger!

 

So I managed to compile and run the mod with a friend and I.  

 

Few thoughts:

1) It's definitely a developer build.  So take everything below with that in mind...

2) Interpolation is still not good, but massively better than before

3) We were able to undock a rocket payload (carried under fuselage) from a carrier plane and fly the rocket into space, and land the plane.  Amazing.

4) Crashed.  A lot.  Frequently, especially when recovering ships--there appeared to be some sort of desync errors.

5) Timewarp did not work properly.  Using it didn't warp as expected, and the sync button let me sync backwards in time.

 

Looks like I've got some bug hunting to do.

 

 

Thanks a lot for the review Lothsahn!!

Honestly I didn't managed to try it with a friend so your insights help a lot :)

I'm aware about the problems of the recovering, specially it works bad when the ship has kerbals (legacy DMP code) (EDIT. It sohuld work correctly now), regarding the warp, it's still a work in progress but it will work very different than what you are used to DMP. The idea is that every time you warp yo go to your own "dimension" but you can go to other peoples dimension or to the server dimension whenever you want

About the interpolation... Well yesterday I managed to find a good approach and I uploaded it but I'm stuck with extrapolation...

The issue is that you always see the other player in the past (the miliseconds the messages takes to travel to the server and to your computer) so you will always see the other player plane behind his real position. DMP used a thing called "position fudge" that I also tried to implement in the code but I commented as it just make the vessels shake. 

https://github.com/DaggerES/LunaMultiPlayer/blob/master/Client/Systems/VesselUpdateSys/VesselUpdate.cs#L413

I'm pretty sure that if I manage to extrapolate and "advance" the other client vessels in the space to compensate those miliseconds in the past we would be able to fly in formation and so on....

 

Also, In case I lose interest or for whatever reason the project is abandoned I tried to make the code (specially the client part) as commented and easy to understand as possible (except the small legacy parts from DMP like flag syncing and vessel sharing) if you find some part that you don't understand let me know

Edited by Dagger
Link to comment
Share on other sites

14 hours ago, Dagger said:

Thanks a lot for the review Lothsahn!!

Honestly I didn't managed to try it with a friend so your insights help a lot :)

I'm aware about the problems of the recovering, specially it works bad when the ship has kerbals (legacy DMP code) (EDIT. It sohuld work correctly now), regarding the warp, it's still a work in progress but it will work very different than what you are used to DMP. The idea is that every time you warp yo go to your own "dimension" but you can go to other peoples dimension or to the server dimension whenever you want

About the interpolation... Well yesterday I managed to find a good approach and I uploaded it but I'm stuck with extrapolation...

The issue is that you always see the other player in the past (the miliseconds the messages takes to travel to the server and to your computer) so you will always see the other player plane behind his real position. DMP used a thing called "position fudge" that I also tried to implement in the code but I commented as it just make the vessels shake. 

https://github.com/DaggerES/LunaMultiPlayer/blob/master/Client/Systems/VesselUpdateSys/VesselUpdate.cs#L413

I'm pretty sure that if I manage to extrapolate and "advance" the other client vessels in the space to compensate those miliseconds in the past we would be able to fly in formation and so on....

 

Also, In case I lose interest or for whatever reason the project is abandoned I tried to make the code (specially the client part) as commented and easy to understand as possible (except the small legacy parts from DMP like flag syncing and vessel sharing) if you find some part that you don't understand let me know

Dagger:

 

Still figuring out git--I've not used it much frequently.  Found two things:

1) (Major) A lot of CPU cycles are burned in a busy loop in LidgrenServer.cs:RegisterWithMasterServer().  This is because there's no sleep in the while loop.  I recommend adding the following on line 212:

Thread.Sleep(100);

 

It should go inside the while(ServerContext.ServerRunning) loop, but outside the if block checking the last registration time.  This brings the server CPU down from 100% of one core to idle when nobody's connected.

 

2) (Minor) Since Client.csproj is checked in, I got a conflict from my post build edits and had to resolve them when I pulled your latest changes.  Maybe we should somehow isolate the post build changes from the project changes that may occur, assuming that's easy to do.

 

 

Perhaps we should take this discussion offline to another thread, or a private convo.  I suspect we may start collaborating on the code. :)

Edited by Lothsahn
Link to comment
Share on other sites

Dagger:

 

Testing time sync, and seeing some weirdness:

1) When I come out of time warp (not physics warp), my ship appears to move me back in time to a point between when I started the time warp and where it completed.  It really shouldn't move the ship at all when coming out of time warp.  Time warp on a re-entry trajectory often puts me directly in atmo at low altitude, resulting in instant explosions...  Is this because the planet state is rewinding to server time, and the planets are moving back in their orbit?

2) Physics warping at 4x for about 5 seconds works well until I stop warping.  When that happens, the server time is +1h, and the sun jumps to a new position.

3) I don't understand the purpose of the sync button with regards to server time.  If I time warp an hour in the future, and then I click sync, does it move me back 1h in the past?  I'm confused because the server time doesn't update when I click sync.  Also, if it moves me back in time, does it move me back to a previous point in my launch, or does it just rewind my current orbit?

 

Overall, I don't understand the time sync as is--and explanation would be good so I can understand when I try to work on it.  Overall, I found the DMP time warp to be very easy to understand, but I'm very confused by the "parallel universe" concept.

 

I played on LunaMultiPlayer all evening and didn't find any problems aside from the 3 listed above.  It seems to find problems, we really need multiple people in the game at the same time.  I really need a volunteer who can be available from 10pm-11:30pm EST US on a few weekdays to help me multiplayer test.  It generally won't be fun--lots of server up and down, lots of crashing.  But if you're interested, PM me.

Edited by Lothsahn
Link to comment
Share on other sites

Hi @Lothsahn

Thanks for all your suggestions. I fixed the server issue and also I moved the post build events to a .bat that it's easier to modify.

I agree with you that this should be taken out of this post as we are derailing DMP. I will create the post of this mod the first of november.

Unfortunately I'm in Madrid so that schedule would be impossible for me. Regarding the time warp I didn't even looked at it but I will do it today.

I will write in a PM some instructions on how to work with GIT

Link to comment
Share on other sites

I was hoping to find someone else who could help with testing so I could find issues with them, fix minor issues, and report & leave the complicated ones to you.  So I wasn't expecting you to be available in that timeframe. :)

I'll Google about git--I'm sure plenty of instructions are readily available.

 

 

-Lothsahn

Edited by Lothsahn
Link to comment
Share on other sites

Still looking for a couple testers.  No programming experience needed--just some tolerance for instability and things going wrong--there will likely be lots of bugs!

 

Need to be available from 10-11:30pm EST US weekdays.

Link to comment
Share on other sites

50 minutes ago, Lothsahn said:

Still looking for a couple testers.  No programming experience needed--just some tolerance for instability and things going wrong--there will likely be lots of bugs!

 

Need to be available from 10-11:30pm EST US weekdays.

Hello.

I don't understand details of your recruiting yet but if we can do something, we might be able to help you.

I'm usually operating DMP server and play with some friends. although we almost have no Modding skills.

The timeframe is the only issue, it is about 00:00pm Japanese standard time. so it is uncertain that we can work for it everyday.

Link to comment
Share on other sites

6 hours ago, EBOSHI said:

Hello.

I don't understand details of your recruiting yet but if we can do something, we might be able to help you.

I'm usually operating DMP server and play with some friends. although we almost have no Modding skills.

The timeframe is the only issue, it is about 00:00pm Japanese standard time. so it is uncertain that we can work for it everyday.

I'm at work around that time, so that makes it pretty hard.  I just need people to play with on the LMP server to find bugs.  That's it...  no modding skills needed.

Link to comment
Share on other sites

11 hours ago, Lothsahn said:

I'm at work around that time, so that makes it pretty hard.  I just need people to play with on the LMP server to find bugs.  That's it...  no modding skills needed.

I see. And I guessed what you want is repetitive cycle : test->report->correct or fix->build->release->test, quickly at the same time. will that communications be done on the LMP chat and the certain thread of LMP? Some of us may adjust a schedule to your time, if details be more defined.

I understood that you're rushing and focusing on development of the LMP. But we aren't natural born English speaker, so our responses would be primitive and slowly.

If you are short-handed, we help you with our mousesized hands.

Best of luck.

Edited by EBOSHI
Link to comment
Share on other sites

Dagger,

 

Would you mind if I setup a dedicated server and kept it up to date?  That would allow people to use and test the mod around the world.  I want to make sure you're OK with it before I go do it, since it is your mod.

 

Lothsahn

Link to comment
Share on other sites

6 hours ago, Lothsahn said:

Dagger,

 

Would you mind if I setup a dedicated server and kept it up to date?  That would allow people to use and test the mod around the world.  I want to make sure you're OK with it before I go do it, since it is your mod.

 

Lothsahn

Hi! Sure feel free to do it :) It's not very stable still but the more bugs we found the better.

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