Online networking question(s)

Hi everyone… I’ll be honest here, I haven’t delved too deep into any one of the articles provided here and I am almost sure that somewhere deep down in JGO lies the answers I seek, but I am far too pressed for time to spend a week searching for something that may or may not answer my simple question.

With that aside, onto the question! I’ve recently been wondering how the online gaming industry actually works, more specifically what gets used to communicate between client and server. I see everywhere there is talk of UDP and TCP, and that may very well be the solution, however in all instances that I read of they all talk about using that for LAN, or a simple messaging app demo’d on the local network. Not an online community.

I’ve also been wondering if web services, like SOAP, WSDL, JSON and the like is even viable? Bearing in mind that the game I’m aiming this at is an RPG style game where latency is a necessity, but not so much as it would be in an FPS. So I would like to know how an online game does it, the client sends data to the server for processing and the server sends data to the client for rendering the results, but what is used to do the actual sending of data.

The 4 ways that I know of are UDP, TCP, Kryonet and web services. However I unfortunately don’t have much time to do investigation myself, which saddens me to extreme extents but at this stage there isn’t much I can do about it. Many thanks for the help, and sorry for a long post :confused: I sometimes cant help myself over explain.

You’re mixing layers

Generally TCP and UDP are used. Depends on the game. Most likely there’s already some kind of API that does most of the heavy lifting for you so you don’t have to deal with the Transport layer yourself too much.

I suggest you stick to TCP unless there’s a specific reason why you would need UDP.

TCP and UDP in itself are quite low level – there’s so much more to net code in games.