Im making a game where real-time data is exchanged between server and clients, and I was using java UDP sockets straight up, but I reached a point where I actually need to know if a few specific packets do arrive or not, like RemoveObject, ChangeLevel etc. UDP alone isnt enough, I needed some reliability.
So i tried to implement a thin layer on top of UDP by following this great article: http://gafferongames.com/networking-for-game-programmers/
Still, although it's being great to learn low-level networking, its also very hard and I've grown tired, so i looked up for a good alternative and found Kryonet.
Kryonet is said to handle both UDP and TCP requests at the same time, by using two ports (although apparently a single port for both protocols can be used...).
My initial idea (which seems more logical for me) would be to send via UDP the packets with info about object state updates and other real-time dependent information, whilst using TCP for object creation, removal, state-changes or even eventually chat-messages.
Still, every example i saw until now only uses TCP even for real time games, which i find odd when every article i read about game networking strongly discourages such.
I also do not understand how UDP and TCP work at the same time since the article states:
The problem is that since TCP and UDP are both built on top of IP, the underlying packets sent by each protocol will affect each other. Exactly how they affect each other is quite complicated and relates to how TCP performs reliability and flow control, but fundamentally you should remember that TCP tends to induce packet loss in UDP packets.
Please explain how is Kryonet supposed to be used on game networking and why it should be used in such way regarding common knowledge about both protocols.