Want to make a lan game, with friends. but when the host creator leaves the game, the game either crashes or closes. i don’t want to this system. I just want host migration, peer to peer handover. I couldn’t find anything in youtube. and the post or documents so complicated. What do you recommend. I’m not a very good developer.
Godot Host Migration Help
Burka good luck buddy... welcome to godot
https://github.com/godotengine/godot-proposals/issues/7912
Does that mean right now host migration can not be dealt with in any way?
ive done some thinking, and no, there is no such host migration using high lever multiplayer API. You could write it out using low level, but then it would be janky.
The best user experience would be if the loby that you connect to and game is hosted on is a dedicated server. but then you would not need to migrate hosts. Its either works or it does not.
Maybe you could designate the "king" player, that would hold the game state data, then if the host dies, then the "king" would choose the next avaliable server, and start new game with the migrated game data.
But then you would need to have the players that went down with theprevious server be able to communicate with the king player to get the new server IP to join to.
Its a mess..
At this point im just speculating how it could be done. Im not a professional and im not under the supervision of professionals.
I asked Gemini about a solution:
To prevent this issue, many online games:
Have dedicated servers: These servers are maintained by the game developers and continue to run even if players leave.
Implement peer-to-peer hosting with backup hosts: In this system, if the main host leaves, another player can take over hosting duties, ensuring the game continues.
Use cloud-based hosting: This method relies on powerful cloud servers to handle the game's logic, making it less susceptible to disruptions from individual players leaving.
DaveTheCoder Implement peer-to-peer hosting with backup hosts: In this system, if the main host leaves, another player can take over hosting duties, ensuring the game continues.
That what I thought about, but I haven't done any multiplayer so far. Can this be done with what Godot currently offers? I mean it should be able to code it with the current enet api?
trizZzle I haven't done any multiplayer so far
Neither have I.