The technologies of network chat

Shifty Geezer

uber-Troll!
Moderator
Legend
On the back of the PSN cross-game chat discussion, I thought I'd ask what methods are actually used to implement cross-game chat? In something like U2, are there servers handling it, or is it individual PS3's acting as hosts? Likewise with Live!, are MS laying on communication servers? And how do the demands of more users stack up, such that MAG with 256 potential gabblers will have what impact versus a few people playing a coop title?
 
I don't know about how its done specifically for gaming, but VoIP (SIP) solutions usually is with the use of a server and direct connections between the endpoints.
Ie the control data, sip msgs, go to the server that relays it to the other endpoint. Then the endpoints sends the voice (rtp) data directly between each other.
But there is nothing in SIP itself that stops you from not using a server, but then you need to know the address of the other endpoint(s) to setup the connection initially.

This of course does not work to well with NAT and SPI Firewalls, so either there some sort of ALG on the gateway that inspects the SIP mgs for ports/ips to be used/allowed or UPNP is used by the endpoints to controll their NAT/Firewall devices.
Another way around NAT/Firewall issue is of course to relay the voice data through a/the server also.

Due to bandwith requirements I would assume games would use the same setup, ie with a server for the signaling and the actual voice traffic direct between the endpoints. If not a MAG domination game would need to support 256 * xxx Kbps

I guess that games do not use SIP, but some sort of propriatory standard/solution.

But I do wonder about what kind of voice codec they use and the sample rate, because some are seriously bad, on the PS3 at least.
 
It should be by use of another server purely for the purposes of voice chat. Or in MS's case, a server farm to suppport universal chat in all applications. As well, it's likely they have dedicated bandwidth for voice chat.

For example, in MMO's in the PC space, text chat is serviced by what is generally called a "social" server. You can occasionally have the social server drop and thus have no ability to chat even while the game continues to run. Voice chat would just be an extension of that, except with more bandwidth and processing needs.

Regards,
SB
 
This of course does not work to well with NAT and SPI Firewalls, so either there some sort of ALG on the gateway that inspects the SIP mgs for ports/ips to be used/allowed or UPNP is used by the endpoints to controll their NAT/Firewall devices.

Another way around NAT/Firewall issue is of course to relay the voice data through a/the server also.

NAT traversal for VoIP solution is a difficult problem. Usually the software uses not one, but many different techniques to sidestep it. Skype is the first VoIP app that addresses the problem very well.

For chatting, I believe most if not all implementations require a chat server to simplify the sequencing (Who talked first ?)


Incidentally, the leaked 3D Video Option screen has some interesting network related set up:
http://assets.vg247.com/current//2010/02/2.jpg
(WLAN Device, NAT Traversal Info)

No idea what "NP SNS Throttle" is.
 
NAT traversal for VoIP solution is a difficult problem. Usually the software uses not one, but many different techniques to sidestep it. Skype is the first VoIP app that addresses the problem very well.

Yes and when the software tries to do some smart tricks (stun, ice) and the gateway tries some smart stuff (alg) and the server tries some smart stuff you usually end up with a nice mess :)

Skype usually falls back to port 80 to work, the last time I looked :)
 
Is there any way to handle multiple streams without a server? I'm thinking within a game, you could have a dozen people chatting, siz on one side and siz on the other. Some player will mute some other players. Either all the chat is sent to the console for it to mix and play only the selected chat channels, or the server receives everything and mixes streams for each player. I can't see any efficient system working for the former. As such, for PSN to get cross-game voice chat, Sony will need to host their own dedicated comms servers. From the above that sounds liek the way it's handled in all systems.
 
On the pc they are all server based.

Team speak
Ventrillo

Both allow you to rent servers. You can run a server on your pc but it normaly lags you and you can only have a couple people at once on it.


