What features of Needle require a networking server like Glitch?

Iā€™ve been playing with Needle on a simple HTML site using the FTP uploader. Most things seem to work fine including having different rooms and more than one user being able to ā€˜seeā€™ other users.

So I am wondering what features in Needle would require a persistent network server/connection?

In a scene such as the sandbox, how does the position of objects get persisted so when you come back to the same room later they are in the same position?

Original Post on Discord

by user 563549194137239552

When youre using those features (e.g. synced room) without specifying a networking backend the engine will fallback to using the template project for networking right now. You can explictly provide a networking backend using the Network component tho.

If you host on glitch it will automatically detect that and use the networking package that is installed with our glitch template

About storage some examples are:

The position is persistent by storing the state on glitch. E.g. synced transforms network translation state which per object guid.

The duplicate component sends the guid for an object to instantiated along with a seed, transform info and the parent which then is stored

When you enter a room that has state the server sends you that so every new user will restore that.

You can store state of anything if you send it as an object that contains a guid field

I think the same is true for the binary formats if i remember correctly (e.g. some data is sent as flatbuffers like the synced transforms or the synced camera or avatar networking)

so I think basically in my simple HTML serverā€¦ if i look deeperā€¦ itā€™s probably not persisting anything but some fetures seem to work like I can see another person in the room or see their changesā€¦ but if i close the browser and come back it would all be gone

by user 563549194137239552

Currently by default all messages are sent via websockets. So you could also switch it to a custom backend. Or host our networking package elsewhere.

It should be still there if you didnt provide a custom backend and it is falling back to use the glitch template (you can see a log in the browser console that tells you which backend it connects to)

ahhhā€¦ i seeā€¦ it is connecting to wss:needle-tiny-starter.glitch.me or something like thatā€¦ that clears up some confusion for sureā€¦ i was wondering how the networking stuff was working from a dumb server

by user 563549194137239552

Itā€™s certainly one area we want to improve in the future;
e.g. you should be able to more clearly specify if you want to use any of the following for networking:
(1) ā€œsome free public thing that doesnā€™t have any reliabilityā€
(2) ā€œyour own thing where youā€™re responsible for everythingā€
(3) ā€œa managed solution (e.g. by Needle) that guarantees reliability to a certain degreeā€

Currently thereā€™s an automatic selection between (1) and (2), and weā€™ve only superficially scratched (3)

Also it should be a per-app choice if you want users to be able to persist data, everything should be ephemereal, some things should be one or the other, etc.