-1

I am currently working on my biggest project - chess. I want to create lobby / room system where you can type a code and connect with a friend and play real time. The problem is that l have 0 experience with making multiplayer. Can something like this be made in Java and if yes how?

Javarxd
  • 1
  • 2
  • This can definitely be made with Java. As for how, that's a bit vague. Stack Overflow is more for specific programming questions. See [how to ask](https://stackoverflow.com/help/how-to-ask). – DV82XL Dec 04 '21 at 15:15

1 Answers1

0

Firstly, you need to learn network programming. If you understand how network runs and wirte some little example of TCP/UDP, you'll know how to start.

Then, you need a server to control communication between these two/or more players, that always look like a look below

void activate()
{
    while (true)
    {
        // Process Players packages in
        // Process game logic
        // Process packages respond
    }
}

After that, it will look ok as a little game.

tyChen
  • 1,404
  • 8
  • 27