Good evening. I wonder, where are the transforms and all the infos of my room stored? It seems like when I open a room the data are persistent? Or is this just my impression?
Good evening, FragstreetBoy.
The transforms and all information of your room are primarily handled by the SyncedRoom
and SyncedTransform
components in the Needle Engine. The SyncedRoom
manages the network connection and allows users to join rooms based on URL parameters or create random rooms. Information about the room, including transforms, is synchronized across connected users.
Room data is persistent in a sense that any object with a guid
field can be saved to persistent storage on the backend. This allows the state to be restored automatically for users who connect later or return to the site. When users reconnect, any data previously stored is sent back to them to maintain room consistency (see networking) (see networking).
If you have more specific questions or if there’s anything else you would like to know, feel free to ask!
3 replies left
thread_2Q3CB4QnfX6XTjWGsEU6JoqB
Reply to this message to continue the conversation
I understand that during my session, but are the information stored on a server to be persistent (so I am able to jump back into a room later, while nobody was in the room for a while)? If so, on which server?
Yes, FragstreetBoy, the information about rooms is indeed stored on a server to be persistent. This allows you to jump back into a room later, even if no one has been in the room for a while.
By default, the Needle Engine connects to a server running on Glitch, which handles the backend functionalities, including persistence of room data. It allows states and transforms to be saved, so users can reconnect later and find the room as they left it (see networking) (see showcase castle).
If you have any further questions or need additional clarifications, feel free to ask!
2 replies left
thread_2Q3CB4QnfX6XTjWGsEU6JoqB
Reply to this message to continue the conversation
Hi, you can host your own server too and in the next major needle engine version networking state will also not be hosted on glitch anymore.
See docs: Networking | Needle Engine Documentation
Hi @marcel thank you for your answer!
These are good news. Do you or @needle-assistant know for how long these data are currently stored at Glitch and can I delete them somehow after the session?
Yes, FragstreetBoy, the data stored at Glitch is subject to a specific retention policy. Generally, for the Needle Engine, when sending an object that has a guid
field, this data is persistent and can be restored for future sessions.
To delete specific state information from the backend storage, you can use the delete-state
key along with an object containing { guid: "guid_to_delete" }
. This would allow you to remove specific data after your session (see networking) (see networking).
If you need to manage the state before disconnecting or at specific times during your project, you can integrate the delete functionality programmatically as needed.
Let me know if you have more questions or need further details!
3 replies left
thread_2Q3CB4QnfX6XTjWGsEU6JoqB
Reply to this message to continue the conversation
Hi, you can delete all state in the current room like so:
Hey @marcel , does that mean in the next major update, it won’t work the way it’s currently working by default? and if so will there be an alternate way to do that?
Hi, no that’s not what it means, it will continue to work the same way but we’ll be able to better integrate with our coming asset platform and provide more features especially regarding 3D file download/upload/hosting
That’s great! If there could be an option to sync rotation and scale along with positio, would be a very exciting feature.
Rotation should already be working - only scale is missing.
We have an issue for the missing scale altough I don’t have an ETA for that at the moment
This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.