Jump to content

Simple form of multiplayer, some development questions


Forced1988

Recommended Posts

I'll be interested to see how this works- this is definitely a thread to follow.

I like the solution of simply omitting timewarp- it's a can of worms in multiplayer.

Also, any idea how this would handle mods, OP? I'd assume it'd crash if it were forced to render models that some players didn't have. For that matter, what about launching from the only Space Center at the same time?

Link to comment
Share on other sites

Warp must be included at some point. No-one wants to wait real time hours, or days, for planetary alignments. I think it will have to be a simple agreement by those playing to warp - like readying for match in most other multiplayer games.

I have talked with Frement and it's not my place to repeat what he's said but it sounds like there shouldn't be serious problems with people launching and flying in different locations besides the Space Center. By loading in other player's ships as game objects instead of vessels many of the client issues are avoided.

Link to comment
Share on other sites

Here's a problem and a solution: Say you want to go to Jool and have waited for a time with an hour before launch to build a rocket. Say the server votes to timewarp past your window. What do you do? You can't launch after the window because you would have to change plans and timewarp till you have another window. The solution is to have an estimating device to estimate how long or if a given craft can get to a moon or planet. You insert a desired orbit and body, and it finds the best way for your rocket to get there, and when to launch. Such a thing is probably being worked out, although I haven't seen one on the forums yet. Then you can set your launch time in something similar to that Alarm Clock mod I saw on the forums, and then the server can vote to set timewarp to x1 at that time.

Link to comment
Share on other sites

Warp must be included at some point. No-one wants to wait real time hours, or days, for planetary alignments.

I don't know, I think it would be pretty cool. For me, the most attractive thing about multiplayer would being able to do atmospheric/suborbital dogfights, and there's no timewarp issue there, and there's plenty of docking/station building kind of stuff that can be done within the Kerbin-Mun system. Sure, getting to Jool would be a year-long commitment, but how rewarding would it be to finally make it?

Assuming that there's a central server that is keeping track of the positions of everything, and players "call in" to control their vessels, we can just do other stuff while we're waiting for ships to get to their destinations. As far as orbit intercepts occurring at inconvenient times, that's just something we'll have to deal with, or work around (eg make a minor course correction so that an intercept happens tomorrow afternoon rather than 3 am). It will take a little bit of advance planning, but so does real spaceflight. NASA doesn't get to push the warp button to get their rovers to Mars, and I think the idea of a real-time simulation sounds like a really fun challenge. Of course, it's not everyone's cup of tea, but I think it would be awesome

Link to comment
Share on other sites

How about this:

each planet is basically represented by a server,

the universe is a cluster of servers, once you enter a planet's predefined sphere of range, you are connecting to a server basically....

now to keep things simple - when you connect to a server on a user POV, you choose a server name as you would in any other game,

