Jump to content

I'm making a multiplayer Mod and would like to discuss some possible implementations


Recommended Posts

- Notcomplex

Vey nice, looking forward for KSP+MP or CO-OP KSP!

Any snapshot or video on your current KSP+MP project?

Keep up the good work :)

It good that players take their challenge to code/program to make KSP multiplayer, even if unsuccessful!

I have been thinking about learning code/programing but I don't know where to start.

I got my eyes on this thread!

Link to comment
Share on other sites

Most of the issues have been solved in terms of UI and general process behavior. What you posted is the same compilation of notes that I had been distributing for some time now, collected from what was perceived to be the best features suggested each time someone brings up the multiplayer subject.

The real technical hurdle remaining is the ability to move multiple vessels simultaneously.

So far nobody has made any progress in that, due in no small part to KSP rendering the effective 'universe' as a 2.5km radius sphere with the active vessel at its center. All objects outside that radius are on rails, with some like planets never leaving their rails.

I wish you luck in this endeavor. Aside from that unknown of how to control multiple vessels, the amount of code required to make this work properly will be quite significant and take a long time to implement. You should really start right out with a SVN or Git system for development so that other people can help, because doing it all by yourself is going to mean taking a very long time.

Sorry if this is too late after the original post, but I have a couple ideas for the universe problem.

The server will simulate all areas in an X radius around ships and other objects (configurable in a serverside file) serverside, but clientside it will only load and display areas around your ships and relevant objects in another clientside-configurable option. This might cause lots of lag if you tried implementing local or LAN multiplayer, however.

I also think that the spectator/observer mode is a great idea! But I think you should have two things added to it: A serverside spectator mode toggle, and a ship-by-ship toggle, for, say, spy satellites or a "Realism" server.

I'm not entirely sure if these ideas will work, or if it's been solved already, but I'd love to see a working multiplayer KSP mod! If you used a flag mod along with it, you could claim planets, and show that bases and planets are your own. It would add an entirely new aspect to KSP.

Link to comment
Share on other sites

i am not a modder and dont know a lot about modding/coding but maybe this is a good idea.

1. warp with request

2. everywan controls his own ship (like in Kerbal LiveFeed)

3.if you get in 2.5km range the game pause and ask if you or he(other player) wants to fly the ships, if you click yes his ship gets loaded in your game and you can dock.

there also needs to be a button to give away your ship.

Link to comment
Share on other sites

I suppose an idea for the warp problem could be a warp drive for multiplayer only? instead of speeding up time using the warp button when you have a warp drive/ computer on board the speed of your individual ship is increased as if you were using the warp functions from single player. Another idea would be jump gates, you launch a jump gate into orbit, lock it onto your destination and set the distance from the destination you want to "warp out" at (re appear), a lot like the Hyper edit plugin but a bit less cheaty, then you fly to the gate in the ship you want to use and activate it, you could also include passwords on the gates so that other players can't follow you though your jump gate and greif you unless they have one of the passwords you've set.

Link to comment
Share on other sites

  • 3 weeks later...

I don't know why everyone wants to have multiple vessels. It could be fun to have one craft be run by multiple players, similar to real life, all with their own responsibilities. But I guess that brings up an equal amount of problems...

Link to comment
Share on other sites

I don't know why everyone wants to have multiple vessels. It could be fun to have one craft be run by multiple players, similar to real life, all with their own responsibilities. But I guess that brings up an equal amount of problems...

Because right now EVA interaction pretty limited (without mods, which further complicate MP). So....other than piloting the ship pretty much just gonna be sitting on your a$$.

Link to comment
Share on other sites

Dear god don't shoot me, but I'm making another multiplayer thread. I really am working on this mod, and have hopes of finishing it. I have no intention of supporting more than 4 players at a time, and I'm totally fine with that restriction.

So here's the major technical challenges I see and possible solutions to them:

Time Warps:

Just do a locking system ... solved. User initiated warp at speed x for game time x which is roughly real time x. Upon every other player accepting the player will have full control of warp for the alloted x game time seconds (could just be set to next maneuver node for easy timing). People will have to wait and communicate, but really so what? Some scenarios will automatically disable time warp like : craft under acceleration, craft has periapsis in atmosphere, craft is undergoing SOI change, etc. This is all about communication and not playing with dicks.

Observation Mode:

In order multiplayer to be fun and not just wainting in boredom, players should be able to warp to other player controlled vessels as a spectator. This way synchronizing warps won't be such a pain because you can just see what your friends are doing while you wait. Honestly don't see any major obstacles with this one, just sit down and code the thing.

Controlling physics for multiple vessels:

This is easy enough if you say each player controls their own vessel and any other vessels/debris on rails are split up evenly and calculations offloaded to separate players. This will become more of a problem as two player controlled vessels are close enough to each other that the vessel is rendered to the scene (I believe this is 2.5km). As the game physics can slow down what an actual second is the easiest way to fix this is just forcing all other players to slow themselves down to the slowest player. This shouldn't be hard in theory as it's just a matter of syncing the Systems Universal Time between all players.

KrakensBane:

This may be unsolvable. Basically the Space Kraken is caused from floating point errors which accumulate the farther you are from Origin, or moving faster than Origin. Both times the delta V or delta R are shifted to move you with the Origin (your vessel becomes Origin basically, or the Origin moves with delta V away from you). So the obvious issue of how can you have multiple Origins becomes an issue.

My current idea which may be impossible is for each player to control their own Origin/Origin speed so that their craft is always stable. As long as these offset values are passed between each client, every ship and celestial body can be remapped from the other clients coordinate system to your coordinate system ( a basis change on a cosmic scale ). Since each player deals with their own physics for their controlled craft and simply passes its vector properties (position speed etc) to the other players KrakensBane is a moot point for everything but your own controlled vessel.

Anyway I'm slowly researching and coding the project and I honestly believe a usable multiplayer for atleast 3 people and probably 4 is completely doable given enough time, but I'd like to know if any of these solutions are viable and any other alternatives / things I'm totally ignoring and are game-breaking.

I was thinking of 2 ways to solve time warp instead of this. 1. You just teleport to your location. 2. You disconnect from the server and the mod opens up a temporary save file and you are in the same place as in the server, but here you can warp, so when your done warping you connect to the server again with your new location being where you stopped warping.

But I could atleast see this working for in atmosphere flights.

Link to comment
Share on other sites

At this point just being able to observe another person's game would be a huge plus. After that being able to tag along as a +1 in a shuttle and move around after they land or in orbit in EVA.

I dont really care about the time skip feature. In a game like this you probably are not going to crash a random person's MP game so even only allowing the server host to control the time would be fine by me.

Link to comment
Share on other sites

Time Warps:

Just do a locking system ... solved. User initiated warp at speed x for game time x which is roughly real time x. Upon every other player accepting the player will have full control of warp for the alloted x game time seconds (could just be set to next maneuver node for easy timing). People will have to wait and communicate, but really so what? Some scenarios will automatically disable time warp like : craft under acceleration, craft has periapsis in atmosphere, craft is undergoing SOI change, etc. This is all about communication and not playing with dicks.

So what you're going for is server wide warp. This solution is often seen as the preferred in multiplayer proposals.

If I, for your consideration, could add my two cents on this type of time warp solution.

When we play KSP there are two timeframes: the in-universe/mission time and our own outgame playtime.

-When you look at playtime players spend the most of this time at warp one. The fraction of time of playtime we spend in accelerated warp depends heavily on the situation, but let's say on an hour played we spend no more than 30% on an accelerated warp. Important is the notion the warp one time is when we do things and have fun while we use warp to skip the boring parts (not completely true, but close enough for this discussion).

-When we look at in-universe time we see something different. On the total mission time we spend only a very small fraction on warp one. Maybe less than 1% for a Mun mission or Kerbin orbit rendezvous and far less for anything more remote. The fast majority of mission time is skipped with accelerated warp.

Because this particular fraction is so small, it means the chance that two players will be at a point in their mission where they have something to do on warp one at the same time is small. It will happen from time to time but most of the time you'll be on transit somewhere while your friend has to do an injection burn to Mun orbit. While your friend does so, you'll be practically standing still and will have to wait through his warp one time. Because this 'warp one and do things' makes up most of the playtime of a mission you will find yourself sitting through most of your friends playtime and vice versa. And that's with only two players.

As you say communication can make a big difference but its difference can only be so big. Landing or deorbiting can be done at any time as long as you don't care where you land, but most things we do on warp one can have no delay, when making a transfer burn we can sometimes wait a few orbits but the burn still needs to occur at a very specific time. Since the chance our warp one actions will overlap is so small no amount of communication can really prevent players from having to sit through the playtime of most other player while they have nothing to do. Even a sychronized mission to the Mun with the exact same rocket might deviate enough when you get there to have players waiting for each other most of the time.

How big an issue this is depends completely one what you're planning to do in multiplayer. But players executing separate missions to kerbin orbit or kerbins moons will quickly run into this. The reason I'm sharing this is because most of above consideration are not apparent when playing single player. We don't feel 'forced' to do a burn when we reached the Minmus SOI, in fact there's little hurry and we have all the time of the world. Similarly if you and me both started a Mun mission in single player while being on teamspeak we might feel we're doing about the same stuff at the same time. These perceptions might obscure the more nasty reality mentioned above.

Edited by PrivateFlip
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...