Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 715 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 5 1 2 3 4 5
Re: Bps , bps peak & latency [Re: EpsiloN] #165295
11/04/07 19:02
11/04/07 19:02
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Quote:

One is to move the players client-side all the time.




You don't want that.

Quote:

The other is to move the ents localy only until a regular update comes (thru a forced update) , wich will remove the 'build-in' lag of the frequency of updating.





This is where dead reckoning comes into play. Without DR, this routine will lead to very noticible (and unplayable) warping.

Quote:

Also , for the latency , it could be a 'many servers'




Unless you have to money to host a server on each continent, this is not a vible solution. If you have two servers in the same city (or even country), their latencies will be off by at most ms and thus you dont' gain anything here.

Quote:

When an ent moves , the client that owns the ent sends to all other nearby clients the input , and it will be ignored after a regular update comes




Here is an example problem here: Player A and Player B want to move to Spot A. Who gets to go there? What if Player C gets both updates? What does he see?

Here is another example problem: Suppose you have ten players and one server. One player moves and has to update the other 9 players as well as the server. However the server finds tht the movement was illegal and sends an update to all 10 players rejecting the move. However before you get the server update, you keep moving and giving the other 9 players updates. In short, one bad move could result in 10's or 100's of unnecessary updates which could lead to a flooding failure on the part of the client or server.

Peer to Peer is only good for 4 players or so without A LOT of overhead and completely impractical for 10 players or more.

Quote:

If the latency between the two clients is lower than thru the server , it'll lower the time needed for the packets




True, which is why so many MP FPS games use p2p... the latency is very low and not subject to a central server. However, as I've stated below, maintaining server sync and simulation integrety becomes, as you said, hard if not impossible!

Re: Bps , bps peak & latency [Re: fastlane69] #165296
11/04/07 19:47
11/04/07 19:47
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
Quote:

This is where dead reckoning comes into play. Without DR, this routine will lead to very noticible (and unplayable) warping.
...
Unless you have to money to host a server on each continent, this is not a vible solution. If you have two servers in the same city (or even country), their latencies will be off by at most ms and thus you dont' gain anything here.
...
Here is an example problem here: Player A and Player B want to move to Spot A. Who gets to go there? What if Player C gets both updates? What does he see?

Here is another example problem: Suppose you have ten players and one server. One player moves and has to update the other 9 players as well as the server. However the server finds tht the movement was illegal and sends an update to all 10 players rejecting the move. However before you get the server update, you keep moving and giving the other 9 players updates. In short, one bad move could result in 10's or 100's of unnecessary updates which could lead to a flooding failure on the part of the client or server.




I'm not talking about dead reckoning here,I'm saying that it needs only a simple move forward until the update comes. After the regular update (if the pos is offsetted) the ent will float(same speed as movement speed) to the new possition smoothly(with dead reckoning it could even be curved,for further smoothing). For a FPS it'll look not only slow but also wrong (I mean moving in another direction while facing the opposite for example) but for RPG its fine,imho
About the servers...you wont gain much,but even 50ms is enough if you reduce it below 100ms,dont you agree? Btw , lets first create the MMOs then we'll think about the money for the servers
As for the collision...player A sends an input to player B and C...player B sends also input to player A and player C...player A receives input and collides localy ents A and B , player B receives input at the same time player A received player Bs input,and collides too localy ents A and B...player C receives the same inputs,possibly at diffrent times,and collides with just a little offset ent A and ent B because he got the inputs at diffrent times,and than they collide for 200ms , wich is just a little movement , until the regular update comes.
How does that sound? And for the second problem ... if you move your clients localy it'll be a problem , but if you move them localy only until a regular update comes , the server will correct the possition (that the ent collided with another ent) and move that same ent on the clients a little back,where it actualy collided. It wont look good,but why do you suppose WoW doesnt have player-player collision only player-env? It's interesting to discuss this , but we should try (each one of us) to make some solutions to this problem,so we could all benefit from it (and it could possibly take all of us one step further in the process of making MMOs with 3DGS,wich I would love to see done,even if its by a person that I dont like just the idea having a MMO made with it is great...)


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: Bps , bps peak & latency [Re: EpsiloN] #165297
11/04/07 20:51
11/04/07 20:51
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Quote:

I'm not talking about dead reckoning here,I'm saying that it needs only a simple move forward until the update comes. After the regular update (if the pos is offsetted) the ent will float(same speed as movement speed) to the new possition smoothly(with dead reckoning it could even be curved,for further smoothing). For a FPS it'll look not only slow but also wrong (I mean moving in another direction while facing the opposite for example) but for RPG its fine,imho




