<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to create list rooms]]></title><description><![CDATA[<p>Hi everyone,</p>
<p>I am a newbie of Colyseus.</p>
<p>I want to make a lobby with show list rooms. Each room with max players are 2. And when room has 2 player in room, that room will be invisible in list rooms. How can i do this ?</p>
<p>And i want to show custom information for each room in list rooms like:</p>
<pre><code>Room name | Message | Current Player Joined room |

&quot;Room 01&quot; | &quot;Hi message 01 !&quot; | &quot;1/2&quot; |
&quot;Room 02&quot; | &quot;Hi message 02 !&quot; | &quot;1/2&quot; |
&quot;Room 03&quot; | &quot;Hi message 03 !&quot; | &quot;1/2&quot; |
.....
&quot;Room 04&quot; | &quot;Hi message 04 !&quot; | &quot;1/2&quot; |
&quot;Room 05&quot; | &quot;Hi message 05 !&quot; | &quot;1/2&quot; |
</code></pre>
<p>when create room, how can i do this too ?</p>
<p>Thanks for your help !</p>
]]></description><link>http://discuss.colyseus.io/topic/98/how-to-create-list-rooms</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 15:20:18 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/98.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 Jun 2018 09:03:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to create list rooms on Thu, 14 Jun 2018 00:37:54 GMT]]></title><description><![CDATA[<p>Hi everyone,</p>
<p>I am a newbie of Colyseus.</p>
<p>I want to make a lobby with show list rooms. Each room with max players are 2. And when room has 2 player in room, that room will be invisible in list rooms. How can i do this ?</p>
<p>And i want to show custom information for each room in list rooms like:</p>
<pre><code>Room name | Message | Current Player Joined room |

&quot;Room 01&quot; | &quot;Hi message 01 !&quot; | &quot;1/2&quot; |
&quot;Room 02&quot; | &quot;Hi message 02 !&quot; | &quot;1/2&quot; |
&quot;Room 03&quot; | &quot;Hi message 03 !&quot; | &quot;1/2&quot; |
.....
&quot;Room 04&quot; | &quot;Hi message 04 !&quot; | &quot;1/2&quot; |
&quot;Room 05&quot; | &quot;Hi message 05 !&quot; | &quot;1/2&quot; |
</code></pre>
<p>when create room, how can i do this too ?</p>
<p>Thanks for your help !</p>
]]></description><link>http://discuss.colyseus.io/post/312</link><guid isPermaLink="true">http://discuss.colyseus.io/post/312</guid><dc:creator><![CDATA[nene]]></dc:creator><pubDate>Thu, 14 Jun 2018 00:37:54 GMT</pubDate></item><item><title><![CDATA[Reply to How to create list rooms on Wed, 13 Jun 2018 18:56:13 GMT]]></title><description><![CDATA[<p>Hey <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/95">@nene</a>, welcome!</p>
<p>From the client-side, you should use <code>client.getAvailableRooms()</code> (<a href="http://colyseus.io/docs/client-overview/#getavailablerooms-roomname-string" rel="nofollow">docs</a>)</p>
<p>Locked rooms are invisible to the room listing by default. You can set <code>maxClients = 2</code> (<a href="http://colyseus.io/docs/api-room/#maxclients-number" rel="nofollow">docs</a>) in your room handler, and use <code>setMetadata(...)</code> (<a href="http://colyseus.io/docs/api-room/#setmetadata-metadata" rel="nofollow">docs</a>) to make some data available to the room listing.</p>
<p>Hope this helps!</p>
]]></description><link>http://discuss.colyseus.io/post/313</link><guid isPermaLink="true">http://discuss.colyseus.io/post/313</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Wed, 13 Jun 2018 18:56:13 GMT</pubDate></item><item><title><![CDATA[Reply to How to create list rooms on Thu, 14 Jun 2018 04:01:30 GMT]]></title><description><![CDATA[<p>Hi <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/1">@endel</a></p>
<p>Thanks for your reply.</p>
<pre><code>client.GetAvailableRooms(&quot;battle&quot;, (rooms: RoomsAvailable, err: ErrorEventArgs) =&gt; {
  rooms.
});
</code></pre>
<p>I don't known why we must to pass <code>roomName = &quot;battle&quot;</code> as parameter to method <code>client.GetAvailableRooms ()</code> . Why its not empty ?</p>
<p>And when a room reach to <code>maxClients = 2</code>, how can i update list room to invisible that room.</p>
<pre><code>Room name | Message | Current Player Joined room |

