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.

asked Nov 8, 2016 in Engine by mateusak (1,071 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.

answered Nov 8, 2016 by Tybobobo (452 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.