godarklight

DarkMultiPlayer 0.3.4.0 [KSP 1.8]

Recommended Posts

@Dagger I would think it would be something like this:

Vector3 Approach3d(Vector3 vecGoal, Vector3 vecCurrent, float deltaStep)
{
	Vector3 vecInterpolated;
	vecInterpolated.x = Approach(vecGoal.x, vecCurrent.x, deltaStep);
	vecInterpolated.y = Approach(vecGoal.y, vecCurrent.y, deltaStep);
	vecInterpolated.z = Approach(vecGoal.z, vecCurrent.z, deltaStep);

	return vecInterpolated;
}

float Approach(float flGoal, float flCurrent, float deltaStep)
{
	float flDifference = flGoal - flCurrent;

	if (flDifference > deltaStep)
	{
		return flCurrent + deltaStep;
	}
	if (flDifference < -deltaStep)
	{
		return flCurrent - deltaStep;
	}
	return flGoal;
}

Where vecGoal is your target location in 3d space, vecCurrent is your current location in 3d space and deltaStep is how far you can move each frame.

You just call Approach3d and use it's return value to set the vessel's new location each frame until you get a new location to go to from the server.

But I have no idea what the deltaStep should be set too because I don't know what 3d unit KSP uses. So you'll have to experiment.

I hope this helps.

Share this post


Link to post
Share on other sites

Thanks Caylis for the suggestion!

I've been preparing the framework for interpolating positions today but @jrodriguez gave me a new idea. Instead of interpolate the movement of the vessel based on position updates, get input updates and apply the input yaw,roll,throttle,etc to the client vessel, probably we would still need some kind of "security position interpolation" in case something bad happens but I'm investigating both possibilities.

I'm a bit lost in the KSP and Unity API so it might take some time.

Edited by Dagger

Share this post


Link to post
Share on other sites

Anything that can provide more predictable outcomes when players are maneuvering in close proximity gets my vote... as is, DMP mostly consists of 'hold still while I do this to you' :o

Share this post


Link to post
Share on other sites

While KSP is being updated. We have a time to play Career Mode or something like that alone. And we have a time to be anxious about whether or not we can multi-play on the new version.
Multi-playing of KSP is the best game among games I have ever seen.

Share this post


Link to post
Share on other sites

Hey All,

 

Running DMP 0.2.3.1, ksp 1.1.3.1289..

I seem to have a issue with saving kerbal contracts. Every time a contract is taken out to save a kerbal in orbit, the poor bugger never spawns so makes it impossible to recover him/her.

Checked integrity and other clients are having the same issue, checked the DMP log and i cant see anything that would be stoping or cleaning the object out.

Any ideas ?

 

Thanks

Share this post


Link to post
Share on other sites
3 hours ago, lordgeorge said:

Hey All,

 

Running DMP 0.2.3.1, ksp 1.1.3.1289..

I seem to have a issue with saving kerbal contracts. Every time a contract is taken out to save a kerbal in orbit, the poor bugger never spawns so makes it impossible to recover him/her.

Checked integrity and other clients are having the same issue, checked the DMP log and i cant see anything that would be stoping or cleaning the object out.

Any ideas ?

 

Thanks

Confirming we've had the same issue.  Maybe it's because Kerbals (and tourists?) are a shared resource whereas contracts are not... but I really don't know how it works, tbh.

Share this post


Link to post
Share on other sites

Hi Guys, still a long way to go but interpolations are finished (at least for ground movement) and is much more smooth.

Here you can see a small video I've done about it: https://youtu.be/_5kSkvrIsHk

Perhaps someone can adapt the code to DMP and use it while I finish my fork.

 

Edited by Dagger

Share this post


Link to post
Share on other sites
39 minutes ago, Dagger said:

Hi Guys, still a long way to go but interpolations are finished (at least for ground movement) and is much more smooth.

