hellow everybody.
i got really annoying problem for all multiplayer scripters.
i GOT LAGS
BUT!
let me explain,
when i’m connection to my room that i created, everything (player, Environment) moving smoothlly without stucks (Blasts), but when my friend connecting to my room too, still my Environment and my player movement are good(nothing got stuck or laggy), but my friend’s player moves stucky and laggy, just his player is laggy, the another stuff are moving smoothlly and fine.
WHY IT’S HAPPEN :?
i read it couple of hours age, but still i don’t get the reasons of the problem that i mantion…
And that’s probably because you don’t understand what its saying. I recommend looking into how networking works and all that.
it will be more helpful if you will explain me, cause as i saied before, i read it (with my brother) and still i don’t get the reason why it’s happen, i listen to the menual and change things in the setting i’m my game, but without any success…
Well, I am guessing that what your game is doing is allowing each player to move his/her own objects right?
Now lets make a very simple example. Lets say that information is sent and received one time per second. Your character will move smoothly on your computer. Your brothers will move one per second, actually he will teleport once per second because your brother is moving that character. Now, lets move the update rate from one time per second, to 15. Its all looking a little better, a lot less like its teleporting. Now, that’s without lag. Let us say that there is 1 second of lag (OH GOD WHY), every time he moves it’s actually going to be 1 second later.
Now that is why he doesn’t appear smooth to you. That’s where you have to compensate for lag. I won’t help you there, that’s where networking gets head achy.
Friendly tip on your adventure, look into making your game an authorative network solution rather than everyone controlling their own stuff.
ps: Authorative basically means that the machine hosting the game controls everything, players just send their inputs (button presses).