Socket io does not work

Why Does The Mesh backend https://replit.com/@18001767679/SnapMeshes#index.js
not work with https://replit.com/@18001767679/UnnamedProject#script.js
while it works with Snap! 6.9.0 Build Your Own Blocks ?

Seems that Snap 6.9 in embedded mode has JS disabled.

duh there is a topic about that.

Snap in embedded mode turned off JS extension.
Here, you have info about this→ Snap! version 6.9 and the JavaScript Function block

I turned on JS

hello?@programmer_user?@tussiez?

Tussiez isn't here...

haha just joking

replit.com test code emits ridiculous coordinates like
42["*",{"type":"UnnamedProject","content":{"type":"game","message":{"players":{"0.7295133267408083":{"pos":{"x":-25572.474002453764,"y":-2057.104297767425}}}}}}]

no they aren't ridiculous
don't limit yourself to -240~240 and -180~180

WAT?It rilly reports these?

You can open https://unnamedproject.18001767679.repl.co/ twice and look at Chrome Debug ToolsF12
, "Network"
,entry for "wss://snapmeshes.1800..."
,"Messages" tab.

Message are send between two copies of this test client. You may also run Snap! example with "UnnamedProject" as id to, see message flow.
BTW. you probably should choose some meaningful "socketid" not "UnnamedProject".
I'm not sure if socket server should store and send position of ALL registered clients at once. But record for one client only is returned by server.

ServerSide lag,ping 300ms.
Looks like even the theretically fastest method takes a long time (flask file op:200 ms,node var op:250 ms)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.