jellysnake
Peasant
Woo! I run all teh comps!
Posts: 9
|
Post by jellysnake on Feb 14, 2015 11:02:14 GMT
Okay, so I read that multiplay is not going to be officially supported so if we want multiplayer it will have to be modded in.
Before I continue I would just like to say that although I can make programs and games, nodding something I have never been very good at so if my ideas are impossible. Let me know.
To start with, this whole post revolves around the idea that there is a central server and then all the clients connect to it. Kinda like Minecraft.
So, the biggest hurdle with multiplayer that I have seen is the problem of computing power. To get around this I propose that the processing is split between all the machines connecting. There are two ways this could happen. 1. Each client does its oen machine and the server does the other calculations, sends the data around and makes sure that each client is using the same randomness(the things that make identical designs different) This would mean that each client only has to run its own machine. 2. The server utilises the processing power of all the machines to do the calculations needed. By this I mean that if person A has a beefy gaming rig and person B has a little notebook the server will dump most of the calculations on person A and and thus less on person B. The server would also be included in the sharing of tasks. Of the two I feel that option 2 is better. But option 1 would be easier to implement.
The other major issue I can think of would be slowing down/speeding up time. Simply, this would be disabled on the clients, they would use the speed of the server. If the game was being overloaded the server could also decrease the time to help improve framerate (to a limit however)
If the server had mods then the clients would also need the mods. The server does not need to have the clients mods however.
To run a server perhaps an option would be possible from the main menu to start a server. You could then also pick a level and settings. Most importantly though it would not close the game so you could connect to the same server or play single player while having a sever running.
I think that is all, feel free to tell me that this idea is rubbish and can't be done but please say why.
|
|
|
Post by Zeblote on Feb 14, 2015 11:35:58 GMT
Computing power isn't really a problem, you could just play at a lower timescale if required. The real problem is that the physics engine isn't deterministic.
It produces different results each time even on the same machine and there seems to be no way to change that.
|
|
jellysnake
Peasant
Woo! I run all teh comps!
Posts: 9
|
Post by jellysnake on Feb 14, 2015 11:47:40 GMT
If it is making different values then there has to be some element of randomness. What if the server was the one that supplied that randomness. Then all the clients would work off that.
|
|
|
Post by spaar on Feb 14, 2015 12:07:47 GMT
Unfortunately it isn't as simple as the devs putting a RNG in there, you may want to take a look at the thread Same design different results. So, to actually make physics work properly for multiplayer, either the engine would have to be made deterministic (which would probably be difficult even for the devs to do, not even speaking of doing so via modding) or the server would have to do all of the physics calculations, and leave the clients mostly doing rendering (which would also be quite a radical change. I believe this is also what Minecraft does, since you mentioned it)
|
|
|
Post by Zeblote on Feb 14, 2015 12:14:21 GMT
If it is making different values then there has to be some element of randomness. What if the server was the one that supplied that randomness. Then all the clients would work off that. It's not randomness - it's just that the engine isn't deterministic. There are many factors involved, like floating point errors, fixed time step not being /that/ fixed, unity's physx wrapper, etc. Nvidia even says it themselves that physx can't guarantee any determinism.
|
|
|
Post by fiddlekins on Feb 14, 2015 19:24:55 GMT
The engine being non-deterministic only hinders multiplayer where clients both independently compute what's going on. Jellysnake's suggestions are such that regardless of how the calculations are shared between the machines there's still only a single instance of each of them and consequently there's still a single overall simulation, rather than the multiple ones you'd have if clients did it independently.
Thoughts on sharing calcs between machines: - If it's only able to work on a single thread, I'd imagine that you can't share calcs between machines. But there's talk of Unity 5 enabling multithreading, so... - Presumably it would be done by allocating each machine a portion of the blocks to calculate for - So for each time interval a machine would have the positions, rotations and various states (damage, etc) for all of the blocks, some of which would have been calculated by it, some by the other machine(s) which it would then use to calculate updated states of the portion of blocks it's handling, before sending this information back to the other machines - I can only imagine you'd need very low latency for that to work well. Suppose you take a scenario where you've got two unattached vehicles that players control in PvP and that the block calcs are divided between the machines such that each client calculates its own vehicle. That'd work fine up until the point that the two collide since from there on out you'll need low latency updates about the states of the other blocks to calculate how it all goes down. - You could introduce latency compensation that has simplified calcs to predict the path the blocks would take during the time it takes to receive an update from the other machine but that would naturally cause things to go awry very quickly when you have blocks phasing through one another and so on - All that said, I could see it working on a LAN. Hell, you could probably have an ungodly number of players since each extra one should theoretically expand the computational resources available in a near linear fashion. If one player can run at full framerate with x blocks then (assuming equally powered machines) two could play with near to 2x blocks, three with 3x blocks etc
All that said, I think by far the most practical solution would be to just assign one of the clients as the 'server' and have it compute everything, the other clients only updating it with the users' inputs and it serving the block positions, rotations and visual states (eg, on fire). It wouldn't need to supply all of the block state information, like forces acting on it since the client just needs the information that allows them to display it accurately which I would imagine to cut down greatly on packet size. The main issue would be that the latency would cause non-host players to feel a lag in their controls, but at the end of the day that's an artefact of all multiplayer games.
|
|
|
Post by spaar on Feb 14, 2015 19:43:05 GMT
All that said, I think by far the most practical solution would be to just assign one of the clients as the 'server' and have it compute everything, the other clients only updating it with the users' inputs and it serving the block positions, rotations and visual states (eg, on fire). It wouldn't need to supply all of the block state information, like forces acting on it since the client just needs the information that allows them to display it accurately which I would imagine to cut down greatly on packet size. The main issue would be that the latency would cause non-host players to feel a lag in their controls, but at the end of the day that's an artefact of all multiplayer games. That's what I was thinking as well. Unfortunately, I believe that would still be extremeley difficult to pull off using modding, though easier than the other options.
|
|
|
Post by voltcruelerz on Feb 19, 2015 2:05:06 GMT
Spreading calculations between machines would be a nightmare for anything other than LAN due to latency. No. Consequently, all calculations for a single machine would need to be done by the same rig, though that isn't to say that a beefy gaming rig couldn't take care of either one big machine or two small ones. Provided that no one in the network has high latency, what is likely best is to sort the machines by processing power required and then have them be calculated in order. A giant 300 piece trebuchet might get calculated by my gaming rig while a 100 piece catapult goes to my friend's high end laptop and my girlfriend's netbook only has to process the 30 piece battering ram. There'd have to be a degree of selfishness involved. If you have a gaming rig, you had darn well better be able to play well, so if I'm only running the battering ram but my girlfriend wants to run a 500 piece AT-AT, she's gonna have to deal with time being auto-dilated down to X% or whatever it takes to not impact my play experience. Also, anyone that has sufficiently high ping from the other players must run their own machine. It should be the server's job to schedule jobs based on performance as well as to receive and push out location updates from clients. Of course, this is all trivialized if you had some monster computer acting as the server as it could simply do all calculations. I suppose under rare circumstances you could pool the efforts of multiple machines, but only if they had very low ping or time had been greatly dilated. Which brings me to the next thing. Time dilation. The simplest solution of course is just to have the server auto-dilate everyone to the weakest link, but that's not exactly ideal. Fortunately, this problem has been solved, although in the other direction. In Kerbal Space Program, since you're piloting space ships, journeys are often several months, so time acceleration is necessary. There have been two multiplayer mods for that game and I believe a similar solution could be applied. Kerbal Multi Player (now defunct): forum.kerbalspaceprogram.com/threads/55835-KMP-v0-1-5-1-0-23-alpha-inactive Dark Multi Player (active): d-mp.org/
|
|
|
Post by vspot on Feb 20, 2015 18:17:02 GMT
With multiplayer this game can be popular as minecraft.
|
|
|
Post by grimbriar on Feb 20, 2015 22:57:21 GMT
Minecraft didn't have multiplayer till quite later into alpha, if not early beta, my vote is to get the vanilla game established before the devs devote resources and time to get multiplayer working.
|
|
|
Post by Zeblote on Feb 20, 2015 23:39:42 GMT
my vote is to get the vanilla game established before the devs devote resources and time to get multiplayer working. I disagree. "Adding" multiplayer later in development is an extremely complicated job, expecially if it is centered around physics. It works better if you build your game with multiplayer in mind from the beginning.
|
|
|
Post by dagrey on Feb 21, 2015 11:08:24 GMT
Guys! I now play multiplayer with a friend, though on one computer. Control is used in different parts of the keyboard, the camera can be fixed on one single object. Anyone interested here is a screenshot. cs621327.vk.me/v621327343/1429e/r9ON1AZ9Sgk.jpgGood luck! Attachments:MP.bsg (3.63 KB)
|
|
|
Post by spaar on Feb 21, 2015 17:05:55 GMT
my vote is to get the vanilla game established before the devs devote resources and time to get multiplayer working. I disagree. "Adding" multiplayer later in development is an extremely complicated job, expecially if it is centered around physics. It works better if you build your game with multiplayer in mind from the beginning. I agree they should keep it in mind and not make it harder than it has to be, but right now there are bigger priorities I'd say. So, actually making it a thing later, but already designing with it in mind seems like a good balance.
|
|
|
Post by grimbriar on Feb 21, 2015 17:50:30 GMT
my vote is to get the vanilla game established before the devs devote resources and time to get multiplayer working. I disagree. "Adding" multiplayer later in development is an extremely complicated job, expecially if it is centered around physics. It works better if you build your game with multiplayer in mind from the beginning. Quite true, but they could be developing it with Multiplayer in mind while focusing on the single player, which is the smart thing to do. It doesn't matter how many dollars or man hours are thrown at multiplayer if the base game is still suffering from basic bugs.
|
|
y0nd
Peasant
Posts: 12
|
Post by y0nd on Feb 23, 2015 17:14:40 GMT
teamviewer ? but u trust your friend full . Or not ?
|
|