but this "name" represent a cluster of servers (this is so the same people can go back and forth from planet and meet the same constructions they built \ other people built there.

now as for time warp,

i think we all agree that on a small scale, time warp is doable, a basic all = active basis, time warp priority is dictated by the lowest value among the players in that same planet server,

so if 5 people set warp to >>> and one player set it to >>, the time warp would be >>,

this system is pretty simple in theory, no need for vote prompts, and the coordination on when and how people should warp can be done on a chat system (relevant for that small scale area of a specific server).

how we deal with planetary travels?

i think of having two time warp systems:

1. client side interplanetary time warp

2. multiplayer - small scale - planet specific (server) time warp (shared with everyone on that same planet server).

now these two time warps can be controlled separately.

we consider that most of the activity will be done within a relevant planet's sphere of influence and not during planetary travel (and yes, this is the downsize, you may wont be able to build a space station with a friend as you travel to duna.... i say, "big deal", you can build it when you are both in duna).

now how it works in theory:

the client side interplanetary time warp warps only the solar system itself, the only thing changes are the locations of planets and moons in their solar orbit,

as this environment is warped (completely separated from the online time scale) your craft and the planet server you're in move in unchanged real time scale - so no warping at all.

yes, it means completely separated people can have their solar system oriented in a completely different way, the whole "existence" of the solar system is very much client side for that matter.

what it means in terms of simulation impact? boo hoo the planets wont have a true facing based on their rotation as they should have if the actual time was warped for several years in interplanetary travel, they will however, have their orbital position as far as you are concerned.

so say you and another friend plan to to a trip to duna from kerbin orbit, you both position yourself for the escape burn,

you separately set your solar scale time warp to match your desired burn window,

and then simply burn to escape...

once you leave the planet's sphere of "online realm", you are effectively disconnected from that planet server, and enter some sort of basic online data I\O,

what you do with it? ill explain.

lets say you warped the solar time warp (client side), to the right window in order to escape from kerbin to duna.

your friend got the exact same window, but his is actually two years or more after the window you have in your solar scale.

you can have the option of matching a player's solar time period, since the position and pattern of the solar system is known for each given moment in time,

you can just match your time to be aligned with another player's solar system "time period", so they are effectively matching one another...

why? its convenient, rather than setting it manually for each and every player - if one player set his to the right window, great, the rest can choose to sync their solar system with his, or not... it changes nothing.

but the good thing here, is that a group of players can choose to sync their solar system AND their time warp during the interplanetary travel... (if they go to the same location, burn to escape at the same time, it may be something they would like to do, and ofc - they can choose not to).

if they do sync their solar system and interplanetary time warp, they will "appear" (connect) to the duna server at the same time more or less...

if they dont, one can choose to warp his travel faster for example - and will connect to that planet when enters the duna's sphere of influence... (at which point he is subjected to the local time warp priority for small scale warping operations (orbit, deorbit, escape etc etc).

and lets imagine that the second player doing the same trip to duna chose to take his time, move some parts around in his spacecraft, maybe using a tug to undock and dock a section into another location... it doesn't matter, as its all done client side in interplanetary travel \ environment.

and once he finally reach duna, he will be connected to duna server same as the first player.

downside?

yes it means you can both escape kerbin on the same trip to duna, and each one of you will connect and "appear" on the duna server at a different location, the first player to connect to duna will most likely be further "down the road", completing his capture with the planet etc etc.

does it matter in terms of gameplay? i personally don't think it does, and it does solve the issue of warping on large time scales.

and with the option for people to choose to sync their client side environment (solar system) with a player of their choosing in an instant

its important to mention that the sync of solar env can be done in two manners:

1. snapshot sync - you want the general position of another player's solar system state and maybe even warp more on your own from there.

2. locked sync - it will do a snapshot to sync the time period and "picture" of the solar system state on both players, and will also subject the time warp on that solar system scale to be the same as the "close scale" but only between these two players (it can be 3-4, its basically done by choice of a player to be synced with someone else or not, the other side can accept or reject the request) - and again, at which point, the mechanics of the locked sync players for solar system scale time warp - will work exactly like the one for players in the close scale planet servers (lowest warp scale among the synced players is the one active - simple).

any thoughts? (and yes, i know its long, i apologize - as well as any mistakes that may be in the text, English is not my native language)

Link to comment
Share on other sites

Splitting the universe into different servers is a bad idea. As the data that is required to be passed between client-server is really small. We are talking about 5-15 kB/s. Of course when you connect to a server, the initial transfer needs to be bigger to receive all the vessels and everything, but after that the constant flow of data is small.

EDIT: And when I say 5-15 kB/s, it's when the server has 10+ players online with 10 vessels each.

Edited by Frement
Link to comment
Share on other sites

If we are going to go with large servers with many, many players then I think a local time warp system will have to be implemented. While the solar system is frozen or moves at its own pace (maybe an admin command to change speed), each ship will be able to warp on its own missions.

Link to comment
Share on other sites

Splitting the universe into different servers is a bad idea. As the data that is required to be passed between client-server is really small. We are talking about 5-15 kB/s. Of course when you connect to a server, the initial transfer needs to be bigger to receive all the vessels and everything, but after that the constant flow of data is small.

EDIT: And when I say 5-15 kB/s, it's when the server has 10+ players online with 10 vessels each.

Not sure i follow you... what large amount of data needs to be transferred?

the rendering and positioning of the crafts in the server will be done client side, all the server need to do is transfer 3d grid location of a craft, and the parts names that make up this ship, what is it? few KBs?

besides, a more complex data staging can be done with middle servers keeping persistent info of each planet server, and the client will fetch data from these mid servers rather than from the main planet server and impact performance,

in terms of infrastructure and data transfer we have already more than enough solutions to deal with it, even on massive player counts and data transfers.

the real issue here is time warp, which i think what i suggested in my previous reply (page 3), is a good solution to dealing with time war

EDIT: sorry i think i understand what your point was now,

you may be right, if it is proven not to cause too much strain on performance to have all the planet "sphere" regions on one server, then i guess the concept of planet local scale sphere separation can be done in code,

once you enter the regional sphere of a planet, you are then synced in that bubble with the players in it...

splitting it to server per planet with connecting and disconnection from planet servers as you move can only allow for greater player count in theory.

If we are going to go with large servers with many, many players then I think a local time warp system will have to be implemented. While the solar system is frozen or moves at its own pace (maybe an admin command to change speed), each ship will be able to warp on its own missions.

read my previous reply on page 3

Edited by swifthands
Link to comment
Share on other sites

Lets take an example of 2 players, with 5 vessels each.

It takes 129 bits to update the position of a vessel and 161 bits to update the rotation so 290 bits total. For one vessel the updates per second is: 5800 bits. Now lets multiply that by 5 and we get 29000 bits.

And now we know we need to send 3,625 kB/s to the server.

So, from client to server: 3,625 kB/s

Server is now receiving positions from 2 players at the speed of 7,25 kB/s

Clients will receive each others vessel position updates at the speed of 3,625 kB/s

[Client 1]

Up: 3,625 kB/s

Down: 3,625 kB/s

[Client 2]

Up: 3,625 kB/s

Down: 3,625 kB/s

[server]

Up: 7,25 kB/s

Down: 7,25 kB/s

So as we can see, that is basically nothing. And code can be written which doesn't update the positions of vessels that are out of the 2.5 km range, unless viewing from tracking station.

Link to comment
Share on other sites

Note that there is a tracking station update coming. Not sure how much the backend code will change.

The idea of planetary "servers" is interesting, but consider this issue if you have a large number of players just hanging out on Kerbin...

Player 1 wants to take off and go into space. No warp.

Player 2 is doing an endurance run with an airplane. Wants 3x warp with physics.

Player 3 is orbiting Kerbin to head to the moon. Wants 50x warp on rails.

Player 4 is in high orbit trying to dock parts for a space station. Wants 100x warp.

Player 5 is testing out a solar-powered dune buggy on the planet's surface, and it's dark out. Wants 1000x warp.

If all players are not on the same "mission", it seems sharing any kind of warp will result in multiplayer being unplayable.

Link to comment
Share on other sites

Note that there is a tracking station update coming. Not sure how much the backend code will change.

The idea of planetary "servers" is interesting, but consider this issue if you have a large number of players just hanging out on Kerbin...

Player 1 wants to take off and go into space. No warp.

Player 2 is doing an endurance run with an airplane. Wants 3x warp with physics.

Player 3 is orbiting Kerbin to head to the moon. Wants 50x warp on rails.

Player 4 is in high orbit trying to dock parts for a space station. Wants 100x warp.

Player 5 is testing out a solar-powered dune buggy on the planet's surface, and it's dark out. Wants 1000x warp.

If all players are not on the same "mission", it seems sharing any kind of warp will result in multiplayer being unplayable.

Note that there is a tracking station update coming. Not sure how much the backend code will change.

The idea of planetary "servers" is interesting, but consider this issue if you have a large number of players just hanging out on Kerbin...

Player 1 wants to take off and go into space. No warp.

Player 2 is doing an endurance run with an airplane. Wants 3x warp with physics.

Player 3 is orbiting Kerbin to head to the moon. Wants 50x warp on rails.

Player 4 is in high orbit trying to dock parts for a space station. Wants 100x warp.

Player 5 is testing out a solar-powered dune buggy on the planet's surface, and it's dark out. Wants 1000x warp.

If all players are not on the same "mission", it seems sharing any kind of warp will result in multiplayer being unplayable.

hey mate, thank you for your input!

In regards to the scenario of players hanging outside kerbin,

as i see it in theory is that you login into a server, or rather a "domain" if you will, this "domain" is nothing more than a server cluster,

the domain player limit can never exceed a single planet max player count possible,

so even if the domain is full, and all players on the domain choose to be on kerbin sphere ( \ server), then they will be exactly the max players possible for a single planet, so no scenario of players "pending" outside kerbin without a pending system possible in space travel really.

it could be mitigated if you make the planet servers completely unrelated to one another, and are all load balanced between a huge cluster of every "currently available" server of that planet you are trying to get to,

the problem with doing this is the fact you lose any persistent value in the gameplay,

you could leave kerbin with your station on it, that was on domain 1 server 1,

and when you get back there after a trip to the moon, you actually log in to domain 11 server 20 etc, and ofc - in this case, the station you made will not be there, as its not the same planet server you constructed it on...

so having ONE domain which cover all planet server for THAT specific domain, can give you persistent data.

physics warp can be dropped for multiplayer imo... flying anywhere in atmospheric flight to an extent that actually means something will take a lot of time even with physical warp... same for driving, same for waiting those few minutes for your capsule to touch down after you deploy parachutes,

people can live without those minor boosts to speed.

real time warp on the other hand, should be managed on the low scale of one planet between players,

I am sure there even more solutions that can be found to better meet the complexity that exist on the low scale time warp as well...

maybe having 70k alt of atmosphere and above atmosphere set as different synced \ unsynced regions of that same server instance.

maybe a 3rd layer of sync \ unsynced can also exist above 300k alt etc etc...

just to provide some more layers of flexibility and less dependency on the entire player list on that same planet server for doing or not doing time warps, ofc whoever is with you on that same layer \ ring of sync must meet time warp with you as stated before.

i believe the real issue is how to deal with interplanetary travel time warping, as the real problem is having people agree to timewarp on their orbital operations for the length of time required to do a time warp, ie:

player 1 traveling to jool,

player 2 traveling to the mun.

having a group of people agree to enter timewarp to complete orbital maneuvers is easy.

having them agree to warp for 2-3 years so someone else can reach jool, is a serious issue...

this is why my idea completely ignore the interplanetary realm, yet very much keep it as part of the game almost seamlessly.

i think this method could work, or at least it sounds like the best plan on how to go with it (thus far).

i am eager to hear more opinions on this method \ ideas of other methods as well.

Link to comment
Share on other sites

Or simply send a packet to server informing of clients timewarp, removing clients vessels from everyone and after it has finished, adding them again. I mean, this is seriously the smallest problem.

Link to comment
Share on other sites

Or simply send a packet to server informing of clients timewarp, removing clients vessels from everyone and after it has finished, adding them again. I mean, this is seriously the smallest problem.

As long as the motion of planets is also handled, then that's fine. The simpler, the better.

For something perhaps more challenging, grief control! Some suggestions...

- All colliders and raycasts from other player's parts and vessels are disabled by default. Also activated by selecting a target on the map. Default on for "friends". When this changes a notification is sent to the other player.

- While other player's parts and vessels are visible by default, they can be "muted" so a player does not see them on a case-by-case basis.

- Admin ability to ban players. Hopefully not necessary as griefers won't be able to do much and thus will move on.

Link to comment
Share on other sites

I think the mod should be configurable to the point that stuff could be disabled server-side. All that stuff would be nice if you're on a public server, but it would just get irritating if you're trying to run, as an example, a small competitive game with your friends.

I also don't think that solution to warp is optimal. It essentially leads to people inhabiting parallel timelines if someone can complete a Jool transfer in the same (real-life) time it takes someone else to reach orbit. Again, I think the key here is configuration and alternate methods, because this wouldn't be an issue for some people.

Link to comment
Share on other sites

Nobody remembers this but Khyperia made a proof of concept multiplayer mod, it loaded to crafts into a client and they appeared in game.

It can be found on their github. https://github.com/khyperia/Khylib/blob/e0171d5f34911bba3dfd6c1f1975d3b2d627a3d2/Kestrel.cs

It would take a while to clean up the code but it is a good starting point for anyone who is serious about making multiplayer, or even co-op a reality.

Link to comment
Share on other sites

Note that there is a tracking station update coming. Not sure how much the backend code will change.

The idea of planetary "servers" is interesting, but consider this issue if you have a large number of players just hanging out on Kerbin...

Player 1 wants to take off and go into space. No warp.

Player 2 is doing an endurance run with an airplane. Wants 3x warp with physics.

Player 3 is orbiting Kerbin to head to the moon. Wants 50x warp on rails.

Player 4 is in high orbit trying to dock parts for a space station. Wants 100x warp.

Player 5 is testing out a solar-powered dune buggy on the planet's surface, and it's dark out. Wants 1000x warp.

If all players are not on the same "mission", it seems sharing any kind of warp will result in multiplayer being unplayable.

In that case, it should go to 1x warp, and when the launch is finished, 3x warp, then 50x warp when the plane's endurance run is finished, then 100x warp when the Moon's SOI is entered, then 1000x warp once the station is docked.

Not difficult to handle at all. It also doesn't introduce any unneeded complexity (guys, the whole point of multiplayer is that you play with your friends, having each player on their own server with it's own timewarp level sort of defeats the purpose)

