Download

C++ Sessions, what next?

So I setup a system which can connect to another player using steam matchmaking (p2p) and someone can join. Next I want to know how I can handle when the host disconnects. When you play games like CoD… if the host disconnects it just switches to a new host. How can I implement this in UE4? Second, I have a layout of how I want each match to go:

Lobby, Waiting for necessary players
Starting Game, Choosing Characters
Game begins, loads into a new map
Victory condition has been met, someone losses and someone wins.
Results of the match are sent to a Postgres db.
Match is destroyed.

How can I setup this sort of step by step progression within a match?

I believe you are looking for something called “Host Migration”. UE4 has not implemented such system yet, so I guess you will have to make it on your own. Maybe google-ing the concept might help get a starting point?

Yeah, but what would be the design of doing that?

Well, I don’t know anything on the matter, since I’ve never implemented such thing. But it seems Unity has some interesting read on the matter, and
this.

IMO your best bet would be to research in how host migration works in it’s basics. Then try to implement it by yourself in UE4.

Best regards,
YoungWolf