Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (degenerate_762), 1,098 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 5 1 2 3 4 5
Bps , bps peak & latency #165285
11/02/07 18:24
11/02/07 18:24
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
I'm asking here,because the manual is too confusing on this part of networking
First , is bps(bps peak,latency,bps reliable/unreliable) for sent (transfer from Client to Server) or received (From server to client) when displayed on the clients. When displayed on server , is it for the last client (all of the vars) or for all clients at the same time. If it is 'received' is there a var for sent (vice versa). Is it actualy per second , or it shows at the given moment. Is peak measured for one second , or the maximum peak data for a given moment.
As you can see I dont know anything about those vars,and I'm constantly looking at them and trying to figure them out Please , explain to me what is what , so I could continue (eventualy) my project efficiently (without 'unknowns' and suggestions)...


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

Joined: Mar 2003
Posts: 5,377
USofA
I'm pretty sure this is right:

CLIENT
BPS-- how much you send
UNR/REL -- how many unreliable or reliable packets you receive.
BPS PEAK -- should be for duration of client uptime.


SERVER
BPS -- how much you send
UNR/REL -- last client connected... pretty useless in my book.
BPS PEAK -- should be for duration of server uptime.

Re: Bps , bps peak & latency [Re: fastlane69] #165287
11/03/07 11:21
11/03/07 11:21
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Hm...

What are your average values for these?
I'm asking because I have some stranke peaks > 1KB and I don't know where they come from. Some synching after level loading.

I want to compare where I am at

Re: Bps , bps peak & latency [Re: fastlane69] #165288
11/03/07 20:42
11/03/07 20:42
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
Quote:

CLIENT
BPS-- how much you send
UNR/REL -- how many unreliable or reliable packets you receive.
BPS PEAK -- should be for duration of client uptime.




Ok , its now a little more clear but still not enough...Bps , is it realy for one second , or a momentary value multiplyed by a factor to come up with the per second value...I think I should get some sort of a program to see how much my network card is sending/receiving atleast 16 times/sec.
Is reliable/unreliable per second or at a given moment?
And finaly , is Peak realy per second or again(as bps) measured for a moment and multiplyed (for example by dplay_entrate) to get the per second value?
Currently I have :
Client
Bps average 80
Bps peak maximum I've seen is around 450
Rel/Unrel is around 80 I think , ~75...But this depends. 75 is with a Client & a server. If I have two clients , this becomes ~140/150 on each client. 75 on one client if he's not moving,if he is jumps to 150.

Server
Bps average (Dunno,I forgot)
Bps peak I think I've seen maximum 2400 (Caused by a 1 second update of 3 entities to each one of 3 clients,update of pos,frame,flags,alpha...I should try something else,if I want more clients,this Peak could produce serious lags if I have more clients)
Rel / Unrel is diff. each time I test , last time it was around 80 with more frequent updating of a clients input(pan angle mostly). When I started (only movement,no rotation) it was less than 20.Max I've got it to 65 with constantly pushing each one of the movement buttons to 'simulate' maximum input for a client
So , if we look at those numbers , it means that anyone can create a MMO with 3DGS. But somehow it doesnt work how it should. Its still laging. If I increase the update rate,theese numbers jump to higher values,so this isnt a solution. To prove that the people who say its impossible are wrong , I have only 2 words for them. Dead Reckoning. But for this 'prediction' I need to know what those numbers represent , in order to determine what are the limits for frequency in updating , and based on that , to construct this Dead reckoning function...
Sorry if this post got too long , but I wanned to give my opinion on that matter , and to point out that I realy needed an in-depth explanation of the numbers.


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

Joined: Sep 2003
Posts: 9,859
Ah then you are at the point where I gave up after 2 days of fiddling around. On LAN it's perfect, because latency basically does not exist, but when simulating an online conenction... forget it.

Easiest solution would be if the client syncs his player with the server and not vice versa. But it allows cheating and would require some sort of validation on the server.

Syncing however would become a LOT easier, because on each machine the lag is the same for each value and I don't have to sync with some value which is 300ms or so old.
I tried to do that and simply failed.

Re: Bps , bps peak & latency [Re: FBL] #165290
11/04/07 00:22
11/04/07 00:22
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
I just implemented my idea above - it's running GREAT.
I did an online simulation for 33.6K modem (just to see the limits) and it remained playable, although the other players started becoming a bit jerky.
But I'm really satisfied. The more challenging thing will be event handling - lag will be a lot more noticable here when I handle it entirely on the server (which makes sense).