EDIT: And if Players 3, 4 and 5 get frustrated waiting...

"Buddy, you're holding everything up with your plane. Can you go over to a different server for it."

"OK sure, I'll Skype you"

Edited by Holo
Link to comment
Share on other sites

its simple just dont have warp

i dont remember warping anywhere in M$flight sim when my friend was having fun on his 10 hour flight half way around the world from uk Newcastle to (India) with his 737 and i decided to take off from the same airport 3 hours after he did in my SR71 to intercept him for the fun of it and when i say air port i mean some poor guys back yard its a mod what can i say iv never been good at M$flight sim and it tuck me an hour to catch up to him

having him land his f16 on my floating homeworld carrier just to see if you could land on it it was crazy amusing when we found you could lol

but it would be good to have a races across kerbin in jets or buggies or both lol make a jet that carries a buggy ... maybe play destruction derby lol there's a lot you can do with mp in ksp

Link to comment
Share on other sites

What people are failing to mention is what tracks the player as an entity? Does a player just assume a nickname? an entity of some sort? like a kerbal?

If the latter, I could join my buddy Timmy's game, and assume the role of one on the kerbals on his vessel. If by player we are entities without form, able to spawn multiple times into any vessel/kerbal then we could assume the role of any vessel or kerbal in the game so long as it isn't currently controlled by another player... much like [ or ] within range.

