<?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[Is it possible to run &#96;joinOrCreateById&#96;?]]></title><description><![CDATA[<p>Hey all - I'm trying to figure out some matchmaking/lobby creation flows and I was wondering:</p>
<p>can I use <code>joinOrCreateById</code>?</p>
<p>Thanks in advance!</p>
]]></description><link>http://discuss.colyseus.io/topic/345/is-it-possible-to-run-joinorcreatebyid</link><generator>RSS for Node</generator><lastBuildDate>Tue, 15 Sep 2026 03:21:35 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/345.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 05 Apr 2020 04:09:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Is it possible to run &#96;joinOrCreateById&#96;? on Invalid Date]]></title><description><![CDATA[<p>Hey all - I'm trying to figure out some matchmaking/lobby creation flows and I was wondering:</p>
<p>can I use <code>joinOrCreateById</code>?</p>
<p>Thanks in advance!</p>
]]></description><link>http://discuss.colyseus.io/post/1132</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1132</guid><dc:creator><![CDATA[LukeWood]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Is it possible to run &#96;joinOrCreateById&#96;? on Invalid Date]]></title><description><![CDATA[<p>Hi <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/645">@LukeWood</a>, welcome!</p>
<p>You'd be better off setting a filter for matchmaking, and use <code>joinOrCreate()</code> normally.</p>
<p>First, you need to define your room, with the <code>&quot;code&quot;</code> filter (you can use any identifier, I'm using <code>&quot;code&quot;</code> just for the sake of this explanation).</p>
<p>The <code>filterBy()</code> below means that the available list of rooms is going to be filtered accourding to the options provided by the client. (<a href="https://docs.colyseus.io/server/api/#matchmaking-filters-filterbyoptions" rel="nofollow">See the docs</a>)</p>
<pre><code class="language-javascript">gameServer
  .define(&quot;match&quot;, MyMatch)
  .filterBy([&quot;code&quot;]);
</code></pre>
<p>Then, you can have an <code>&quot;code&quot;</code> provided by the client-side, and provide it to <code>.joinOrCreate(&quot;match&quot;, { code: &quot;ABCD&quot; })</code>.</p>
<p>There are many ways to achieve that - you may need a service to make sure these ids are unique, or you can just generate long enough ids in the client-side and hope they won't collide.</p>
<p>Hope this helps, cheers!</p>
]]></description><link>http://discuss.colyseus.io/post/1134</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1134</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Is it possible to run &#96;joinOrCreateById&#96;? on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/1">@endel</a> very cool!  I see how that’s handled now.</p>
<p>Also very handy to know about the filtering features :). It seems could be really useful in implementing some sort of ranked matchmaking service.</p>
]]></description><link>http://discuss.colyseus.io/post/1138</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1138</guid><dc:creator><![CDATA[LukeWood]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>