0 votes

The case is the following; with the release of the new multiplayer, I've been trying to implement a basic LAN game. In my mind, the host create the world, and when another player logs in, it copies the world of the master to the client of the slave. That's where I get lost. Changes happens to the world, so instantiating a scene is a no go. If you know an alternative way of doing this, say it, please.

in Engine by (1,087 points)

Sorry, but when/where was the new multiplayer stuff released? I haven't been able to find a stable build with it at all yet. :-/

You have to build it yourself. Or you could download from Cael's @ https://archive.hugo.pro/godot/

You can download the latest unofficial stable build in here.

1 Answer

0 votes

You will have to store the data in the server. Every change a player make, will have to be sent to the server, and then re-sent to all clients. You can use the same principle to send the data to the new player that connects.

That data you send could for example be a json string, containing the important map data that you use to create the scene. You could create an "map" instance, that contains a function to update it, which is sent by the server upon connecting.

I did this with low level language, have yet to try this with the new high level networking.

by (476 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 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.