0 votes

How would I go about making a multiplayer game like Tic-Tac-Toe where you simply press play on a menu, then if there is another person somewhere in the world ready to play as well, it matches you up and you can play? I know how to make the tic tac toe part, I just need to know how I would go about making multiplayer like this because every tutorial I have seen makes it so that someone needs to create a room and the other needs to enter the ip address to join. Thanks!

Godot version 3.2.1
in Engine by (596 points)

I'm sorry, I do not have an answer, I feel like there mighht be a lot of different things that need to be considered, beyond the scope of a single answer, but may I ask, could you please link some of the tutorials you're talking about?

Yeah it was hard to explain exactly what I needed, but this is the tutorial that I was talking about: https://www.youtube.com/watch?v=lpkaMKE081M&t=154s

1 Answer

+1 vote

Setup a server where each client connects to, eliminating the IP & port typing part.

Have the server randomly choose another connected peer based on experience or other criteria and start a game between the two.

Finding a step-by-step tutorial for beginners of this will not be practical. Rather learn each phase and connect them all together.

What you'll need

  • A server that

    • accepts peers
    • matches connected peers
    • handles unexpected behavior (like disconnects)
  • A client that connects to the server and plays the game when instructed to do so

by (6,876 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.