Here you can see a small video I've done about it: https://youtu.be/_5kSkvrIsHk

Perhaps someone can adapt the code to DMP and use it while I finish my fork.

 

Hi Mr. developer, I'm a player playing with DMP server and client.
Your work seems so great. but I'm sorry about me having no Modding skill at all. So I can't understand "adapt the code to DMP". Can it be done by amateur?
There is nothing to do but I shared it on Twitter. If you need a helping ant's hand, we do our bit. 

I hope you good luck!

Share this post


Link to post
Share on other sites
21 minutes ago, EBOSHI said:

Hi Mr. developer, I'm a player playing with DMP server and client.
Your work seems so great. but I'm sorry about me having no Modding skill at all. So I can't understand "adapt the code to DMP". Can it be done by amateur?
There is nothing to do but I shared it on Twitter. If you need a helping ant's hand, we do our bit. 

I hope you good luck!

Unfortunately DMP is not easy to modify, the code has many hacks and it's quite outdated so you need to have some experience.
Hopefully I will finish my fork this month :)

 

Share this post


Link to post
Share on other sites
10 hours ago, Dagger said:

Unfortunately DMP is not easy to modify, the code has many hacks and it's quite outdated so you need to have some experience.
Hopefully I will finish my fork this month :)

 

Okay. I keep on expecting your future activity. but don't overtire yourself.

Share this post


Link to post
Share on other sites
1 hour ago, moritz31 said:

Can someone tell me if it is possible to play the 1.2 game version with the 1.1.3 version of DMP ?

 

If you said about DMP, it is adapted to only 1.1.3. And if it about DMP fork, below.

On 2016/10/3 at 10:49 PM, Dagger said:

Here you can see a small video I've done about it: https://youtu.be/_5kSkvrIsHk

Although I'm in ignorance of production version, at least he seems to be experimenting with 1.2.
if you see the above video that was posted by @Dagger, you can confirm build-number at bottom-left of windows.

Edited by EBOSHI

Share this post


Link to post
Share on other sites

@EBOSHI

thanks for the information

 

 @Dagger
I'm study IT and have basic knowledge of c#, maybe i can help you a little bit here and there :wink:

Edited by moritz31

Share this post


Link to post
Share on other sites
20 hours ago, moritz31 said:

@EBOSHI

thanks for the information

 

 @Dagger
I'm study IT and have basic knowledge of c#, maybe i can help you a little bit here and there :wink:

Thanks for the offer @moritz31! :)

If you want you can compile the code with VS2015 and start digging around. If you feel confortable and understand what's going on we can speak and distribute the tasks.

Code:https://github.com/DaggerES/DarkMultiPlayer

Right now the fork is compatible with latest 1.2

 

Edited by Dagger

Share this post


Link to post
Share on other sites

I've done the bare minimum (merged whatever rocky did, and then fixed a few compile errors for the unstable branch to 1.2), but it has had 0 testing, and KSP is now insanely crashy on linux so I cannot test it at all, so I highly recommend using forks. This might kick your dog and kill your cat, but the build is on my build server in my sig (unstable branch)

 

I've also been working quite a lot lately, and have moved onto another game so I've not had much time for DMP. When I do get some time I'll let anyone who has forked pick my brain for a bit, but I apologize in advance for the mess that is DMPClient :P

Share this post


Link to post
Share on other sites
50 minutes ago, godarklight said:

I've done the bare minimum (merged whatever rocky did, and then fixed a few compile errors for the unstable branch to 1.2), but it has had 0 testing, and KSP is now insanely crashy on linux so I cannot test it at all, so I highly recommend using forks. This might kick your dog and kill your cat, but the build is on my build server in my sig (unstable branch)

 

I've also been working quite a lot lately, and have moved onto another game so I've not had much time for DMP. When I do get some time I'll let anyone who has forked pick my brain for a bit, but I apologize in advance for the mess that is DMPClient :P

