Turn-Based Table Game (Mahjong) Dedicated Server Help

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By bitronix_

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.