This is yet another multiplayer Pong implementation.
Game library used: libGDX
Networking library used: Kryo
- To run client execute the
./gradlew run
command - To run server execute the
./gradlew runServer
command
- Start the application
- Enter server's IP address. By default, address of my server is used
- Enter server's port. By default, port of my server is used
- Enter session's ID provided to you by host player if you want to join session. If you are creating session, skip this step
- Enter session's password
- Hit "Create session" if you want to be the host player and sen the generated session ID to other player
- Hit "Join session" if you are connection to existing session
There is a set of events that the client and server can exchange, which can alter the state of both. The server manages the state of a game session, including the connection of two players and their scores. Additionally, the server acts as a mediator, receiving information about the position of a player's paddle and transmitting it to the other player. I have also hardcoded a 60-minute lifetime limit for each game session to prevent the heap from becoming overbloated.
Player is able to join his own session