But that is the essense of DR. Ultimitely, you will be using a c_move on the client to move players on it. If you do teleportation (setting my.x directly), then you are at teh mercy of the server update speed and generally will just look bad. With c_move, you move based on previous physics data (position, velocity, and if you want, acceleration) and then adjust based on server updates. This means that as long as the player is moving predictably (no collision), you will be close to 100% accurate all teh time. If you have collisions (which are unpredictable), then the DR corrects.

Doesn't matter if FPS or RPG... this problem is stil a problem. Consider that a collision can be a Mob attacking you. Your players will SCREAM "foul" if they moved out of range on their computer consistently but the server sends updates that they are in range and taking damage.

Quote:

About the servers...you wont gain much,but even 50ms is enough if you reduce it below 100ms,dont you agree? Btw , lets first create the MMOs then we'll think about the money for the servers




I agree completely on both points, which is why I point out that this is a solution that requires money and the need and is not a "real" solution in terms of developing your game.

Quote:

player C receives the same inputs,possibly at diffrent times,and collides with just a little offset ent A and ent B because he got the inputs at diffrent times,and than they collide for 200ms , wich is just a little movement , until the regular update comes.




So the clients will be out of sync for 200ms and even then the server update may tell them that they were wrong all along! And you are forgetting a critica part of my example, that two people are trying to enter the same space on a client. Consider how complicated you have already made your system as opposed to the standard model: Player A and Player B send an update to the server, the server makes a decision on what happens and then updates all players on the "truth". Can you see how doing this makes developing and maintaining the simulation so much easier?

There is a saying that goes "too many cooks in the kitchen ruin the soup". This is what is going on here. By making each client a "cook" and able to affect their own simulation (the "soup"), you allow for way too many inputs, way too many voices saying "I was here first", "No I was here"... and ultimitely, it's STILL the server that has the ultimite say!

So what I'm saying is don't try to reduce latency... it's a losing game. Instead, work on mechanisims within your serve and client to hide the lag and process data effectively.

Quote:

but if you move them localy only until a regular update comes , the server will correct the possition (that the ent collided with another ent) and move that same ent on the clients a little back,where it actualy collided. It wont look good,but why do you suppose WoW doesnt have player-player collision




It's become clear that what you are proposing isn't very different from what is actually done. The only difference is that I somewhere got the idea that the clien woudl be transmitting back to teh server, would be actively modifing the simulation, and that is a no-no. As long as the server is the only one that can modify the simulation, then what you do on the client to hide the lag doesn't matter.

Quote:

It's interesting to discuss this , but we should try (each one of us) to make some solutions to this problem,so we could all benefit from it




What I talk is what I've done. All the techniques I've described are what we have going on with our MMOG. We haven't been able to do public demo due to our inability to create a stable published version, but we are actively working towards that. At that point, you will see how our solutions make our players move just as good (IMO) as any MMOG out there.

Re: Bps , bps peak & latency [Re: fastlane69] #165298
11/04/07 21:17
11/04/07 21:17
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
I am refering to dead reckoning as a very complex mechanism to predict possitions thats why I said its not a dead reckoning (to move the ent simply forward and to possibly rotate it with a defined speed in a given direction) Dead reckoning is every (simple and complex) solution for prediction,but I'm saying it for the more complex solutions.
My system does have collision detection right now , and I havent tested how it works with 2 clients moving (localy I can only move one only if I had a second keyboard ) and I'm thinking of removing it(only player with player) and reworking the 'fight concept' to be the same as other MMOs. Currently my fighting concept will require instant updates (wich is not an option with more than 100ms latency) and constantly synching the clients. I think the current solution in many MMOs will be better , to have a 'cycle' where your character attacks at a certain rate eighter until you cancel it , or until the other(or you) player is dead.
By the way , the only thing that I did to 'predict' client movement was this 'forced' updating , but for some reason it updated more than once,so I'm still fixing it but from the feedback I got (when I tested with a server & two clients) I'm very satisfied by the numbers. I'm still new to MP,yet I'm managing to keep my data transfer to a minimum,I hope my project continues to develop this way

PS.: All the techniques we're talking about , you say you did it in your MMO...what exactly you did because (not only here,but in my post in MP section) we've talked about many thinkgs,and peer-to-peer , server/client & local movement together wouldnt look good and btw , how are you managing with the numbers ? bps , peak & rel/unrel ? I'd like to know for comparing how much 'spare' traffic I have for interraction (currently I have movement only & anim states)


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: Bps , bps peak & latency [Re: EpsiloN] #165299
11/04/07 21:30
11/04/07 21:30
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
I failed to get some proper DR working.
Since there are soo many other awful things to take care of, I started working on some other things closely related to player movement.

