<?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[New session overwrite current class data]]></title><description><![CDATA[<p>Hi! I&lt;m currently developing a multiplayer game using Colyseus and I'm having a some issue synching data.</p>
<p>My problem is that :</p>
<p>I have a class <em>PLAYER</em> on the server which contain different data such as his position and his score which is generated on the <em>onJoin()</em> method from the class <em>ROOM</em> . I also have a class <em>PLAYER</em> on the client side which have the exact same properties. The client and the server are running in parallel (authoritative server) because I don't want my clients to wait. My objective is to be able to share the exact same score (which is contain in the <em>PLAYER</em> class) and to update it as well for all client. At the moment, if every client start at the same time, the score will be the exact same one for each session, which is what I want. However, when a new client join the room in progress, every player score and position will be reinitialized... I would like for my new client to have the exact same score and position as the previous one before he joins the room.</p>
<p>How can I fix that? Thanks :)</p>
]]></description><link>http://discuss.colyseus.io/topic/751/new-session-overwrite-current-class-data</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 14:11:23 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/751.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Sep 2022 02:34:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to New session overwrite current class data on Invalid Date]]></title><description><![CDATA[<p>Hi! I&lt;m currently developing a multiplayer game using Colyseus and I'm having a some issue synching data.</p>
<p>My problem is that :</p>
<p>I have a class <em>PLAYER</em> on the server which contain different data such as his position and his score which is generated on the <em>onJoin()</em> method from the class <em>ROOM</em> . I also have a class <em>PLAYER</em> on the client side which have the exact same properties. The client and the server are running in parallel (authoritative server) because I don't want my clients to wait. My objective is to be able to share the exact same score (which is contain in the <em>PLAYER</em> class) and to update it as well for all client. At the moment, if every client start at the same time, the score will be the exact same one for each session, which is what I want. However, when a new client join the room in progress, every player score and position will be reinitialized... I would like for my new client to have the exact same score and position as the previous one before he joins the room.</p>
<p>How can I fix that? Thanks :)</p>
]]></description><link>http://discuss.colyseus.io/post/2119</link><guid isPermaLink="true">http://discuss.colyseus.io/post/2119</guid><dc:creator><![CDATA[Rangerz132]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>