Discuss Scratch

savaka
Scratcher
1000+ posts

Cloud server functions

DESCRIPTION
I have an idea for a new sprite-ish thing. It is cloud server functions. It would appear on the left side of the sprite pane with the stage. It would never be visible, and therefore have no motion or looks blocks, and no costumes tab (and other stuff like no cloning). Its only hat blocks would be a unique “when cloud flag clicked” block, and the broadcast receiving hat. There would be a cloud flag and stop sign that the creator could use to run the cloud scripts If you used a forever block (which is probably what you’d do), it would repeat forever, and only one instance of it, even if no one was running the project, since it would run on the cloud script server.
EDIT: Similar to cloud data, it doesn't work while see-insiding when not your own so nothing gets saved on the cloud while editing.

EXAMPLE
An example of using this (with broadcasts) is to create an online users detector: The cloud server functions “sprite” sets the cloud variable “onlineUserCounter” to 0 (by the way, cloud server functions can’t use non-cloud variables, since that would do nothing if you could), then broadcasts and waits. When the user-projects (sprite or stage) receive the broadcast, they change the cloud variable “onlineUserCounter” by 1. When they are done, cloud server functions continues its script and sets the cloud variable “onlineUsers” (different cloud variable) to the value of “onlineUserCounter” and starts over with setting “onlineUserCounter” to 0 since the blocks are in in a forever block.

This addition could also help in sending messages to run code between user-projects in multiplayer games and more. If you think new Scratchers might get confused, maybe it could go in advanced view.

EDIT: OTHER IDEA
Another idea if this couldn't be stored on the Scratch server is to have an application to run it on your computer. It could be for Raspberry Pi since you could buy one as a Scratch project server since they're cheap. The app could require you to sign into your Scratch account. When you snapped blocks onto the “run on cloud” hat it wouldn't run instantly, you'd have to click the cloud green flag next to the project name in the app. There would also be a cloud stop sign to stop the cloud server functions in the project.

EDIT: THAT IDEA IS A BAD IDEA

Last edited by savaka (March 12, 2014 22:16:46)

bobbybee
Scratcher
1000+ posts

Cloud server functions

Yes, this idea is the premise to how cloud should be implemented. Unfortunately, this is high on CPU usage, and is difficult to implement given the ST's resources.

I wrote an app that did just this, if you're interested:

https://github.com/bobbybee/JITScratch (although it's inactive and doesn't support client-side)
AonymousGuy
Scratcher
1000+ posts

Cloud server functions

This would be awesome but would crash the scratch servers in 5 minutes flat.

But, what if they made it so you could set up a server that updated the data?
savaka
Scratcher
1000+ posts

Cloud server functions

AonymousGuy wrote:

This would be awesome but would crash the scratch servers in 5 minutes flat.

But, what if they made it so you could set up a server that updated the data?
I don't think anyone would buy a computer just for their Scratch project.
AonymousGuy
Scratcher
1000+ posts

Cloud server functions

savaka wrote:

AonymousGuy wrote:

This would be awesome but would crash the scratch servers in 5 minutes flat.

But, what if they made it so you could set up a server that updated the data?
I don't think anyone would buy a computer just for their Scratch project.
No, I mean run a server off the computer they own. It could be like a minecraft server, all the files and data would be stored on your computer.

It would also be like hosting a web page on your computer.

The only problem is then your computer would be very open to hackers.
savaka
Scratcher
1000+ posts

Cloud server functions

AonymousGuy wrote:

savaka wrote:

AonymousGuy wrote:

This would be awesome but would crash the scratch servers in 5 minutes flat.

But, what if they made it so you could set up a server that updated the data?
I don't think anyone would buy a computer just for their Scratch project.
No, I mean run a server off the computer they own. It could be like a minecraft server, all the files and data would be stored on your computer.

It would also be like hosting a web page on your computer.

The only problem is then your computer would be very open to hackers.
But then you'd have to keep your computer on all the time.
AonymousGuy
Scratcher
1000+ posts

Cloud server functions

savaka wrote:

AonymousGuy wrote:

savaka wrote:

AonymousGuy wrote:

This would be awesome but would crash the scratch servers in 5 minutes flat.

But, what if they made it so you could set up a server that updated the data?
I don't think anyone would buy a computer just for their Scratch project.
No, I mean run a server off the computer they own. It could be like a minecraft server, all the files and data would be stored on your computer.

It would also be like hosting a web page on your computer.

The only problem is then your computer would be very open to hackers.
But then you'd have to keep your computer on all the time.
Yes, I know. Which is why this would both be a bad idea and hard to implement.
savaka
Scratcher
1000+ posts

Cloud server functions

bobbybee wrote:

Yes, this idea is the premise to how cloud should be implemented. Unfortunately, this is high on CPU usage, and is difficult to implement given the ST's resources.

I wrote an app that did just this, if you're interested:

https://github.com/bobbybee/JITScratch (although it's inactive and doesn't support client-side)
Is client-side like the “user-projects?”
ShadowFlareX
Scratcher
100+ posts

Cloud server functions

savaka wrote:

bobbybee wrote:

Yes, this idea is the premise to how cloud should be implemented. Unfortunately, this is high on CPU usage, and is difficult to implement given the ST's resources.

I wrote an app that did just this, if you're interested:

https://github.com/bobbybee/JITScratch (although it's inactive and doesn't support client-side)
Is client-side like the “user-projects?”
Client side is all what scratch runs off of.
kojocrash
Scratcher
12 posts

Cloud server functions

how do you make a REAL multiplayer game online
savaka
Scratcher
1000+ posts

Cloud server functions

kojocrash wrote:

how do you make a REAL multiplayer game online
It'd be much easier with this.

Powered by DjangoBB