You wouldn't even need various warps if this was the case, simply join a game/group and pick from a list of available vessels/kerbals/etc to control.

There are so many variables to this that it isn't even funny. And everyone has a different ideal of what it 'should' be. Really it comes down to whoever is doing the work will dictate what it will become.

"Tim stayed up all night... we have a base on the moon, a ship in orbit around Jool... and a guy stranded in the artic..."

A) Cool I'm gonna start my own ship, or B) I'm gonna assume the role of the ship around Jool!

Edited by InfiniteDice
Link to comment
Share on other sites

What people are failing to mention is what tracks the player as an entity? Does a player just assume a nickname? an entity of some sort? like a kerbal?

If the latter, I could join my buddy Timmy's game, and assume the role of one on the kerbals on his vessel. If by player we are entities without form, able to spawn multiple times into any vessel/kerbal then we could assume the role of any vessel or kerbal in the game so long as it isn't currently controlled by another player... much like [ or ] within range.

You wouldn't even need various warps if this was the case, simply join a game/group and pick from a list of available vessels/kerbals/etc to control.

There are so many variables to this that it isn't even funny. And everyone has a different ideal of what it 'should' be. Really it comes down to whoever is doing the work will dictate what it will become.

"Tim stayed up all night... we have a base on the moon, a ship in orbit around Jool... and a guy stranded in the artic..."

