How to remove a room in Cloud

mr47
edited April 2013 in Flash (deprecated)
How to remove a room in Cloud that this room was not displayed in availableRooms() ?

Comments

  • vadim
    vadim mod
    edited April 2013
    If client joined room, it can change room visibility in lobby by calling myRoom().setIsVisible(false)
    For flash it implemented in last version 3.2.1.0 which you can find on download page.
  • You may also leave joined room in list but forbid joining new players to it: myRoom().setIsOpen(false).
  • I can to delete a room only after closing the window of client who created a room
    availableRooms() shows the client's room also after use of myRoom().setIsVisible(false)
    myRoom().setIsVisible(false) changed myRoom().isVisible to false, but after using disconnect() and creating of a new loadBalancingClient() isVisible of current room changed to true again
  • mr47 wrote:
    availableRooms() shows the client's room also after use of myRoom().setIsVisible(false)
    If you joined room and simultaneously disconnected from master server then no way to get room list updates from master server. availableRooms() returns last known list i guess.
    Any other clients in lobby should get proper list.
    If you really need list updates in client joined room then you can pass 'true' parameter to connect method. This keeps connection to master server.

    After all clients left room, server actually deletes it.
    Calling setIsVisible just hides room from list on server.

    LoadBalancingClient client creates new myRoom local object and inits it with isVisible = false. You can reuse existing loadBalancingClient to keep previous myRoom state or (in case new LoadBalancingClient) initialize myRoom state before create room operation call.
    I hope it's clear that same local myActor object synchronized with joined room or used as template when client sends create room operation.