Client don't see rooms created by Server

On MasterApplication.cs on PeerCreated, i create two room, alpha and beta.
But my client sample client (PunBasics) dont see them on JoinRamdonRoom, so it create another one.
I would like to handle rooms creation on server side.

protected override PeerBase CreatePeer(InitRequest initRequest)
{
if (this.IsGameServerPeer(initRequest))
{
if (log.IsDebugEnabled)
{
log.DebugFormat("Received init request from game server");
}
return this.CreateGameServerPeer(initRequest);
}

if (log.IsDebugEnabled)
{
log.DebugFormat("Received init request from game client on leader node");
}

var peer = new MasterClientPeer(initRequest);

if (this.webRpcManager.IsRpcEnabled)
{
peer.WebRpcHandler = this.webRpcManager.GetWebRpcHandler();
}


CreateEmptyGame(String.Empty, "alpha");
CreateEmptyGame(String.Empty, "beta");

return peer;
}

/// <summary>
/// Create empty room
/// </summary>
/// <returns></returns>
public bool CreateEmptyGame(string lobbyName, string gameId)
{
//string gameId = Guid.NewGuid().ToString();
AppLobby lobby;
string errorMessage;
ErrorCode errorCode;
GameState gameState;
GameServerContext gameServer;
if (!this.LoadBalancer.TryGetServer(out gameServer))
{
log.Error("Katika: Try Get Server Failure");
return false;
}

if (!this.DefaultApplication.LobbyFactory.GetOrCreateAppLobby(lobbyName, AppLobbyType.Default, out lobby, out errorMessage))
{
log.Error(String.Format("Katika: Try to create lobby Failure {0}", lobbyName));
return false;
}

bool res = this.DefaultApplication.TryCreateGame(gameId, lobby, 4, gameServer, out gameState, out errorCode, out errorMessage);
return res;
}

rjVJxMf.png

Comments

  • below code to add rooms

    IoSZhrv.png
  • Please Hellllllppppp :#
  • hi, @Marcel

    Rooms are not visible to clients until they are created on GS. Current architecture implies that it is done by client.
    On master server side you just lets say reserve names for your games. but they are not really created

    best,
    ilya