<?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[Using multiple rooms to support one large map?]]></title><description><![CDATA[<p>Hi before trying to implement this I want to get some feedback about this design approach.</p>
<p>Basically I want to have a large map, with the possibility of 1000+ players on it. But to save bandwidth I want to section the map off into its own rooms, possibly having each room living on a different process. And then each room would have logic that tells the client when they need to connect to another room, dynamically leaving/joining rooms as needed.</p>
<p>Is this the correct approach to accomplish this?</p>
]]></description><link>http://discuss.colyseus.io/topic/149/using-multiple-rooms-to-support-one-large-map</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Mar 2026 08:22:07 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/149.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 20 Sep 2018 15:14:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using multiple rooms to support one large map? on Invalid Date]]></title><description><![CDATA[<p>Hi before trying to implement this I want to get some feedback about this design approach.</p>
<p>Basically I want to have a large map, with the possibility of 1000+ players on it. But to save bandwidth I want to section the map off into its own rooms, possibly having each room living on a different process. And then each room would have logic that tells the client when they need to connect to another room, dynamically leaving/joining rooms as needed.</p>
<p>Is this the correct approach to accomplish this?</p>
]]></description><link>http://discuss.colyseus.io/post/489</link><guid isPermaLink="true">http://discuss.colyseus.io/post/489</guid><dc:creator><![CDATA[visgotti]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Using multiple rooms to support one large map? on Fri, 21 Sep 2018 03:33:11 GMT]]></title><description><![CDATA[<pre><code>if(cluster.isMaster) {
    const cpus = os.cpus().length;
    for (let i = 0; i &lt; 2; ++i) {
        cluster.fork();
    }
} else {
    const gameServer = new colyseus.Server({
        server: http.createServer(),
        presence: new colyseus.MemsharedPresence()
    });

    const id = cluster.worker.id;
    gameServer.register(&quot;game&quot; + id, Game); // should be able to join game1, game2, etc from client
    gameServer.listen(8081);
}
</code></pre>
<p>When I try to run this I can connect to game1 but it says the game2 handler does not exist.</p>
<p>Do I need to be listening on a different port? I want the client to be able to join in and out of rooms so creating a new connection seems overkill.. I feel like it should be working without that. Any idea how to fix this problem?</p>
]]></description><link>http://discuss.colyseus.io/post/490</link><guid isPermaLink="true">http://discuss.colyseus.io/post/490</guid><dc:creator><![CDATA[visgotti]]></dc:creator><pubDate>Fri, 21 Sep 2018 03:33:11 GMT</pubDate></item><item><title><![CDATA[Reply to Using multiple rooms to support one large map? on Invalid Date]]></title><description><![CDATA[<p>When I try joining game1 just once on my client my requestJoin logs out</p>
<blockquote>
<p>requesting to join<br />
This process is your pid 8739<br />
requesting to join<br />
This process is your pid 8739</p>
</blockquote>
]]></description><link>http://discuss.colyseus.io/post/491</link><guid isPermaLink="true">http://discuss.colyseus.io/post/491</guid><dc:creator><![CDATA[visgotti]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Using multiple rooms to support one large map? on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/190">@visgotti</a> said in <a href="/post/489">Using multiple rooms to support one large map?</a>:</p>
<blockquote>
<p>Is this the correct approach to accomplish this?</p>
</blockquote>
<p>Hi <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/190">@visgotti</a>, absolutely, splitting the map into smaller &quot;rooms&quot; would be the recommended way for dealing with huge maps.</p>
<p>I'd say you don't need to worry about registering a different room name per worker id. Actually, every worker should have the exact same room names registered. By using either <code>MemsharedPresence</code> or <code>RedisPresence</code>, you should have the rooms being created on different processes.</p>
]]></description><link>http://discuss.colyseus.io/post/492</link><guid isPermaLink="true">http://discuss.colyseus.io/post/492</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Using multiple rooms to support one large map? on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/1">@endel</a> I see. So there's no way to have a room assigned to a process and have another one assigned to another process? I'm guessing Colyseus will just automatically balance out traffic between all the workers?</p>
]]></description><link>http://discuss.colyseus.io/post/493</link><guid isPermaLink="true">http://discuss.colyseus.io/post/493</guid><dc:creator><![CDATA[visgotti]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Using multiple rooms to support one large map? on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/190">@visgotti</a> Ideally, yes, Colyseus should balance the rooms to ensure rooms are distributed across processes. Right now this balancing is not perfect, though. I'd suggest to just use the way it is, and eventually we can have this!</p>
]]></description><link>http://discuss.colyseus.io/post/494</link><guid isPermaLink="true">http://discuss.colyseus.io/post/494</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Using multiple rooms to support one large map? on Fri, 21 Sep 2018 23:03:55 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/1">@endel</a> Sounds good. Thank you! For persisting data between rooms, I'm using the room.presence functions for getting/setting player attributes on onAuth and onLeave. Is this acceptable or is there a more efficient way of accomplishing the same thing?</p>
]]></description><link>http://discuss.colyseus.io/post/495</link><guid isPermaLink="true">http://discuss.colyseus.io/post/495</guid><dc:creator><![CDATA[visgotti]]></dc:creator><pubDate>Fri, 21 Sep 2018 23:03:55 GMT</pubDate></item><item><title><![CDATA[Reply to Using multiple rooms to support one large map? on Invalid Date]]></title><description><![CDATA[<p>Cool, sounds good! That's the way to go IMO. You can persist user data on any storage (Redis, MongoDB, etc) on <code>onLeave</code>, and restore it on <code>onAuth</code> or <code>onJoin</code>.</p>
<p>Feel free to post your progress in the showcase section of the forums!</p>
]]></description><link>http://discuss.colyseus.io/post/496</link><guid isPermaLink="true">http://discuss.colyseus.io/post/496</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Using multiple rooms to support one large map? on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/1">@endel</a> Thank you!! and yes definitely can't wait till I get to show off what I've been building :P This framework is awesome. I was using pomelo before this and I can say for sure working with colyseus has been a way better experience. Speed, complexity, documentation, etc all trump it.</p>
<p>Amazing work. Thank you again for your efforts in building such an awesome framework.</p>
]]></description><link>http://discuss.colyseus.io/post/497</link><guid isPermaLink="true">http://discuss.colyseus.io/post/497</guid><dc:creator><![CDATA[visgotti]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Using multiple rooms to support one large map? on Invalid Date]]></title><description><![CDATA[<p>That's great to hear <a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/190">@visgotti</a>, thanks a lot ❤️❤️❤️</p>
]]></description><link>http://discuss.colyseus.io/post/498</link><guid isPermaLink="true">http://discuss.colyseus.io/post/498</guid><dc:creator><![CDATA[endel]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>