Jump to content

Netcode Efficiency


Recommended Posts

I have recently checked to see just how much data is sent and received for MTA:VC. I have noticed a trend of tons of data being received - 12k/sec on my 56k connection - with very little being sent. Not that a lot needs to be sent, but 12k on a 56k connection? That probably shows quite a bit of inefficiency.

I will work on my local proxy today and tomorrow, and see if I can make it go longer without a disconnection, but if you dont mind maybe I could suggest some things you could do to make information transfer more efficient. Must be a lot of raw text that could be sent only as a few bytes of info...

Just thought I would share.

Link to comment

How on earth is your 56k modem doing 12k/sec? that's like physically impossible...

let's do some maths:

your modem does 56kilobits. Turn that into bits/sec:

56k=56000 BITS

turn that into bytes/sec:

56000/8 = 7000 BYTES

turn that into KiloBytes/sec:

7000/1024 = 6.84 KBYTES/sec

That is how fast 56k modems are... 6.8KB/sec... 12k WTF?

but yes MTAVC does use a good amount of bandwidth...

How can you have such nice specs for a computer and have a 56k and expect to not get disconnected?

Link to comment

rest assured nothing is being sent plain text that could otherwise be sent as binary data...

and think about it this way your uploading 1.5 k/sec

the server then sends that out to everyone else...so yeah upload isn't high, but your getting 1.5/sec per player (approx).. we have taken measures to cut this down, but it will be a while till we can get this finely tuned


Link to comment

I get high rates by something called Compression which shows some optimization could be taken on the data from MTA:VC.

Of course, as I haven't taken any part in coding or understanding I haven't quite seen what has been done, but have noticed some extra whitespace that could be removed, etc. (just a little bit of peeking)

Also my latter figures were wrong, the new meter shows actual kb/s instead of rounded kb/s for the whole sessions (silly me). Nevertheless I have hit a solid 10k for a while in a huge server.

My upload is relatively low, around 1k or so. I thought it was higher (like you said, 1.5k)? I can do hardcore stuff and it barely peaks above that... just wondering.

I also dont get disconected while playing normally, only with my inefficient proxy :) Remember, its udp data, and even locally high transfer rates will cause packet shifting/loss which can cause my disconnection - passing from client to intermediate program to server to intermediate program to client is an extra 2 things that shouldn't normally be there (intermediate program *2), if its busy doing one step it might not be able to do the other in time (unless I run them both on different threads... :)) I have 56k because I am in foster care and barely have a job that makes money right now, as soon as I get out I will be on broadband. I am hardly at home so having broadband here is no concern at the moment, I have it at work.

Link to comment

we aren't going to look into compression until we have the basic methodology of our netcode complete.. and at that point compression probably wont be an option, considering the packet sizes are small to begin with..

as far as "whitespace" goes im not sure i follow... whitespace meaning the space character?? that may appear only in chat data, and as far as netcode goes, its not really an issue, as its not occuring every 50ms...

As for redundant data, i'd check your peeking again :-P all that data is raw binary data, and its all relative to gameplay :-P


Link to comment

I am talking about modem compression, but regarding your own compression, I understand.

Whitespace is in regards to extra spaces not required, ie. extra newlines. I just thought I saw this, but I dont know - i'll check sometime soon :)

And yes, I see everything is relative to gameplay, but I mean when a character is standing still and sending data about their position even when they aren't moving, etc. I am pretty sure you all know about this already, and I can guess it isn't your major concern to make the netcode efficient until, as you said, you get an idea of where your protocol is going to stay.

Link to comment
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...