I'm currently working on a c# online multiplayer game in real-time. The aim is to have client/server based connection using the UDP protocol. So far I've used UDP for players' movements and TCP for events (a player shooting, a player losing life) because I need to be sure such data will arrive to all players connected to the server. I know that UDP is said 'unreliable' and some packets may be lost. But I've read everywhere to never mix TCP and UDP because it can affect the connection.
The main question is how should I organize my network?
UDP is connectionless, how should I save who's is who? Should I save ip adresses of the clients in a list?
Should I use TCP for important events or use UDP? If I need to use UDP, how can I make sure that data will not be lost?
By using both TCP and UDP, I need to save for each player their IP in a list (for UDP) and the TcpClient which is connected in another list (for the UDP). How could I change that to be more effective?