• Content count

  • Joined

  • Last visited

Community Reputation

39 Excellent


About Dagger

  • Rank
    LMP Developer

Contact Methods

  • Website URL https://github.com/gavazquez
  • Skype gabriel.spain

Profile Information

  • Location Madrid, Spain

Recent Profile Visitors

953 profile views
  1. [1.3.1] Luna multiplayer (LMP) - Alpha

    I just released a new version.... Includes several performance fixes and also better compatibility with linux. Besides this, now kerbals are synced inside a vessel so if a vessel is transfered from one part to another, the spectator sees those changes aswell. Latest version: Here
  2. Hola chicos yo he creado un mod para multijugador y hace pocos días lo hice público en el foro general, si me queréis ayudar a testearlo y tal aquí os paso el link del post en inglés:
  3. MultiPlayer!

    It just involves dropping a folder in the GameData directory, here you have a document that explains how to install LMP: https://github.com/gavazquez/LunaMultiPlayer/wiki/How-to-install-LMP
  4. Licence: MIT (you don't have to ask me for permission if you want to make a fork ) Description: Around March-2016 I started a fork of DMP to include UDP network messages but it finally evolved to a totally different program. Still, LMP would never exist without the work done by @godarklight as uses some of its concepts and some code snippets from his mod. If you want to support this project, consider donating trough paypal The mod still has some bugs but I'm confident that it can be released as an alpha. Anyway, if you want to report a issue, please do so on github If you want to collaborate testing new versions or help us in development join us in the discord chat In order to implement interpolation we need some person with maths + orbits knowledge that could help us do it Main features: Clean and optimized code architecture, based on systems and windows which makes it easier to read and modify. Multi threaded (as much as Unity allows) Settings saved as XML. Time synced between clients and the server using the NIST servers. UDP networking using the Lidgren library for reliable UDP message handling. Uses interpolation (still buggy) so the vessels shouldn't jump from one place to another. Nat-punchtrough feature so a server doesn't need to open ports on it's router. Servers are displayed within the mod. Better creation of network messages so they are easier to modify as you don't need to take care of serialization. Every network message is cached in order to reduce the garbage collector spikes Based on tasks instead of threads. QuickLZ for fast compression Caveats: Linux is still not 100% supported as we need some linux developer to help us Sometimes weird bugs appear Only sandbox mode has been tested No mods support still (please test it using stock only) Much testing is needed... Links: Oficial Github repo: https://github.com/gavazquez/LunaMultiPlayer/ Official website: http://lunamultiplayer.com Download from: Website or GitHub Wiki (WIP): https://github.com/gavazquez/LunaMultiPlayer/wiki Discord chat: https://discordapp.com/invite/S6bQR5q Collaborators: @Dagger Developer @Lothsahn Developer @SupperRobin6394 Website development @godarklight Assesment & DMP code @Toonu Testing + Documentation The hellbox - Testing (linux)
  5. DarkMultiPlayer [KSP 1.3.1] [Alpha]

    If I manage to solve some few issues I hope to have a stable release for begginings of december... It all depends on the testing.
  6. DarkMultiPlayer [KSP 1.3.1] [Alpha]

    Thanks a lot!! For the moment I'm testing LMP toguether with some collaborators, I still don't release LMP because I want it to be more stable but if I run into some issue definately I will contact you
  7. Perhaps you can have a look at this library: https://github.com/pardeike/Harmony it was created for rimworld in the beginning Changing the code that is already compiled is a hard task...
  8. DarkMultiPlayer [KSP 1.3.1] [Alpha]

    It's not abandoned ;-) I'm still developing it, I had a pause in July of about 3 months but in september I took it again. In fact now the performance is much better as I recycle the network messages and implemented several multithreaded stuff, also vessels positions and docking now works fine Still there are several things to improve such as: 1- Screens are working with the old system of "OnGUI" that generate tons of garbage and must be moved to the new system 2- I'm still not happy with the network message recycling system that I implemented few days ago as there are some cases where it fails... (It's really a quite complex thing as messages are created in several threads at the same time) 3- Warp system is still not 100% done and I must go trough all the cases. 4- At the moment the vessels are transformed to protovessels in order to update their position in the server with a method called "BackupVessel". This method is bad in terms of performance and I'm finding other solutions for this... 5- Spectating other player vessels specially if they are in the ground generate issues 6- Lots of testing to be done For such reasons LMP is not public but if you have programming knowledge and want to help me just send me a PM
  9. Move unpacked vessels

    Hi @sarbian Another option that I saw is what principia uses. Would it be more compatible with other mods? 1- It runs a function in the TimingManager.obsenceearly and sets the vessel.precalc.enabled=false 2- In another function in TimingManager.Onprecalc it calls the vessel.SetPosition. Then it sets precalc.enabled=true and calls precalc.MainPhysics
  10. Move unpacked vessels

    I think I've found a solution... 1: Subscribe to onVesselPrecalcAssign 2: When it's triggered, assign your customVesselPrecalc (that inherits from VesselPrecalculate) class to the vessel that is being created 3: Assign that vessel to your customVesselPrecalc (supposedly this shoudn't be needed but otherwise precalc.vessel is null) 4: Do an override of MainPhysics and assign the received transform pos and rot before calling base.MainPhysics
  11. Hi. I'm trying to move NON packed vessels in a multiplayer mod that I'm making. The issue is that the vessel shakes horribly and I don't know what might be happening. I don't have a problem doing it with packed vessels but I think that the flight integrator is messing with me when the vessel is unpacked and I don't know what parts should I touch to do so. The full code: https://github.com/DaggerES/LunaMultiPlayer/blob/master/Client/Systems/VesselPositionAltSys/VesselPositionAltUpdate.cs#L153 Rotation = new Quaternion(rot[0], rot[1], rot[2], rot[3]); Position = Body.GetWorldSurfacePosition(lat, lon, alt); Vessel.checkSplashed(); Vessel.checkLanded(); Vessel.vesselTransform.rotation = Rotation; Vessel.vesselTransform.position = Position; Vessel.SetRotation(Rotation, true); Vessel.SetPosition(Position, false); Vessel.latitude = lat; Vessel.longitude = lon; Vessel.altitude = alt; foreach (var part in Vessel.parts) part.ResumeVelocity(); Hopefully someone can help me with this, I feel like I'm close to finish this multiplayer mod but the movement is very jerky and I don't know what parts should I look at.
  12. Hi sarbian, thanks a lot for your answer. I changed the code so all the other player controlled vessels are packed (by editing the vesselRanges) and it seems much better and smooth
  13. Hi, I'm doing a fork of DMP and I'm having problems when updating a vessel position. The idea is that aproximately every 30ms I receive a message with a vessel position, I store it in a buffer and I apply it on the fixedupdate to the corresponding vessel in a way that I always have 1 packet in the buffer (otherwise the vessel would stop moving until I receive the next one and the movement would jitter) Between those 30ms between packets I interpolate the vessel position with the function Lerp. but still, when flying in formation and at high speeds the vessel jitters and "jumps" in it's movement, even if it's packed or unpacked. Here is the code that I use for the vessel positioning. private void ApplySurfaceInterpolation(float interpolationValue) { //interpolationValue is a value between 0 and 1 to do the Lerp logic. //Velocity components are sent as vessel.rb_velocityD var currentVelocity = GetInterpolatedVelocity(interpolationValue, currentAcc); Vessel.latitude = Lerp(LatLonAlt[0], Target.LatLonAlt[0], interpolationValue); Vessel.longitude = Lerp(LatLonAlt[1], Target.LatLonAlt[1], interpolationValue); Vessel.altitude = Lerp(LatLonAlt[2], Target.LatLonAlt[2], interpolationValue); var worldSurfacePosition = Vessel.mainBody.GetWorldSurfacePosition(Vessel.latitude, Vessel.longitude, Vessel.altitude); var startWorldPos = new Vector3d(WorldPosition[0], WorldPosition[1], WorldPosition[2]); var targetWorldPos = new Vector3d(Target.WorldPosition[0], Target.WorldPosition[1], Target.WorldPosition[2]); var currentWorldPos = Vector3d.Lerp(startWorldPos, targetWorldPos, interpolationValue); Vessel.SetPosition(worldSurfacePosition, true); Vessel.CoMD = currentWorldPos; var startOrbitPos = new Vector3d(OrbitPosition[0], OrbitPosition[1], OrbitPosition[2]); var targetOrbitPos = new Vector3d(Target.OrbitPosition[0], Target.OrbitPosition[1], Target.OrbitPosition[2]); var currentOrbitPos = Vector3d.Lerp(startOrbitPos, targetOrbitPos, interpolationValue); Vessel.orbit.pos = currentOrbitPos; Vessel.SetWorldVelocity(currentVelocity); } Is there something I'm missing or some other vessel position variable that I must send?
  14. DarkMultiPlayer [KSP 1.3.1] [Alpha]

    Hi! Sure feel free to do it It's not very stable still but the more bugs we found the better.
  15. DarkMultiPlayer [KSP 1.3.1] [Alpha]

    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