<?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[Questions &amp; Help]]></title><description><![CDATA[Got a question? Ask away!]]></description><link>http://discuss.colyseus.io/category/4</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 19:19:21 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/category/4.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 02 Apr 2023 04:12:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Issue with phaser tutorial]]></title><description><![CDATA[<p>I can not believe I didn't noticed the version mismatch!</p>
<p>Updating both server and client to 0.15 has done the job.</p>
<p>Thankyou for your time</p>
]]></description><link>http://discuss.colyseus.io/topic/957/issue-with-phaser-tutorial</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/957/issue-with-phaser-tutorial</guid><dc:creator><![CDATA[kayyos]]></dc:creator><pubDate>Sun, 02 Apr 2023 04:12:16 GMT</pubDate></item><item><title><![CDATA[How to synchronize interactions with game objects?]]></title><description><![CDATA[<p>You can use stateful objects (Schema) and subscribe for its changes. At client side, when an object hits another object for example, you can send a message to server and let server decide if it's valid or not, if yes it will update involved objects</p>
]]></description><link>http://discuss.colyseus.io/topic/905/how-to-synchronize-interactions-with-game-objects</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/905/how-to-synchronize-interactions-with-game-objects</guid><dc:creator><![CDATA[chungxa]]></dc:creator><pubDate>Mon, 06 Mar 2023 16:11:51 GMT</pubDate></item><item><title><![CDATA[Error handling]]></title><description><![CDATA[<p>Hello. It is possible to handle errors and send them via email using programming. Here's a general outline of how you can achieve this using C#:</p>
<p>Set up an email account to use for sending the error messages. You'll need to know the email address and password, as well as the SMTP server settings for the email provider.</p>
<p>In your application, catch any unhandled exceptions using a try-catch block. This will allow you to handle errors and take appropriate action, such as sending an email with the error details.</p>
<p>try<br />
{<br />
// Your code here<br />
}<br />
catch (Exception ex)<br />
{<br />
// Handle the error and send an email<br />
}<br />
In the catch block, create an email message with the error details, including the exception message, stack trace, and any other relevant information. You can use the System.Net.Mail namespace to create and send the email.</p>
<p>using <a href="http://System.Net" rel="nofollow">System.Net</a>;<br />
using System.Net.Mail;</p>
<p>// Create the email message<br />
MailMessage mail = new MailMessage();<br />
mail.From = new MailAddress(<a href="mailto:%22your_email_address@example.com" rel="nofollow">&quot;your_email_address@example.com</a>&quot;);<br />
mail.To.Add(<a href="mailto:%22recipient_email_address@example.com" rel="nofollow">&quot;recipient_email_address@example.com</a>&quot;);<br />
mail.Subject = &quot;Application Error&quot;;<br />
mail.Body = &quot;An error has occurred in your application:\n\n&quot; + ex.Message + &quot;\n\n&quot; + ex.StackTrace;</p>
<p>// Set up the SMTP client<br />
SmtpClient client = new SmtpClient();<br />
client.Host = &quot;<a href="http://smtp.example.com" rel="nofollow">smtp.example.com</a>&quot;;<br />
client.Port = 587;<br />
client.UseDefaultCredentials = false;<br />
client.Credentials = new NetworkCredential(<a href="mailto:%22your_email_address@example.com" rel="nofollow">&quot;your_email_address@example.com</a>&quot;, &quot;your_email_password&quot;);<br />
client.EnableSsl = true;</p>
<p>// Send the email<br />
client.Send(mail);<br />
Make sure to test your error handling code thoroughly to ensure that it works as expected.<br />
Note that sending emails for every error may not be practical, as it could generate a large number of emails. You may want to consider implementing a more sophisticated error logging and notification system that aggregates errors and sends periodic reports instead. I use this in my work on Chrome <a href="https://chrome.google.com/webstore/detail/email-finder-getprospect/bhbcbkonalnjkflmdkdodieehnmmeknp" rel="nofollow">getprospect extension</a> and it helps me a lot )</p>
]]></description><link>http://discuss.colyseus.io/topic/77/error-handling</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/77/error-handling</guid><dc:creator><![CDATA[maxadams]]></dc:creator><pubDate>Sat, 25 Feb 2023 11:31:44 GMT</pubDate></item><item><title><![CDATA[Deprecate a field of Schema in javascript]]></title><description><![CDATA[<p>Hi Coco,</p>
<p>Thanks for your reply, actually i need information about @deprecated.</p>
<p>Live Version 1 :-</p>
<p>import { Schema, type, deprecated } from &quot;@colyseus/schema&quot;;</p>
<p>class MyState extends Schema {<br />
@type(&quot;string&quot;) myField: string;<br />
}</p>
<p>LIVE VERSION 2 :-</p>
<p>import { Schema, type, deprecated } from &quot;@colyseus/schema&quot;;</p>
<p>class MyState extends Schema {</p>
// Flag field as deprecated.
@deprecated() @type(&quot;string&quot;) myField: string;

// To allow your server to play nicely with multiple client-side versions.
@type(&quot;string&quot;) newField: string;

<p>}</p>
<p>How can achieve this in javascript.</p>
]]></description><link>http://discuss.colyseus.io/topic/887/deprecate-a-field-of-schema-in-javascript</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/887/deprecate-a-field-of-schema-in-javascript</guid><dc:creator><![CDATA[zack1991]]></dc:creator><pubDate>Tue, 10 Jan 2023 11:29:43 GMT</pubDate></item><item><title><![CDATA[Can&#x27;t run example from Colyseus Unity SDK, got JsonSerializationException (solved)]]></title><description><![CDATA[<p>Should it have been merged into the project?</p>
<p>This was reported months ago.</p>
]]></description><link>http://discuss.colyseus.io/topic/684/can-t-run-example-from-colyseus-unity-sdk-got-jsonserializationexception-solved</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/684/can-t-run-example-from-colyseus-unity-sdk-got-jsonserializationexception-solved</guid><dc:creator><![CDATA[insthync]]></dc:creator><pubDate>Thu, 29 Dec 2022 15:03:19 GMT</pubDate></item><item><title><![CDATA[Operational Transformation]]></title><description><![CDATA[<p>Hi. There isn't OT functions out of box, but you can do it yourself with colyseus.</p>
]]></description><link>http://discuss.colyseus.io/topic/843/operational-transformation</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/843/operational-transformation</guid><dc:creator><![CDATA[COCO]]></dc:creator><pubDate>Wed, 28 Dec 2022 16:41:30 GMT</pubDate></item><item><title><![CDATA[Matchmake error]]></title><description><![CDATA[<p>Hi, lots of things can cause issues like this, please post more details.</p>
]]></description><link>http://discuss.colyseus.io/topic/849/matchmake-error</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/849/matchmake-error</guid><dc:creator><![CDATA[COCO]]></dc:creator><pubDate>Wed, 28 Dec 2022 16:38:34 GMT</pubDate></item><item><title><![CDATA[Spectate a running game]]></title><description><![CDATA[<p>HI! There's an example here: <a href="https://github.com/CocosGames/ColyseusAudience" rel="nofollow">https://github.com/CocosGames/ColyseusAudience</a>.</p>
]]></description><link>http://discuss.colyseus.io/topic/863/spectate-a-running-game</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/863/spectate-a-running-game</guid><dc:creator><![CDATA[COCO]]></dc:creator><pubDate>Wed, 28 Dec 2022 16:37:04 GMT</pubDate></item><item><title><![CDATA[Not getting updated state in Unity client]]></title><description><![CDATA[<p>I have the same issue, I didn't get an updated state on the unity side whether colyseus monitor shows the updated data. So, new patches are not received by the unity client. Here is my code.</p>
    private void OnPlayerAdd(string key, Player newPlayer){
    newPlayer.TriggerAll();
    newPlayer.PlayerState.TriggerAll();

    if (!playersToAdd.ContainsKey(newPlayer.id))
    {
        playersToAdd.Add(newPlayer.id, newPlayer);

        if (newPlayer.Seatnumber != -1 &amp;&amp; newPlayer.id == SessionId)
        {
           BoardManager.Instance.Enable_Disable(false);
           BoardManager.Instance.Set_up_profile(false, newPlayer.Seatnumber, playersToAdd[newPlayer.id]);
        }
    }

    if (newPlayer.id == SessionId &amp;&amp; newPlayer.Seatnumber != -1)
    {
        thisSeat = newPlayer.Seatnumber;
        BoardManager.Instance.Rearrange_Seat();
    }

    if (GameplayRoom.State.players.Count &gt;= 2)
    {
        BoardManager.Instance.WaitingTextDisable(false);
    }
    newPlayer.PlayerState.OnChange += changes =&gt;
    {
        Debug.Log(&quot;-=-=-=-=-=-=-=-=-=-=-=-=-Player Log=-=--=-=-=-=-=-&gt; &quot; + key + &quot; &quot; + newPlayer.id);
        foreach (var t in changes)
        {
            Debug.Log(t.Field + &quot; &quot; + t.Value);
        }
    };
}

