View Full Version : [Question] Help with zones and rooms
04-03-2011, 05:45 PM
I am very new to ES5 and I am trying to locate the amount of rooms in a certain zone. I have tried making an array and linking it through the zoneManager
var _rooms:Array = 
_rooms = _es.managerHelper.zoneManager.zoneById(e.zoneId).r ooms;
04-03-2011, 05:45 PM
Yet im still having an error of cannot access a null object reference ? Please if anyone could lend me a helping hand :)
04-03-2011, 05:55 PM
For this to work, you have to be in a room that is in that zone. are you?
04-04-2011, 12:18 AM
I am trying to create a lobby system. Once again I am not too sure I am approaching this in the correct manner. I want to be able to get a list of all current rooms for users to have the chance to join a current game. If I need to be in that room then this must be the incorrect way. Could you please steer me in the right direction ?
04-04-2011, 12:58 AM
The best solution for a lobby system is to use GameManager. See the RTSGame for an example of one Unity game that uses GameManager (that just does auto-matching), IronMongery for an example of a Java client game that has a complicated lobby system, and the code example LobbySystem for an example of an AS3 game that has a lobby.
The general idea is to have one server level component that registers each gameType that you like, configuring the room and what plugin(s) are needed for each gameType. Then clients can use FindGamesRequest and QuickJoinGame and JoinGameRequest for getting a list of all game rooms or getting auto-matched or joining a specific room. QuickJoinGame can also create a game even if one exists (as well as creating one when auto-matching if there isn't one existing).
Another solution is to have all your games (at least of a specific type) in one zone, and have one room in that zone that is the lobby. Users join the lobby, and then they can use ZoneManager to get a list of all rooms in the zone.
04-05-2011, 09:57 PM
Awesome! Thank you very much, Awesome support team here at ET.
Powered by vBulletin® Version 4.1.6 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.