You shouldn't apologize, without DMP I wouldn't even know from where to start :wink: 

Share this post


Link to post
Share on other sites
1 hour ago, godarklight said:

I've done the bare minimum (merged whatever rocky did, and then fixed a few compile errors for the unstable branch to 1.2), but it has had 0 testing, and KSP is now insanely crashy on linux so I cannot test it at all, so I highly recommend using forks. This might kick your dog and kill your cat, but the build is on my build server in my sig (unstable branch)

 

I've also been working quite a lot lately, and have moved onto another game so I've not had much time for DMP. When I do get some time I'll let anyone who has forked pick my brain for a bit, but I apologize in advance for the mess that is DMPClient :P

I have spent lots of time on DMP with my friends. And it have being express the potential of KSP. 
We thank you and your activities! ...Well, although we had been often confused by operations of it:kiss:.

Share this post


Link to post
Share on other sites
On 2016/10/9 at 5:52 AM, Program Kerbal Space said:

How do i create a server? and do i have to port forward?

If you talk about the DMP0.2.3.1 for KSP1.1.3, you should just download it, unzip it, execute it, and open a port.

And you can see the DMP official site https://d-mp.org/.

Edited by EBOSHI

Share this post


Link to post
Share on other sites
8 hours ago, EBOSHI said:

If you talk about the DMP2.2.3 for KSP1.1.3, you should just download it, unzip it, execute it, and open a port.

And you can see the DMP official site https://d-mp.org/.

define execute and what you mean by unzip it

Edited by Program Kerbal Space

Share this post


Link to post
Share on other sites
1 hour ago, Program Kerbal Space said:

define execute and what you mean by unzip it

Google is your friend ... if you Google it the information will come

It would be much easier for you to take a look at the DMP website listed in the post above you as well as look up what those terms mean and perhaps read the following as it may help you understand how to install a mod

 

Share this post


Link to post
Share on other sites
18 minutes ago, DoctorDavinci said:

Google is your friend ... if you Google it the information will come

It would be much easier for you to take a look at the DMP website listed in the post above you as well as look up what those terms mean and perhaps read the following as it may help you understand how to install a mod

 

well i didnt want to go trough the trouble finding the right definitions but thx for your help

Share this post


Link to post
Share on other sites

Here is an idea:

What if we packaged vessels together and created a single rigid body for each vessel upon launch and disabled everything else (except the mesh renderers and collision meshes for the rest). Then we could only send updates on the location of just that body instead of all the parts separately. We could still interpolate and crudely calculate physics based on some drag value and mass, but we'd only need to approximate between updates. If a collision occurs all we do is enable the components and remove them from being parented to unified body.

Share this post


Link to post
Share on other sites
3 hours ago, Damowerko said:

Here is an idea:

What if we packaged vessels together and created a single rigid body for each vessel upon launch and disabled everything else (except the mesh renderers and collision meshes for the rest). Then we could only send updates on the location of just that body instead of all the parts separately. We could still interpolate and crudely calculate physics based on some drag value and mass, but we'd only need to approximate between updates. If a collision occurs all we do is enable the components and remove them from being parented to unified body.

I've also thought over it and I almost approve of your idea. But I have no idea whether MOD can do that or not.
Certainly, DMP have the trouble with all player's individually calculation of physics. So the algorithm of who calculate which vessel should be needed. And it must allot a portion of the calculation of the vessel that isn't operated likes satellites and space station each.

Share this post


Link to post
Share on other sites
On 6.10.2016 at 10:29 AM, Dagger said:

Thanks for the offer @moritz31! :)

If you want you can compile the code with VS2015 and start digging around. If you feel confortable and understand what's going on we can speak and distribute the tasks.

Code:https://github.com/DaggerES/DarkMultiPlayer

Right now the fork is compatible with latest 1.2

 

hey dagger, is there a centralized way of changing the postbuild event paths ?

Share this post


Link to post
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.