&quot;Room 01&quot; | &quot;Hi message 01 !&quot; | &quot;1/2&quot; |
&quot;Room 02&quot; | &quot;Hi message 02 !&quot; | &quot;1/2&quot; |
&quot;Room 03&quot; | &quot;Hi message 03 !&quot; | &quot;2/2&quot; | ==&gt; Invisible in list rooms
.....
&quot;Room 04&quot; | &quot;Hi message 04 !&quot; | &quot;1/2&quot; |
&quot;Room 05&quot; | &quot;Hi message 05 !&quot; | &quot;1/2&quot; |
</code></pre>
<p>P/s: I am using Unity 3D client. And could not find <code>client.getAvailableRooms()</code> or <code>setMetadata(...)</code> anywhere ?</p>
<p>Thanks in advanced.</p>
]]></description><link>http://discuss.colyseus.io/post/314</link><guid isPermaLink="true">http://discuss.colyseus.io/post/314</guid><dc:creator><![CDATA[nene]]></dc:creator><pubDate>Thu, 14 Jun 2018 04:01:30 GMT</pubDate></item><item><title><![CDATA[Reply to How to create list rooms on Sun, 17 Jun 2018 08:56:36 GMT]]></title><description><![CDATA[<p>Hi <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/1">@endel</a></p>
<p>How i can update the list rooms when has a new room created or removed from other users ? assume that i did not joined room yet, and I am using <code>getAvailableRooms()</code> to get list room only. Any have method to send notification to all clients that still not join  room yet ? sorry for my bad english !</p>
]]></description><link>http://discuss.colyseus.io/post/324</link><guid isPermaLink="true">http://discuss.colyseus.io/post/324</guid><dc:creator><![CDATA[nene]]></dc:creator><pubDate>Sun, 17 Jun 2018 08:56:36 GMT</pubDate></item><item><title><![CDATA[Reply to How to create list rooms on Sun, 17 Jun 2018 11:19:05 GMT]]></title><description><![CDATA[<blockquote>
<p>I don't known why we must to pass roomName = &quot;battle&quot; as parameter to method client.GetAvailableRooms () . Why its not empty ?</p>
</blockquote>
<p>That identifies what kind of room you want to information about since you can have more than one type of room on the server. You might have &quot;chat&quot; room, or &quot;battle&quot; room, or &quot;2vs2&quot; room, &quot;4vs4&quot; room, &quot;whatever&quot; room, etc.</p>
<p>On server side you did something like this. See that 1st name &quot;game&quot; in my case, is a room name. You can have more than one of these statements in the server. <code>gameServer.register(&quot;game&quot;, GameRoom);</code></p>
<blockquote>
<p>client.getAvailableRooms() or setMetadata(...) anywhere ?</p>
</blockquote>
<p>setMetadata is done on the server side, in your room class.</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/1">@endel</a>  I do not see getAvialabeRooms on client side API either. (Unity)All the room list related code is commented out in Client.cs</p>
]]></description><link>http://discuss.colyseus.io/post/326</link><guid isPermaLink="true">http://discuss.colyseus.io/post/326</guid><dc:creator><![CDATA[plyoung]]></dc:creator><pubDate>Sun, 17 Jun 2018 11:19:05 GMT</pubDate></item><item><title><![CDATA[Reply to How to create list rooms on Invalid Date]]></title><description><![CDATA[<p>Hi <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/90">@plyoung</a><br />
Thanks for your help. but do you known how we can update the list rooms when has a new room created or removed from other users ?<br />
Thanks</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/95">@nene</a> said in <a href="/post/324">How to create list rooms</a>:</p>
<blockquote>
<p>Hi <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/1">@endel</a></p>
<p>How i can update the list rooms when has a new room created or removed from other users ? assume that i did not joined room yet, and I am using <code>getAvailableRooms()</code> to get list room only. Any have method to send notification to all clients that still not join  room yet ? sorry for my bad english !</p>
</blockquote>
]]></description><link>http://discuss.colyseus.io/post/329</link><guid isPermaLink="true">http://discuss.colyseus.io/post/329</guid><dc:creator><![CDATA[nene]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to How to create list rooms on Invalid Date]]></title><description><![CDATA[<p>I have no idea if we do not have access to &quot;getAvailableRooms&quot;. If we did then you could simply have the client make that call every few seconds or minutes to get a fresh list.</p>
]]></description><link>http://discuss.colyseus.io/post/336</link><guid isPermaLink="true">http://discuss.colyseus.io/post/336</guid><dc:creator><![CDATA[plyoung]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>