Discuss Scratch

Miou4
Scratcher
100+ posts

Is there a "Better Cloud data" mod?

Yep.
I Always wanted to make a “Virtual World” on Scratch… But i failed.
I Failed because of the 1-2 sec delay on Cloud Data.
Is there a mod/extension to avoid it?
I Know i can use NodeJS to create a custom server, but i don't know anything about JS.
Thanks for the help ^^
WooHooBoy
Scratcher
1000+ posts

Is there a "Better Cloud data" mod?

Not yet D:
Miou4
Scratcher
100+ posts

Is there a "Better Cloud data" mod?

WooHooBoy wrote:

Not yet D:
Duh
D:
GrannyCookies
Scratcher
100+ posts

Is there a "Better Cloud data" mod?

Well… I made a peer-to-peer extension for ScratchExt3 called “Mesh,” but it doesn't save between sessions. If all you want to do is talk to other clients, you can use it
bobbybee
Scratcher
1000+ posts

Is there a "Better Cloud data" mod?

That's… that's the third mesh extension out there .-.
Jonathan50
Scratcher
1000+ posts

Is there a "Better Cloud data" mod?

bobbybee wrote:

That's… that's the third mesh extension out there .-.
What was the second? (I think FireBase mesh was the first)
bobbybee
Scratcher
1000+ posts

Is there a "Better Cloud data" mod?

Jonathan50 wrote:

bobbybee wrote:

That's… that's the third mesh extension out there .-.
What was the second? (I think FireBase mesh was the first)
Mine was first, actually. technoboy10's (the firebase one IIRC) was second, by several months, actually.

We're actually friends (or were, idk). He was mildly embarrassed when I pointed out his mesh was late to the party
https://github.com/bobbybee/mesh-2.0
goldfish678
Scratcher
1000+ posts

Is there a "Better Cloud data" mod?

i wish there was but yeah, there's mesh stuff that you can try out
djdolphin
Scratcher
1000+ posts

Is there a "Better Cloud data" mod?

bobbybee wrote:

That's… that's the third mesh extension out there .-.
I better make a fourth one for good measure.
Jonathan50
Scratcher
1000+ posts

Is there a "Better Cloud data" mod?

bobbybee wrote:

Jonathan50 wrote:

bobbybee wrote:

That's… that's the third mesh extension out there .-.
What was the second? (I think FireBase mesh was the first)
Mine was first, actually. technoboy10's (the firebase one IIRC) was second, by several months, actually.

We're actually friends (or were, idk). He was mildly embarrassed when I pointed out his mesh was late to the party
https://github.com/bobbybee/mesh-2.0
Lol I thought you made Firebase mesh
technoboy10
Scratcher
1000+ posts

Is there a "Better Cloud data" mod?

bobbybee wrote:

Mine was first, actually. technoboy10's (the firebase one IIRC) was second, by several months, actually.

We're actually friends (or were, idk). He was mildly embarrassed when I pointed out his mesh was late to the party
https://github.com/bobbybee/mesh-2.0
Can confirm this.

The main difference between Firebase Mesh and Cloud Data is that Cloud Data allows for the use of variables rather than broadcasts. At one point I had a version of Firebase “cloud” variables, but it didn't quite work properly.

Last edited by technoboy10 (Feb. 3, 2016 05:37:59)

bobbybee
Scratcher
1000+ posts

Is there a "Better Cloud data" mod?

technoboy10 wrote:

bobbybee wrote:

Mine was first, actually. technoboy10's (the firebase one IIRC) was second, by several months, actually.

We're actually friends (or were, idk). He was mildly embarrassed when I pointed out his mesh was late to the party
https://github.com/bobbybee/mesh-2.0
Can confirm this.

The main difference between Firebase Mesh and Cloud Data is that Cloud Data allows for the use of variables rather than broadcasts. At one point I had a version of Firebase “cloud” variables, but it didn't quite work properly.
FWIW my mesh has both <3
mrbobbygreathead
Scratcher
1000+ posts

Is there a "Better Cloud data" mod?

Scratch is still deciding what people should and shouldn't do with cloud data…
TheLogFather
Scratcher
1000+ posts

Is there a "Better Cloud data" mod?

FWIW, the lag on cloud data isn't *so* bad (unless you're connected via the https fallback, which only polls for cloudvar changes once per second…)

My round-trip times are ~220-270 milliseconds for a smallish amount of data, going up to ~330ms for a cloudvar containing 10000 digits - and that has to cross the pond several times (i.e. project running in UK to MIT, MIT to my custom cloud client in UK, custom cloud client in UK to MIT again, then MIT to project in UK again). That comes out to >12000 miles, so it's doing an average of better than quarter the speed of light, which is pretty decent considering there must be a fair bit of latency in there at various points in the journey.

You can test your speed here: https://scratch.mit.edu/projects/96491582/

If you're going to make a custom cloud client that's reasonably real-time, then you really need to receive the cloudvar updates pushed through port 531, rather than polling the varserver every few seconds to see if a cloudvar has changed.

I've made a modification to Dylan's python ScratchAPI which makes this possible - you can find it here:
https://github.com/Dylan5797/ScratchAPI/issues/3
(Note the code snippet I left there wasn't tested with his latest commit, but he should be pushing an update with it at some point today-ish.)

Last edited by TheLogFather (Feb. 4, 2016 14:17:38)

bobbybee
Scratcher
1000+ posts

Is there a "Better Cloud data" mod?

TheLogFather wrote:

FWIW, the lag on cloud data isn't *so* bad (unless you're connected via the https fallback, which only polls for cloudvar changes once per second…)

My round-trip times are ~220-270 milliseconds for a smallish amount of data, going up to ~330ms for a cloudvar containing 10000 digits - and that has to cross the pond several times (i.e. project running in UK to MIT, MIT to my custom cloud client in UK, custom cloud client in UK to MIT again, then MIT to project in UK again). That comes out to >12000 miles, so it's doing an average of better than quarter the speed of light, which is pretty decent considering there must be a fair bit of latency in there at various points in the journey.

You can test your speed here: https://scratch.mit.edu/projects/96491582/

If you're going to make a custom cloud client that's reasonably real-time, then you really need to receive the cloudvar updates pushed through port 531, rather than polling the varserver every few seconds to see if a cloudvar has changed.

I've made a modification to Dylan's python ScratchAPI which makes this possible - you can find it here:
https://github.com/Dylan5797/ScratchAPI/issues/3
(Note the code snippet I left there wasn't tested with his latest commit, but he should be pushing an update with it at some point today-ish.)

Port 843 or whatever is to negotiate Flash's policy file – the idea is that you can't abuse Flash's open sockets to, say, make a distributed email spamming application. It basically just serves a file that say “it's okay Flash, you can connect to me”

If you manage sockets yourselves, it doesn't matter :-)

(IIRC)

Last edited by bobbybee (Feb. 5, 2016 00:23:30)

Miou4
Scratcher
100+ posts

Is there a "Better Cloud data" mod?

Wow, thanks for the help everyone.
I think i'm going to try Scratch Ext, idk
tallontallon
Scratcher
100+ posts

Is there a "Better Cloud data" mod?

Miou4 wrote:

Yep.
I Always wanted to make a “Virtual World” on Scratch… But i failed.
I Failed because of the 1-2 sec delay on Cloud Data.
Is there a mod/extension to avoid it?
I Know i can use NodeJS to create a custom server, but i don't know anything about JS.
Thanks for the help ^^
Well i would say, either have a mod that reveals mesh, or, the harder way, edit the scratch 1.4 programming so mesh is here on offline editor, then pull people towards getting the mesh connected to your mesh IP so they can start playing, also works from window to window, so be aware about it.

Powered by DjangoBB