Anything which is not a player currently is created on the server, moved on both client and server and synced by the server. My simple smoothing algrorithm works fine for that as I don't have to care about latency.

The players however are far more difficult to handle.

Next step are adding events like getting hit. Then I can test a bit more

Re: Bps , bps peak & latency [Re: EpsiloN] #165300
11/04/07 22:50
11/04/07 22:50
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Quote:

All the techniques we're talking about , you say you did it in your MMO...what exactly you did




-Traditional Client/Server Multiple backend server applications supporting the frontend clients
-No pure p2p, although the server backend is p2p-ish (all server applications communicate with each other).
-Each client has DR active
-Each client only gets updates about it's surroundings
-Each client only makes requests of the server; the server is the ultimate authority on whether to grant these requests.
-Current "requests" include movement, chat, inventory, trading, kicking, throwing, picking objects up, dropping them.
-Current non-players include Merchants, Quest Givers, physics engine based columns and balls. Currently working on a goal post and score board on the way to making a series of sport-like games!

Quote:

how are you managing with the numbers ? bps , peak & rel/unrel ? I'd




I don't know what these numbers are. I don't use these numbers as a guide yet. At this stage in development it's easier to have a design philosophy to minimize traffic. For example, since we are still in A6, we only have vars and strings. As such, we pack as much infomation into a single var and string.

I'll look them up on monday and post them for reference.

Re: Bps , bps peak & latency [Re: fastlane69] #165301
11/06/07 15:43
11/06/07 15:43
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
I tryed two ways for moving clients smoothly , only one looks good , but its not the actual possition the player is at. It lags 250ms behind the actual possition.
I tryed a simple script for predicting the players possition and failed the collision detection + gliding gives unpredictable results with diffrent speeds. For example , moving an ent for 1 frame with a speed of 150 quants and moving an ent for 10 frames with a speed of 15 quants. It gives diffrent results from gliding , so I cant predict even a straight line movement...
No obstacles :

With obstacles :

In case someone misunderstood something : the red lines show the path of the models and how far they got...
How did you do dead reckoning with collision detection (I'm talking about using 'glide') when it gives diffrent possitions for diffrent speeds? Or there is another way that I dont know about,yet...

PS.: You do have collision detection with glide,right ?
Btw , Firoball , how are you going to make the events for attacking? I already have something in mind for that but I'll first take care of the DR,otherwise it'll be waste of time if I cant get the DR working...


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: Bps , bps peak & latency [Re: EpsiloN] #165302
11/06/07 17:08
11/06/07 17:08
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
I don't think we use glide at all and I'm not familiar with it at all.

We have a single application that handles the physics simulation and then sends the updates to all clients. This application is using the 3DGS physics engine for all movement and collision detection.

This means that any fps or speed differences in the physics application would affect all the physical entities at the same time and the same way and thus all the clients are in sync in terms of the physical simulation. We then have a DR routine running on all clients to handle the time between packets to acheive smooth movement.

We thought about using the 3DGS physics engine on the client as a form of DR, in effect turning it on when the update time between packets got too large. But we found it easier to just write a simple DR routine... we might still do it in the future and it should work; after all, a DR routine is really nothing more than a physics engine!

Re: Bps , bps peak & latency [Re: fastlane69] #165303
11/06/07 17:45
11/06/07 17:45
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
It sounds great , but I dont think I can ever make anything like that I guess I'll have to satisfy with my current 'lag behind' method So far I'm the only one working on that,and I tought about asking for help in a local forum (I mean Bulgarian) for a C++ coder , but I'm not shure I want another 'teammate' at this time.(Not shure if I'll give up after a few days)
I've added a simple log function to my project , and after the next test (with 3 clients) , I'll have the 'almost final' numbers on bps & rel/unrel.


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: Bps , bps peak & latency [Re: EpsiloN] #165304
11/06/07 18:06
11/06/07 18:06
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Quote:



PS.: You do have collision detection with glide,right ?
Btw , Firoball , how are you going to make the events for attacking? I already have something in mind for that but I'll first take care of the DR,otherwise it'll be waste of time if I cant get the DR working...




I wanted to handle the event itself by the server (logically) and then set some variable according to which event occured. Upon change, this variable is sent back (reliable!) to the clients, so they can react on the event (For moving and animation). Anything about health, score and the like will be done by the server and then transmitted. So far the idea...

This still is very vague as I haven't yet found the time to play around with it, but it's the first raw idea that I came up with since this is more or less the way I'd do it in singleplayer mode.

I'll let you know if this has any future once I tested it

Last edited by Firoball; 11/06/07 18:09.
Page 2 of 5 1 2 3 4 5

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1