Original Post
Hi all, so im trying to make a multiplayer game in java and I have never really used java before. I need to make a game that transmits UDP data from each player to the server specifying positions etc relative to the game and TCP data for chatting. I have currently set up the TCP for chatting between multiple clients and am working on the UDP. My main problem is figuring out the architecture of it all?! They always block when listening so new threads are needed for everything which doesnt seem right. Is this the correct way to go about doing this? Excuse the crudeness of the drawing.
Ive seen something about using selectable channels and selectors for non blocking. Is this of use to me? If so where can I find a good example of TCP and UDP being used in a multiple client server structure? Also, when this is implemented where do I implement a layer for my game? Any help is much appreciated.
Ive seen something about using selectable channels and selectors for non blocking. Is this of use to me? If so where can I find a good example of TCP and UDP being used in a multiple client server structure? Also, when this is implemented where do I implement a layer for my game? Any help is much appreciated.