<p>this is the code I have set on the client side<br />
and This function is subscribe in &quot;GameplayRoom.State.players.OnAdd += OnPlayerAdd;&quot;</p>
]]></description><link>http://discuss.colyseus.io/topic/89/not-getting-updated-state-in-unity-client</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/89/not-getting-updated-state-in-unity-client</guid><dc:creator><![CDATA[dayna chandera]]></dc:creator><pubDate>Fri, 16 Dec 2022 11:17:52 GMT</pubDate></item><item><title><![CDATA[POST method not allowed in express app after passing it to Colyseus constructor]]></title><description><![CDATA[<p>Hello! I've run into the same issue, but as I want run my server on Colyseus Arena I can't define handlers directly before server. According to <a href="https://docs.colyseus.io/arena/getting-started/modify-colyseus-server/" rel="nofollow">https://docs.colyseus.io/arena/getting-started/modify-colyseus-server/</a> I need to use arena.config.ts. Where, by design, I can manipulate expres app only after the server is created</p>
<p>Is there any way to add POST to allowed methods with this configuration? Or may be it is better to move to self-hosted option?</p>
]]></description><link>http://discuss.colyseus.io/topic/225/post-method-not-allowed-in-express-app-after-passing-it-to-colyseus-constructor</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/225/post-method-not-allowed-in-express-app-after-passing-it-to-colyseus-constructor</guid><dc:creator><![CDATA[kpded]]></dc:creator><pubDate>Wed, 14 Dec 2022 14:35:57 GMT</pubDate></item><item><title><![CDATA[MapSchema clear()]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/873">@coco</a> hi, sorry for the necro, but I'm curious if this method will leave memory leaks or will colyseus handle the cleanup on its own. Thanks!</p>
]]></description><link>http://discuss.colyseus.io/topic/529/mapschema-clear</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/529/mapschema-clear</guid><dc:creator><![CDATA[sleepinggamogamo]]></dc:creator><pubDate>Tue, 13 Dec 2022 00:49:37 GMT</pubDate></item><item><title><![CDATA[create room instance on server]]></title><description><![CDATA[<p>Please refer to</p>
<blockquote>
<p><a href="https://discuss.colyseus.io/topic/847/%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%88%9B%E5%BB%BA%E5%9B%BA%E5%AE%9A%E6%88%BF%E9%97%B4-%E4%B8%8D%E4%BC%9A%E9%94%80%E6%AF%81-%E4%B8%8D%E5%85%81%E8%AE%B8%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%88%9B%E5%BB%BA%E6%88%BF%E9%97%B4%E7%AD%89%E9%9C%80%E6%B1%82" rel="nofollow">https://discuss.colyseus.io/topic/847/服务器创建固定房间-不会销毁-不允许客户端创建房间等需求</a></p>
</blockquote>
]]></description><link>http://discuss.colyseus.io/topic/191/create-room-instance-on-server</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/191/create-room-instance-on-server</guid><dc:creator><![CDATA[COCO]]></dc:creator><pubDate>Wed, 07 Dec 2022 13:08:07 GMT</pubDate></item><item><title><![CDATA[Removing an ArraySchema contained in a schema]]></title><description><![CDATA[<p>Could you elaborate a bit on the structure of the Schema? We currently use nested schemas+array schemas and it works mostly fine.</p>
]]></description><link>http://discuss.colyseus.io/topic/771/removing-an-arrayschema-contained-in-a-schema</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/771/removing-an-arrayschema-contained-in-a-schema</guid><dc:creator><![CDATA[noisycric]]></dc:creator><pubDate>Sat, 19 Nov 2022 04:37:33 GMT</pubDate></item><item><title><![CDATA[Basic bot template? (solved)]]></title><description><![CDATA[<p>For bots in our game, we simply use the colyseus.js client libraries and have the matchmaker add them to the game room if they are needed. Each bot is an object of the Bot class.</p>
<p>We then setup listeners for the bot similar to how the actual client listens, like when a card is played then do something.</p>
<p>Generally we try to avoid treating the bot differently from an actual client which makes our workflow and loadtesting much easier as the game does not care what kind of client has joined + we can offload bots to a different process or server if needed.</p>
<p>We leave it up to the matchmaker if the game needs a bot then simply create one and join them to the room, to the player they look exactly the same as a real player. We also have special Bot rooms where the client might want to intentionally play against a bot, like in a campaign.</p>
<p>Here, we simply extend the base game and have the bot join as part of the joining logic, i.e, we create and join the bot once the player has joined the room.</p>
<p>If there is anything specific you would like me to expand on then I will try to get back to you.</p>
]]></description><link>http://discuss.colyseus.io/topic/467/basic-bot-template-solved</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/467/basic-bot-template-solved</guid><dc:creator><![CDATA[noisycric]]></dc:creator><pubDate>Sat, 19 Nov 2022 04:35:10 GMT</pubDate></item><item><title><![CDATA[&quot;Error: session expired&quot; upon colyseus.reconect(roomId, SessionId)]]></title><description><![CDATA[<p>Hi,<br />
Every room has a right to allow clients to reconnect in an amount of time.<br />
<a href="https://docs.colyseus.io/colyseus/server/room/#allowreconnection-client-seconds" rel="nofollow">https://docs.colyseus.io/colyseus/server/room/#allowreconnection-client-seconds</a><br />
Maybe those sessions are timeout.</p>
]]></description><link>http://discuss.colyseus.io/topic/815/error-session-expired-upon-colyseus-reconect-roomid-sessionid</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/815/error-session-expired-upon-colyseus-reconect-roomid-sessionid</guid><dc:creator><![CDATA[COCO]]></dc:creator><pubDate>Fri, 04 Nov 2022 18:58:42 GMT</pubDate></item><item><title><![CDATA[WebSocketSharp Error!An exception has occurred while receiving a message.]]></title><description><![CDATA[<p>It has reported as an issue:<br />
<a href="https://github.com/colyseus/colyseus-unity-sdk/issues/185" rel="nofollow">https://github.com/colyseus/colyseus-unity-sdk/issues/185</a></p>
]]></description><link>http://discuss.colyseus.io/topic/195/websocketsharp-error-an-exception-has-occurred-while-receiving-a-message</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/195/websocketsharp-error-an-exception-has-occurred-while-receiving-a-message</guid><dc:creator><![CDATA[COCO]]></dc:creator><pubDate>Fri, 14 Oct 2022 09:01:11 GMT</pubDate></item><item><title><![CDATA[Detect collision in server Colyseus (Solved)]]></title><description><![CDATA[<p>I do this on my server with no framework (not saying the framework isnt a better option, just wanted to contribute).</p>
<p>Whenever a players x or y is updated i run this function which is inside the player class on the server.</p>
<p>It essentially loops through all the other players in the room, and compares their x and y coordinates to the 1 player who just moved.  If the other_players.x is &lt; (player.x-0.4) &amp;&amp; other_players.x is &lt; (player.x+0.4) that means they are touching in terms of x axis (my players are about 1 unit wide.</p>
<p>then if other_players.y is &lt; (player.y-0.2) &amp;&amp; other_players.y is &gt; (player.y-0.5) that means my player is higher than them at about head level.   You would have to play with the values depending on your character size</p>
<p>If both of these are true i run the function to kill them and send that message to all the connected clients where they can vanish the player.  I also add them to an array with a timeout so that if they are in that array they cannot be killed again within 2 seconds</p>
<p>Hope this helps someone!</p>
]]></description><link>http://discuss.colyseus.io/topic/780/detect-collision-in-server-colyseus-solved</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/780/detect-collision-in-server-colyseus-solved</guid><dc:creator><![CDATA[mitchmeyer1]]></dc:creator><pubDate>Thu, 13 Oct 2022 20:53:11 GMT</pubDate></item><item><title><![CDATA[Tab closed from desktop or phone Unity WebGL]]></title><description><![CDATA[<p>Hey</p>
<p>Im using sdk for unity webgl build<br />
I want to remove remote players when they close tab from system browser or phone browser.<br />
I saw the mmo-unity example and it works in that case<br />
As im beginner I couldn't understand how its implemented</p>
<p>Thanks!</p>
]]></description><link>http://discuss.colyseus.io/topic/956/tab-closed-from-desktop-or-phone-unity-webgl</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/956/tab-closed-from-desktop-or-phone-unity-webgl</guid><dc:creator><![CDATA[jojohert]]></dc:creator><pubDate>Thu, 23 Mar 2023 16:37:47 GMT</pubDate></item><item><title><![CDATA[Server goes shutdown after MatchMakeError]]></title><description><![CDATA[<p>Hi all, I'm trying to find out which could lead to the server shutdown happening recently. Bellow is a case that you can see after an error occurred, the graceful shutdown progress started.</p>
<p>Error: room &quot;SFuMjng78&quot; not found<br />
at new MatchMakeError (/var/www/Server/node_modules/colyseus.js/lib/Client.js:61:28)<br />
at Client.&lt;anonymous&gt; (/var/www/Server/node_modules/colyseus.js/lib/Client.js:185:35)<br />
at step (/var/www/Server/node_modules/colyseus.js/lib/Client.js:46:23)<br />
at Object.next (/var/www/Server/node_modules/colyseus.js/lib/Client.js:27:53)<br />
at fulfilled (/var/www/Server/node_modules/colyseus.js/lib/Client.js:18:58)<br />
at runMicrotasks (&lt;anonymous&gt;)<br />
at processTicksAndRejections (node:internal/process/task_queues:94:5)<br />
left y9BSgj4jF vp1ZqNWC8<br />
left y9BSgj4jF uGzjwVgVa<br />
left y9BSgj4jF 9fOJ5SdoC<br />
left y9BSgj4jF Yvip_paAz<br />
left y9BSgj4jF JaRwqtFrR<br />
left y9BSgj4jF lYL3rY1cm<br />
left y9BSgj4jF igZyCtr8n<br />
left y9BSgj4jF VG_XLxXhd<br />
2023-03-06T12:03:32: PM2 log: App name:Server id:1 disconnected<br />
2023-03-06T12:03:32: PM2 log: App [Server:1] exited with code [1] via signal [SIGINT]</p>
]]></description><link>http://discuss.colyseus.io/topic/939/server-goes-shutdown-after-matchmakeerror</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/939/server-goes-shutdown-after-matchmakeerror</guid><dc:creator><![CDATA[chungxa]]></dc:creator><pubDate>Mon, 06 Mar 2023 15:48:02 GMT</pubDate></item><item><title><![CDATA[Manual trigger update for schema]]></title><description><![CDATA[<p>Hello! first of all, the classic: &quot;Sorry for my english&quot;, now, the question:</p>
<p>I am trying to avoid as much as possible data updates from the server. In my game, I'd like to mark a field &quot;position&quot; of game entities in a manual way, some like &quot;entity.pos.sendUpdate()&quot;. Because I don't need every position all the time, because th client can calculate by itself, but I need them to be present. Also, a nice feature also would be you can set a &quot;patchRate&quot; for a specifics schemas: Some examples I can think of</p>
<p>@type(&quot;number&quot;, patchRate= 500)<br />
&quot;updates this number every 500ms, or when you call sendUpdate() manually in the next inmediate main path upddte, and when the client first synchronization&quot;</p>
<p>@type(&quot;number&quot;, pathRate: 0)<br />
&quot;only update manually and in the first state sync&quot;</p>
<p>Sorry if there are sintax error, take that as a pseudocode, since Im currentry in the smartphone.</p>
<p>There might be a way to do that with the current version of colyseus, but I wasn't able to find it.</p>
<p>My best try was, to set 2 position attributes, one marked as &quot;type&quot; and not the other, so I can schedule manually the synchronization, but it becomes a mess quickly.</p>
<p>Some examples for games that don't need every update from the position of the player I can think of: Old School Runescape / Rucoy online (the server sends the calculated path but not every change of the player position) (well, I am almost sure)</p>
<p>Thanks in advance!</p>
]]></description><link>http://discuss.colyseus.io/topic/900/manual-trigger-update-for-schema</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/900/manual-trigger-update-for-schema</guid><dc:creator><![CDATA[bhenzo]]></dc:creator><pubDate>Sun, 29 Jan 2023 15:32:16 GMT</pubDate></item><item><title><![CDATA[Colyseus unity sdk initialized issue]]></title><description><![CDATA[<p>I have a problem understanding the documentation on how can I initialized or insert this code 👇 in <a href="https://github.com/colyseus/colyseus-unity-sdk" rel="nofollow">https://github.com/colyseus/colyseus-unity-sdk</a><br />
ColyseusClient client = new ColyseusClient(&quot;ws://localhost:2567&quot;);<br />
<img src="/assets/uploads/files/1668692053587-8a45c775-ffcb-40ad-9f57-faf68df26f6b-image.png" alt="0_1668692049881_8a45c775-ffcb-40ad-9f57-faf68df26f6b-image.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://discuss.colyseus.io/topic/834/colyseus-unity-sdk-initialized-issue</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/834/colyseus-unity-sdk-initialized-issue</guid><dc:creator><![CDATA[Kimmydoray]]></dc:creator><pubDate>Thu, 17 Nov 2022 13:37:00 GMT</pubDate></item><item><title><![CDATA[Ping interval]]></title><description><![CDATA[<p>Hi, I'm a Colyseus newbie so pardon my dumb questions.</p>
<p>The game we're developing on Colyseus and PlayCanvas runs within a <em>corporate</em> intranet.  The players are facing issues after the corporate firewall cuts off the websocket connection after it sees say... 15 mins inactivity.  For some reason, the clients have difficulty reconnecting when that happens.</p>
<p>Can I have some clarity on what the ping interval really means?<br />
Assuming the default of 3 seconds for the ping interval:<br />
Does it mean:<br />
a) how <em>often</em> the server pings the client<br />
b) how much time is tolerated for inactivity i.e. if the client don't make any calls to the server for a period of 3 seconds, it's considered inactive and it's given &quot;retry&quot; i.e. server gives the client another 3 more seconds, after which it is considered inactive.</p>
<p>In the context I described, I was thinking of doing a regular websocket &quot;ping&quot; to the Colyseus server  every 30 seconds just to register some activity on the websocket.  Do you guys think it's a good idea or it's really unnecessary?</p>
<p>Thanks for your tips/suggestions.</p>
]]></description><link>http://discuss.colyseus.io/topic/832/ping-interval</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/832/ping-interval</guid><dc:creator><![CDATA[mav8rick]]></dc:creator><pubDate>Tue, 15 Nov 2022 04:10:34 GMT</pubDate></item><item><title><![CDATA[How far can I decrease the patch rate?]]></title><description><![CDATA[<p>I’ve decreased the patch rate from the default 50ms to 16.7ms so things get updated quicker on the front end. So far everything seems fine when I test it, but is there a trade off to decreasing the patch rate that I should be aware of?</p>
]]></description><link>http://discuss.colyseus.io/topic/813/how-far-can-i-decrease-the-patch-rate</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/813/how-far-can-i-decrease-the-patch-rate</guid><dc:creator><![CDATA[nameless]]></dc:creator><pubDate>Fri, 04 Nov 2022 06:33:25 GMT</pubDate></item><item><title><![CDATA[What is the ideal ping interval?]]></title><description><![CDATA[<p>I'm fairly new to colyseus arena but the game that I'm currently testing works great if both players have a good internet connection, but if one player's connection is slow things start to lag extremely badly and they don't get kicked. Would the best way to fix this be to lower the ping interval because it seems like the default of 3000ms is too forgiving to kick them when their connection is slow. What would be the ideal middle ground so players don't get kicked too often but also aren't allowed to play if they're lagging too much?</p>
]]></description><link>http://discuss.colyseus.io/topic/802/what-is-the-ideal-ping-interval</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/802/what-is-the-ideal-ping-interval</guid><dc:creator><![CDATA[nameless]]></dc:creator><pubDate>Sat, 29 Oct 2022 00:48:16 GMT</pubDate></item><item><title><![CDATA[Index of item in an ArraySchema]]></title><description><![CDATA[<p>Hi! I'm currently facing some issues about the ArraySchema.</p>
<p>To resume the situation, I have a Schema (<strong>team</strong>) which contain an ArraySchema (<strong>players</strong>). When a user click on a button he will join the team and he will be added to the ArraySchema mentionned above to become a player.</p>
<p>When the user left the application, I added a function to splice the ArraySchema mentionned above at the exact index of that player. To make sure that the player is correctly removed from the ArraySchema, I added a <em>console.log</em> in the <em>onRemove</em> callback.</p>
<p>Now, when a new user logging and click on the button to join the team, the player index should be the current amount of player. However, the index of the player is always increasing even if I remove multiple items from the ArraySchema.  Am I missing something? Thanks :)</p>
<p>Here's a little snippet to showcase the structure:</p>
<p><img src="/assets/uploads/files/1666725593595-screenshot-2022-10-25-151945.png" alt="0_1666725600869_Screenshot 2022-10-25 151945.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://discuss.colyseus.io/topic/800/index-of-item-in-an-arrayschema</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/800/index-of-item-in-an-arrayschema</guid><dc:creator><![CDATA[Rangerz132]]></dc:creator><pubDate>Tue, 25 Oct 2022 19:20:11 GMT</pubDate></item><item><title><![CDATA[Reasons for onLeave code 1006]]></title><description><![CDATA[<p>Hello,<br />
I have a self hosted server, a few hundred times a day my clients receive an onLeave callback from Colyseus with code 1006.  My server is not reporting any errors and im not seeing any patterns in the &quot;breadcrumbs&quot; on my clients code. It seems to be happening randomly. Is there any way to debug this? What are some causes for a 1006 error? I saw another post about this from 2019 but with no answers so i thought i would ask again. Any ideas of how to debug would be appreciated!</p>
<p>Thanks,<br />
Mitch</p>
]]></description><link>http://discuss.colyseus.io/topic/789/reasons-for-onleave-code-1006</link><guid isPermaLink="true">http://discuss.colyseus.io/topic/789/reasons-for-onleave-code-1006</guid><dc:creator><![CDATA[mitchmeyer1]]></dc:creator><pubDate>Thu, 13 Oct 2022 21:18:05 GMT</pubDate></item></channel></rss>