A) Cool I'm gonna start my own ship, or B) I'm gonna assume the role of the ship around Jool!

Ok, the basics:

  • View the server list
  • Join a server
  • Create a vessel and/or control your previous vessels
  • Fly around, get into orbit, whatever
  • Chat with other players on server
  • Quit

All of your vessels will appear on other players screens if they are in 2.5km range in flight scene, always on tracking station. Your player name will be visible on other players above the vessel.

Obviously there needs to be some sort of authentication. Username + password, registration to master server, authentication through master server, you receive a session id which is sent to the server you're going to play on, and the server is going to query master server if you are allowed to connect or not. The password needs to be different from the one on KSP forums and store for obvious reasons, even thought the password is never stored as plain text.

You can set your vessel as public, which means anyone can control it. You can set your vessel to be accessible by a group you create, then only certain people will be able to control it. Or set it only usable by yourself. Vessels that are not public can't be destroyed by crashing into them, it will only destroy the vessel which is colliding with it.

You can mute players from your chat, you can send a private message to anyone, basically the chat is following IRC protocol with limitations. All these limitations are configurable on server-side.

The master server(s) handles:

  • Authentication
  • Server list
  • Global ban list (from trusted servers)

The server handles:

  • Local ban list
  • Chat
  • Player vessels

Feel free enlighten me on whats missing.