Creative is coming out with their own verison apparently and they will use thier cmss 3d head phone tech to do things like group all healers to your left ear or if your playing with 5.1 speakers you can set the back speakers to groups your not in for your raid with your primary group /s in the front.

Sorry I don't know more about the inner workings of the voice chat tech. Just thought i'd throw in what the pc does.
 
Provided you solved the NAT issue, you could elect one of the clients as a chat server. You may need a "global redirector" though.
 
You'd also have to factor in the processing overhead of them as an audio server. That woudln't be an issue with the PC where someone with a monster rig could afford spare cycles, but it would be an issue with the consoles. Unless the reserved OS resources are enough to server chat. But cross-game, how could that work? I suppose open and specify a chat room. A console could host the chat room and manage comms until disconnected, where chat could migrate to another client.
 
Aye, I was talking about general implementation. Don't have console development experience. ^_^

It kinda depends on how heavy weight the game is, and the average home connection bandwidth.
 
The other day, I was tcpdumping Uncharted 2's lobby and in game communication (only UDP headers). It looks like most of the stuff is p2p with occasional packages to loadbalanced PSN servers)

For voice chat, there is no voice host. Every player is connected to each other separately and the communication fails if both players are behind "firewall" without upnp or equivalent. Sometimes it insists on opening up nontraditional "psn ports" for no apparent reason, even when it's "serving".*
There are also various bugs I encountered regarding party and voice code. Too lazy to write them though.

Resistance (I/II) on the other hand uses dedicated servers for everything, including party lobby and voice.

Also in R2, you can join a party lobby even if the others are playing a rank match, and the ones in game can hear the ones standing by.

* I think this is a lame attempt to bypass NAT so that the NAT server would assume client port is a server port for other ips.
 
Last edited by a moderator:
You'd also have to factor in the processing overhead of them as an audio server. That woudln't be an issue with the PC where someone with a monster rig could afford spare cycles, but it would be an issue with the consoles. Unless the reserved OS resources are enough to server chat. But cross-game, how could that work? I suppose open and specify a chat room. A console could host the chat room and manage comms until disconnected, where chat could migrate to another client.

It's a huge issue even on PCs. Which is why any guild of any significant size either rents servers or hosts one with generally horrible audio quality.

Privately hosted chat servers are never run on the same machines that a person plays on and usually require a significant chunk of bandwidth even for dodgy quality.

MS providing universal voice chat with average quality is not cheap.

Regards,
SB
 
Privately hosted chat servers are never run on the same machines that a person plays on and usually require a significant chunk of bandwidth even for dodgy quality.

Are you positive this is the case ? VoIP started in the dial-up ISP era. A low quality one should be rather efficient (< 14.4Kbps). There should not be a problem to run a lean, private server on a PC. Hosting a million user voice network would be a different kettle of fish altogether.

Console I am not so sure because of memory constraints.
 
It's a huge issue even on PCs. Which is why any guild of any significant size either rents servers or hosts one with generally horrible audio quality.

Privately hosted chat servers are never run on the same machines that a person plays on and usually require a significant chunk of bandwidth even for dodgy quality.

MS providing universal voice chat with average quality is not cheap.

Regards,
SB

I take issue with this. When I was first learning about computers 10 years ago in college, we learned that phone quality communication was easy to get with barely any bandwidth and processing. And it only makes sense if you think about phone technology and developments.
 
Are you positive this is the case ? VoIP started in the dial-up ISP era. A low quality one should be rather efficient (< 14.4Kbps). There should not be a problem to run a lean, private server on a PC. Hosting a million user voice network would be a different kettle of fish altogether.

Console I am not so sure because of memory constraints.

Our Teamspeak server was hosted privately for one of my earlier EQ2 guilds. Max people simultaneous was limited to 32 I believe and quality was rather low.

