Multiplayer pong

I’ve been searching around all day trying to figure this out. I’m going to use kryonet. I want to use TCP.
I’m really wanting to learn how to do server-client but i’m going to do client-client for this game of course, because its pong…

Does anyone have any tutorials or information/advice on the subject? I’ve been reading through kryonets page but i’m not exactly sure how to utilize the code that it’s showing. I can’t seem to find much useful information on google either…

Kryonet is designed for client-server model. You may to have a look at Sauerbraten game, IIRC it uses peer-to-peer model.
It’s written in C++ using enet library.

Peer-to-peer is client-server where one of the ‘clients’ is secretly a server.

I was wrong about using p2p model in sauerbraten …
it rather uses thick client - thin server model.

I wrote a multiplayer pong a while back using kryonet, it was very dirty code and didnt end up working too well, but it did work.

HeroesGraveDev has the right idea in that one of them is a server and one is a client and the protocols are just like any other client-server relationship. All you have to decide is how you want them to interact.

You can decide to keep all information on both of them and try to keep them synced. The other way is to keep all of the information on the server and make the client a dummie, just sending input to the server which then does the computations and sends back the neccesary information.

For a game as simple as pong you can probably get away with either, especially since security probably isnt much of an issue.