Link to comment
Share on other sites

You wouldn't even need various warps if this was the case, simply join a game/group and pick from a list of available vessels/kerbals/etc to control.

What if the player, after taking control of a ship, wants to fly from Kerbin to Jool?

its simple just dont have warp

i dont remember warping anywhere in MSflight sim when my friend was having fun on his 10 hour flight half way around the world from uk Newcastle to (India) with his 737 and i decided to take off from the same airport 3 hours after he did in my SR71 to intercept him for the fun of it and when i say air port i mean some poor guys back yard its a mod what can i say iv never been good at MSflight sim and it tuck me an hour to catch up to him

having him land his f16 on my floating homeworld carrier just to see if you could land on it it was crazy amusing when we found you could lol

but it would be good to have a races across kerbin in jets or buggies or both lol make a jet that carries a buggy ... maybe play destruction derby lol there's a lot you can do with mp in ksp

10 hours to India is completely different to 2 years to Eeloo. The two experiences have nothing in common.

Link to comment
Share on other sites

My intention of this form of multiplayer is to create a space station with multiple people, or set up a base on the mun, more things would require timewarp.

Timewarp fcks everything up for multiplayer.

I guess. Keep it out for now. It could be possible as a "voting" system only, with a "deactivate/veto" for each player, so anyone can deactivate, only if all agree does it activate. Plain and simply, it would be a joint MISSION, so no time warping separately. It would be co-op, so this lessens the need for concurrent time warping too.

The only other option is to only allow syncing of other players ships when both players are not time warping, and then time warping the other player to match the longest mission duration player (a force to time warp to catch up before syncing).

There are few ways you could do a timewarp:

  • A public vote
  • Admin command (forced)
  • Setting timewarp for current player, and disallowing any further actions until everyone else have used the same amount of timewarp

Well, the admin command should be available always.

Yes, basically this.^ :P

If possible, aim for the co-op first, the MMO later. In co-op, everyone works together, so the rover is driving to the launch craft (player 1), the launch craft is getting a new fuel supply drop (player 2), The orbital craft is changing it's orbit (player 3). When 1 and 2 are waiting for 3 because the Kerbin orbiter got lost in orbit around the mun, they can use the VAB, launch some probes etc for fun. Once everyone is happy there is nothing vital to do, they vote for timewarp, and anyone (or admin only) can drop out to fine tune/continue the next leg of the journey. Additionally a "warp to position/date" feature would help, as Mechjeb has.

Edited by Technical Ben
Link to comment
Share on other sites

Or simply send a packet to server informing of clients timewarp, removing clients vessels from everyone and after it has finished, adding them again. I mean, this is seriously the smallest problem.

This looks like a good idea. I think you should add a global time for people to allow each other to sync up their times with each other. Or simply just add a button to sync your time up with someones. An idea would be to only allow you to do this when you aren't moving (meaning you've landed or are playing as a Kerbal) so there would be no chance of this killing you through collision, or only allowing you to when you have a safe orbit so you wouldn't crash either. You could also only allow this sync option when in the space center. This mainly seems possible for syncing forwards in time (like a normal timewarp), but I don't see why you couldn't allow people to sync their times backwards to someone in a earlier time. You should also add an indicator showing who's in the same synced time as you yo make things easier.

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