For Vanguard we started with privately hosted Teamspeak again, but quality and connection issues made it not worth the hassles. After that we moved to paid Vent servers hosted on site at ISPs. We actually went through a few as the cheaper vent servers were absolutely horrible in quality and reliability. I think we finally settled on a 50 person Vent server that was about 75-99 USD (can't remember exact price as we went through about 5 vent servers that month) a month which had somewhat decent quality, but the most important bit was that it was more reliable with consistent connection quality for people.

Still whenever we did raids with 24 people, first thing that was done prior to raid was to turn voice encoding quality way down serverside and clientside in order to reduce as much as possible the chances that someone would lose connection/drop packets/etc...

For Eve Online now, we have a ISP hosted Vent server that can host a few hundred people with good quality, it's not even remotely cheap. :)

For smaller ones, yes, I've had experience with various ones back in the 97-02 timeframe when I used to do competitive Team FPS. Quality back then was absolutely horrid, and incredibly bad when someone decided to try hosting it on their game machine. Voice chat was always hosted on a spare machine (preferably with someone that wasn't playing in the current match) anytime we had a match. Oh and DSL and Cable internet users were forbidden from hosting voice chat servers during that time for our guilds, upload bandwidth and latency just weren't good enough. Back then Cable was usually limited to 384k, and DSL was anywhere from 128-512k depending on location.

Regards,
SB
 
Oh and DSL and Cable internet users were forbidden from hosting voice chat servers during that time for our guilds, upload bandwidth and latency just weren't good enough. Back then Cable was usually limited to 384k, and DSL was anywhere from 128-512k depending on location.

Have you tried recently ?
 
There are a few of variables that needs to be taken care of if you want good voice chat.

1. Bandwidth is the easy band aid, if you can throw bandwidth at the problem you usually are in good shape.

2. Codec, different codecs got different qualities and bandwidth requirements.

3. Sample rate, how often and how long should you sample? Here we get into issues, long sample times, means packetloss becomes an issue. Short sample times and we might get into an issue with small packets that most routers does not like and we get packetloss, delay and jitter.
Jitter we might be able to overcome by having "large" Rx buffers, but that again adds more delay.

And if we have to pad packets because they are to small (low sample time), then we are waisting bandwidth due to the overhead.

//Edit//

When we design use cases for FTTH projects, we usually slap a big bandaid on it and reserve 1Mbps per customer for the VoIP. That way they can have a couple of phones and even do some conferencing. Then when we actually deploy, we need to tune, based on how the home gateway copes, the codecs, sample time/rate and core and aggregation devices QoS actually handles the traffic load.
 
Last edited by a moderator:
It's a huge issue even on PCs. Which is why any guild of any significant size either rents servers or hosts one with generally horrible audio quality.

Privately hosted chat servers are never run on the same machines that a person plays on and usually require a significant chunk of bandwidth even for dodgy quality.

MS providing universal voice chat with average quality is not cheap.

Regards,
SB

Do MS provide chat servers or is it just p2p?
 
GSM voice codec used to be 13.2 kbit/s with horrible quality, now it's 12 kbit/s with much better quality. Low bandwidth compression technology has improved greatly in the last 15 years.

Xbox party chat supports up to 8 people at once, and assuming a 16kbit codec, it would require 128kbit downstream and 16kbit upstream just for voicechat. Thankfully most broadband services are way faster than that. Also, just like MSN voice chat, it'll always be p2p, not hosted. Hosting party chat is not a smart solution these days when individuals have decent broadband connections that can easily handle 8-16 people at once.
 
Do MS provide chat servers or is it just p2p?

Well as a closed network you will always have initial login and since all clients are running the same software there's little reason to manage at a server level even if you are providing value added services. Once you've logged in and made yourself available, there's not much need for server services other than initial connection with other clients. After that it's just packet wrapping and table management which can all be done on client. Even if they wanted to manage traffic including QoS, that can all be done at the router level and shouldn't need to rise to a server level. These then can all be handle at the ISP/carrier location(s) even.

I guess since I don't use the service I should ask, what value added services do they offer?
 
Back
Top