Re: Bps , bps peak & latency [Re: FBL] #165291
11/04/07 05:05
11/04/07 05:05
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
We're getting a little off topic,but I'll answer anyway
I'm not thinking about cheating,because I dont even have a game yet. After I have a game,I'll start thinking about preventing cheats I tought about moving the clients localy,but this will require (like in World of Warcraft) using only local collision (players are passable,houses arent). I decided to go with server movement. I have an idea how to get around the 'build-in' lag of the periodic updates. I'm not talking about latency,lets imagine its low To get around the build-in lag I'm going to try to send a 'forced' update,wich will be sent to all nearby clients when that certain client starts moving. The other clients will move the entity localy until a 'normal' update comes. From that point on,the entity will move only from the server updates. I tryed something like it,and it worked great,the clients moved the entity right after the other client sent input,but failed after that because I have to organise my script better (it send almost 10 forced updates,until the normal update arrived)
I'm not thinking about normal latency because in a RPG its not required everything to be precise , you might get the anim flag a second later noone will notice.And , after all , I havent seen modems recently everyone I know has better connections.


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

Joined: Sep 2003
Posts: 9,859
I'm living in an area where modems still are common. We got DSL last year - with reduced speed

I've done your way with server updates (I think I did it a bit differently, but the basic idea is the same) and it works great for a low latency system.
The problem I encountered with ltency was, that the data send by the server was 100ms-300ms old when it arrives at the client. So this gives a noticeable jerk and all my methods to reduce this jerk failed. I tried to calculate the position when taking latency into account, so I have a fitting old position on the client to vccompare it with the one sent by the server - it simply was not accurate enough. The result was a bouncing player - very ugly and unplayable.

This was not acceptable.
With my current way I'll have an open door for cheaters, and about the collision you're right as well.
But we're lucky that A7 does colission for us even on the client, so the client doesn't notice that the server lags behind. For issues like falling of from a platform on one of both I do a regularly distance check - I only allow a certain distance, if it is to high I assume the system is out of sync and I force an immediate update. No smooting or anythign else. A fixed position update.

But this is ok. As player you only see the others lagging, which is way better than seeing the control taken away from your own player model.

I'll see if everything works with events and the like as my test project progresses. But for now I'm happy with the results and the setup for more entities is really easy.

Re: Bps , bps peak & latency [Re: FBL] #165293
11/04/07 17:01
11/04/07 17:01
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
We should probably move this to the MP forum since it went beyond "Ask Conitec" a while back.


Quote:

The problem I encountered with ltency was, that the data send by the server was 100ms-300ms old




That's pretty high latency. Note that latency has nothing to do with the speed of you connection. It has everything to do with the number of "hops" you packet takes (ie: network topology) and to a lesser degree the speed of the server computer.

Lag, as I define it in my classes, is the human experience of time synchronization. One factor is the latency and the other is the clients computer (slow client computer = high lag).

I just wanted to say this so that we have a clear understanding that you can have high latency and low lag (by hiding the lag).

Now then...

Allowing the client to handle it's own updates is bad for several reasons. Cheating is one but actually not the most critical one. The worst reason is that your simulation will fall out of sync incredible fast. Consider one client and one server. If the client handles their own updates, no problem... it's no differnet than having the server do it. But now let's up that number by four. With five players, each INDEPENDENTELY handling their updates, you will have five people giving you five versions of where they are. Or in another implementation, you have to wait two hops to find out where someone is: one hop for the client to update the server and then another hop for the server to update other clients. In other words you introduce even MORE latency this way. As well, allowing collisions on the client suffers from he same problem: collision on one client is not guaranteed on every other client and thus your simulation is out of sync again.

Trust me, in a Client/Server architecture, the only way you SHOULD do it it is to have the server be the ONLY one in charge of the simulations and updates. This will actually reduce latency and perserve the uniqueness of your simulation. It makes things easier I assure you.

The reason you are having problems Firo is most likely a bad Dead Reckoning algorythem (either your's or Conitecs). A good one will allow you to effective hide latency and reduce lag. The worst that will happen with a DR algorytem is that you will have occasional "warps" and "snap backs" when the latency gets so high, the simulation is way out of synch and the client has gone beyond the limits of the DR routine. There are several techniques you can us and I recommend you either search programming books (no matter what the languge, the routines are the same) or see what google pulls up.

A7's dead reckoning works great for few players. For large number of players (say 10 or more), the fact that it sends updates to all players all the time eats up bandwidth and that is not a good thing. So dont' give up on server updates; you'll be thankfull you didn't in the long run!

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

Joined: Jan 2006
Posts: 968
I already sent a PM to Firoball to discuss dead reckoning in depth because we got offtopic too fast.
In my opinion there are two possible solutions. One is to move the players client-side all the time. (It is diffrent from 'moved by the server' because you...you still have two hops , but only when sending the input wich is also only one time , when you move the ent localy , you'll update it frequently to the server and again to the other clients.) 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.
Also , for the latency , it could be a 'many servers' system , managing one world and when registering a player assigning him to the lowest latency server.(The servers will communicate with a .dll file for sync). The other solution to the latency problem is to have again a .dll file , but this time with a peer-to-peer connection. 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. Until then , the ent will be moved localy according to the input given directly by the interracting client. If the latency between the two clients is lower than thru the server , it'll lower the time needed for the packets
It sounds not only complicated,hard,but in my opinion possible.


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Page 1 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