–1 vote

Context:
My goal is to create a Mahjong game (if you don't know Mahjong, card games such as poker is kind of close) for my family and relatives to play. My family is here with me, and my relatives are on the other side of the country, which means I should make a dedicated server. I don't really care about security since the game is only shared between us, using an AWS as the server.

Problem:
I am frustrated at the given tutorials regarding high-level networking since most of the time they focus on either real-time multiplayers that use client prediction stuff and UDPs, or P2P style. Not much has been given referring to turn-based games.

I have faced problems using RPCs and heard some things about them and I really need to know what I need to do and how am I expected to use it.

  1. I've heard that the server project must contain the same scene tree
    as the client project to gain access to the functions required, but
    I don't really see how that helps...

  2. I've been watching and rewatching this tutorial
    https://www.youtube.com/watch?v=lnFN6YabFKg. It works, but I don't
    think referencing instance IDs are applicable in my situation... A
    user from the Godot discord suggested I reference the peer ID
    instead and mentioned something related to my problem 1, about node
    paths.

  3. I just really don't understand how I should use RPCs... I get errors
    like "cannot call static function from non-static function" whenever
    the client script (a singleton) calls a function on an instanced
    scene.

Please do enlighten me. I just want to change/update variables across peers, and also update their GUIs through the server.

Godot version 3.3.2
in Engine by (11 points)

Please log in or register to answer this question.

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 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 webmaster@godotengine.org with your username.