How to call functions between two connected instances of the game?

Godot Version

4.3

Question

This is my first time actually developing someting like this, with any online multiplayer implementations, but most of the guides about online multiplayer don’t adress the things i want to do. I want to create a basic customizable ttrpg sheet system that keeps tracks of each of the player’s stats and other stuff (combat initiative, inventory, etc). I want each one of the players having near total control of their sheet, as well as being able to see their friend’s sheets, and i want the Game Master to have total control of everything.

But i have a problem: i don’t know shit about online multiplayer, and things like that would have to have some sort of basic peer to peer communication. With my current programming skills, i know i’d be able to figure something out with simply being able to call for fuctions between game instances, like the GM pressing a level up button and the respective player having an function called on their game that automatically updates their character sheet and plays a little fun animation or something. Can anyone help me out on how i’d be able to achieve that?

(meerly illustrative example on what i’d like to do)

tldr: I need help with knowing how to send signals or call functions to and on other game instances through the network. Things don’t really need to be in constant updating, as it should be a turn based system. Basically knowing how to create a multiplayer ‘chat’ where messages could go through would be enough.

Sounds like most of what you want can be achieved with remote procedure calls (rpc’s for short).

Here’s documentation, though I expect that alone won’t quite be enough (it wasn’t for me).

Here’s a youtube video that looks like it should cover the basics. I suggest looking up any functions etc. that are confusing and reading the relevant parts of the documentation.

1 Like

im pretty sure this is exactly what i needed! thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.