-
Posts
132 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by Dagger
-
I'm terrible at maths but definitely, tomorrow I will try to do it and contact you if I get stuck. Thanks a lot for the guidelines
- 12 replies
-
- interpolation
- orbit
-
(and 2 more)
Tagged with:
-
Yes, I would say that it's always east. Or at least when flying around KSC it's always like that I also tried to fix that by setting this code but with no success: planetPos = Vessel.orbitDriver.referenceBody.getPositionAtUT(lerpTime) Vector3d vector3d = Vessel.orbitDriver.driverTransform.rotation * Vessel.localCoM; Vessel.SetPosition((planetPos + Vessel.orbitDriver.pos) - vector3d); I'm very sure I'm missing something but my math knowledge and specially KSP positioning is really bad
- 12 replies
-
- interpolation
- orbit
-
(and 2 more)
Tagged with:
-
Hi, in order to implement a safer interpolation mechanism on LMP I store the orbital positions in a queue and replay them after 2 seconds have passed. The code looks something like this: var startTime = KspOrbit.epoch; var targetTime = Target.KspOrbit.epoch; var currentPos = KspOrbit.getRelativePositionAtUT(startTime); var targetPos = Target.KspOrbit.getRelativePositionAtUT(targetTime); var currentVel = KspOrbit.getOrbitalVelocityAtUT(startTime) + KspOrbit.referenceBody.GetFrameVelAtUT(startTime) - Body.GetFrameVelAtUT(startTime); var targetVel = Target.KspOrbit.getOrbitalVelocityAtUT(targetTime) + Target.KspOrbit.referenceBody.GetFrameVelAtUT(targetTime) - Target.Body.GetFrameVelAtUT(targetTime); var lerpedPos = Vector3d.Lerp(currentPos, targetPos, LerpPercentage); var lerpedVel = Vector3d.Lerp(currentVel, targetVel, LerpPercentage); Vessel.orbit.UpdateFromStateVectors(lerpedPos, lerpedVel, LerpBody, Planetarium.GetUniversalTime()); KSPOrbit is the first packet Orbit, Target.KSPOrbit is the next packet, and on every fixed update frame that code is called. In order to ignore FlightIntegration issues I only call this when vessels are PACKED (OnRails) (I will deal with FI later) The LerpPercentage is a value between 0 and 1 that increases on every fixedupdate call The movement is very fluid BUT the positions are displaced kind of "backwards" This is for example a screenshot I took with 2 clients side by side: Here the player 1 is flying above that wide line in the runway: https://imgur.com/0oPcYHH But the player 2 sees this: https://imgur.com/HlEmoxJ I understand the GREEN distance as the vessel is 2 seconds behind and it will take some time to reach the runway but I don't understand why it's displaced sideways (red distance) Also, I tried to set this code: var lerpTime = LunaMath.Lerp(startTime, targetTime, LerpPercentage); Vessel.orbit.UpdateFromStateVectors(lerpedPos, lerpedVel, LerpBody, lerpTime); But then the orbit is rendered in real time (not 2 seconds behind in time) and the vessel goes inside Kerbin a lot of times and there are weird movements. I think there's some orbital calculation that I'm missing but I can't find how should I proceed on this... I even tried specifying the position manually as: Vector3d vector3d = Vessel.orbitDriver.driverTransform.rotation * Vessel.localCoM; Vessel.SetPosition((planetPos + Vessel.orbitDriver.pos) - vector3d); But I didn't had luck Does someone have an idea of how I should implement this? It's honestly one of the oldest LMP bugs and I've been dealing with this for months and not making much progress. EDIT: If I reduce the interpolation delay time to 300ms or so the movement is almost perfect (there's still that sideway distance altough much shorter) but I want to set a 1 or 2 seconds delay for bad connections
- 12 replies
-
- interpolation
- orbit
-
(and 2 more)
Tagged with:
-
You can serialize the protovessel to a config node, then the config node to a string. You can check the code on LMP. https://github.com/LunaMultiplayer/LunaMultiplayer/blob/f2192f0cbbfa74df6a698dffa3ec29c73d76e681/Client/VesselUtilities/VesselSerializer.cs
-
I do exactly as you do @linuxgurugamer on LMP. I must reproduce part syncronization over network so for example if a player extends a ladder it's extended in the other clients aswell. Some part modules have events (when storing/transmitting science experiments for example) but most part modules don't so I run trough every part module at an interval to check for changes. I wish every "KSPField" triggered an event when they are modified but unfortunately that would need to be done by Squad EDIT: Of course if you do your own partmodule you should do what MOARdV say but if you want to detect changes in the squad part modules (ModuleEngines, ModuleLight, etc) you need to do it with a loop
-
Yes. I'm fixing that behavior. As you are on nightly version some work is still not finished
- 208 replies
-
- 1
-
-
- luna
- multiplayer
-
(and 1 more)
Tagged with:
-
Not really about those mods, but there was a guy on the discord that wanted to do it and he made a page about it https://github.com/LunaMultiplayer/LunaMultiplayer/wiki/Supported-mods if you manage to test some other mods let us know to add them
- 208 replies
-
- luna
- multiplayer
-
(and 1 more)
Tagged with:
-
Where Is Multiplayer?
Dagger replied to PalmettoSC's topic in KSP1 Suggestions & Development Discussion
Dude you need to come around the LMP discord, I would love to finish the sync between BDA and LMP!- 58 replies
-
- 2
-
-
- kerbal space program
- multiplayer
-
(and 3 more)
Tagged with:
-
Hi, I don't officially support mods but I can have a look at it if it's easy enough to spot it and it doesn't require a huge code change. For that I will need the KSP.log of your brother after the error happens to see where is the error
- 208 replies
-
- luna
- multiplayer
-
(and 1 more)
Tagged with:
-
The second bug it's already fixed but on nightly only About the first one I will try and see if it happens for me... EDIT: Both bugs fixed for next version!
- 208 replies
-
- 2
-
-
- luna
- multiplayer
-
(and 1 more)
Tagged with:
-
Mass of a Kerbal
Dagger replied to linuxgurugamer's topic in KSP1 C# Plugin Development Help and Support
No idea about the reason but IIRC you can get it from the part (part.mass) of the vessel -
No, you can't. That's actually one of the features of LMP and it was highly demanded. In the future we've planned to add "companies" so it's only shared between players inside companies but that won't happen until LMP is rock solid in terms of stability and bugs
- 208 replies
-
- luna
- multiplayer
-
(and 1 more)
Tagged with:
-
You can try reading the KSP.log. Usually the mods that fail are USI, BDArmory, Kerbalism or similar mods that modify the behaviour a lot
- 208 replies
-
- luna
- multiplayer
-
(and 1 more)
Tagged with:
-
That's probably some mod messing around
- 208 replies
-
- luna
- multiplayer
-
(and 1 more)
Tagged with:
-
Nope. It's on the to-do list but no new content will be added until LMP is Rock solid and without bugs. Bda is not supported. A specific plugin for syncing is needed as with DMP but there are no plans on doing that from our current team atm
- 208 replies
-
- 1
-
-
- luna
- multiplayer
-
(and 1 more)
Tagged with:
-
I never used hamaci so I don't know if that might be the problem. Is it really needed? You can create a password protected server if you want to make it private and now LMP even uses upnp to open the ports.
- 208 replies
-
- luna
- multiplayer
-
(and 1 more)
Tagged with:
-
Hi. Regarding the first bug I'm working on a fix for that. As a workaround deactivate and activate again interpolation trough the settings screen. https://github.com/LunaMultiplayer/LunaMultiplayer/issues/129 About the second bug, dekessler should only remove "debris" but perhaps it's a bug, please create a new github issue and attach both server universe, player logs and try to write the reproduction steps. This way I can reproduce on my machine and check what might be the issue https://github.com/LunaMultiplayer/LunaMultiplayer/issues/new
- 208 replies
-
- luna
- multiplayer
-
(and 1 more)
Tagged with:
-
Just released a new version that supports interpolation and is updated for 1.4.3. Hope it's not buggy but bear in mind that this is the first working version of it. In case of bugs you can disable it in the options screen
- 208 replies
-
- 1
-
-
- luna
- multiplayer
-
(and 1 more)
Tagged with:
-
Exception with custom making history node
Dagger replied to tomf's topic in KSP1 C# Plugin Development Help and Support
I'm not very experienced on MH mods but the Fire() method seems like a coroutine so instead of returning: return Enumerable.Empty<int>().GetEnumerator(); I would just do: return 0 or other parameter that fills your needs. +Info about coroutines on unity: http://www.unitygeek.com/coroutines-in-unity3d/ -
En realidad no es tanto problema por ksp sino por los mods. Muchos de ellos no están muy bien optimizados
-
El mod "Principia" añade fisica de N-cuerpos (la cual permite puntos de lagrange) y añade inclinacion a los planetas. Es bastante complicado y aumenta mucho la dificultad pero vale la pena probarlo
-
If a player has low and another player has high there's > 1m height difference between them and ground positioning doesn't work (vessels clip inside terrain or fly)
- 208 replies
-
- luna
- multiplayer
-
(and 1 more)
Tagged with: