Discuss Scratch
- Discussion Forums
- » Suggestions
- » Cloud server functions
- savaka
-
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
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
-
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)
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
-
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?
But, what if they made it so you could set up a server that updated the data?
- savaka
-
1000+ posts
Cloud server functions
I don't think anyone would buy a computer just for their Scratch project. 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?
- AonymousGuy
-
1000+ posts
Cloud server functions
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.I don't think anyone would buy a computer just for their Scratch project. 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?
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
-
1000+ posts
Cloud server functions
But then you'd have to keep your computer on all the time.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.I don't think anyone would buy a computer just for their Scratch project. 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?
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.
- AonymousGuy
-
1000+ posts
Cloud server functions
Yes, I know. Which is why this would both be a bad idea and hard to implement.But then you'd have to keep your computer on all the time.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.I don't think anyone would buy a computer just for their Scratch project. 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?
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
-
1000+ posts
Cloud server functions
Is client-side like the “user-projects?” 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)
- ShadowFlareX
-
100+ posts
Cloud server functions
Client side is all what scratch runs off of.Is client-side like the “user-projects?” 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)
- savaka
-
1000+ posts
Cloud server functions
It'd be much easier with this. how do you make a REAL multiplayer game online
- Discussion Forums
- » Suggestions
-
» Cloud server functions