This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-06-29 02:41:50

Nitezscratch
Scratcher
Registered: 2008-06-20
Posts: 43

Is this possible with "Remote Sensor Connections"?

I've heard about using Python or Actionscript for creating "Scratch Servers" or at least a way to communicate between Scratch Projects, or at least from a project to another program.  This makes me believe that these Remote Sensor Connection could be quite powerful, but I know little about them.  Here's where I stand on the matter:

I currently host all of my projects on NitezProductions.com so that I may be independent of the Scratch.mit.edu servers, use my own ScratchApplet.jar, and provide games that are not hindered by Scratch's restrictive uploader.

I would like to create a server (?) on the NitezProductions domain (yes the same domain that both the projects and the ScratchApplet.jar would be hosted on) that a project could access using Remote Sensor Connections.  In theory, this would allow for the sharing of global variables between the same project on two or more different computers in real-time, as they both connect to this server (?) on the Nitez Productions Domain.

I know this question has been asked before, and in most cases the simple truth is that Scratch is no MMO, and the closest alternative is using VNC such as Mesh.  I have yet to find, however, a forum post in which a person is asking what I am asking while also providing a single domain from which everything would be hosted.  Perhaps this strengthens the hope for the Scratch MMO?

Allow me to explain myself a bit further.  I am not expecting you to "log on" to this project and see 15 little trolls running around the screen that are being controlled by other users.  What I hope can happen however, is that the project could write your character's X and Y location to a global variable stored on the server.  The project would then use a sprite (yes you would have to have many copies of the character sprite so that they could be controlled by real-time changing variables) to represent the person(s) you are playing with.  These "extra" sprites would simply:

<forever>
<go to x:( <{  }> )y:( <{  }> )
<end>

As you can see, it would be... for lack of a better term, simulated-online-multiplayer gameplay.  My reason for the post is to ask this question.  Is all of this in the realm of Science Fiction with regards to Scratch?  Is there another language or web client that could make this possible while Scratch could not?  I know there are plenty of experts on this forum, and I anxiously await your replies.  Thank you.

- Andrew Manning, of Nitez Productions


http://nitezproductions.com/box.pnghttp://nitezproductions.com/sig.gifhttp://nitezproductions.com/box.png

Offline

 

#2 2011-07-01 22:40:40

ironmannn
Scratcher
Registered: 2010-02-20
Posts: 42

Re: Is this possible with "Remote Sensor Connections"?

um, webs dosnt support server hosting, i tried and it gave me a bumch of symbols and dots, servers like mediafire, or rapid share work just fine.

Offline

 

#3 2011-07-01 22:43:52

ironmannn
Scratcher
Registered: 2010-02-20
Posts: 42

Re: Is this possible with "Remote Sensor Connections"?

theres also a catch to this too, all players have to registered as numbers, the commands used to identify players would have to be

<Forever>
<if {<Not{ }> } = { } >
   <Set { } to { }

Offline

 

#4 2011-07-02 13:55:45

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Is this possible with "Remote Sensor Connections"?

Yes, this is possible, but you would either have to change the coding in Scratch to connect to the domain instead of listen for connections, or you could use something like a mirror which connects to Scratch and to the domain/server that you are hosting. I've done this in Python, but sending and receiving variables and broadcasts is very slow.

http://scratch.mit.edu/forums/viewtopic.php?id=50354

I've only gotten it to work on a single Ubuntu computer ( I had to change the Scratch source so it would listen on different ports to test ). But I hope that is a start for what you want.  smile

Offline

 

#5 2011-07-02 14:49:41

Nitezscratch
Scratcher
Registered: 2008-06-20
Posts: 43

Re: Is this possible with "Remote Sensor Connections"?

ironmannn wrote:

um, webs dosnt support server hosting, i tried and it gave me a bumch of symbols and dots, servers like mediafire, or rapid share work just fine.

Strange... yes, I would be fine with using MediaFire.  Thanks for the heads-up.


http://nitezproductions.com/box.pnghttp://nitezproductions.com/sig.gifhttp://nitezproductions.com/box.png

Offline

 

#6 2011-07-02 14:51:41

Nitezscratch
Scratcher
Registered: 2008-06-20
Posts: 43

Re: Is this possible with "Remote Sensor Connections"?

Magnie wrote:

Yes, this is possible, but you would either have to change the coding in Scratch to connect to the domain instead of listen for connections, or you could use something like a mirror which connects to Scratch and to the domain/server that you are hosting. I've done this in Python, but sending and receiving variables and broadcasts is very slow.

http://scratch.mit.edu/forums/viewtopic.php?id=50354

I've only gotten it to work on a single Ubuntu computer ( I had to change the Scratch source so it would listen on different ports to test ). But I hope that is a start for what you want.  smile

Sorry, but I'm a novice when it comes to these things.  How would I "change the source so it would listen on different ports" remember that this has to work in the Java player, so editing the Scratch.image is pointless.  Also, can you explain how to set up Python to work with Scratch?  Will every user that wants to use the server have to have Python installed?


http://nitezproductions.com/box.pnghttp://nitezproductions.com/sig.gifhttp://nitezproductions.com/box.png

Offline

 

#7 2011-07-02 14:59:18

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Is this possible with "Remote Sensor Connections"?

Nitezscratch wrote:

Magnie wrote:

Yes, this is possible, but you would either have to change the coding in Scratch to connect to the domain instead of listen for connections, or you could use something like a mirror which connects to Scratch and to the domain/server that you are hosting. I've done this in Python, but sending and receiving variables and broadcasts is very slow.

http://scratch.mit.edu/forums/viewtopic.php?id=50354

I've only gotten it to work on a single Ubuntu computer ( I had to change the Scratch source so it would listen on different ports to test ). But I hope that is a start for what you want.  smile

Sorry, but I'm a novice when it comes to these things.  How would I "change the source so it would listen on different ports" remember that this has to work in the Java player, so editing the Scratch.image is pointless.  Also, can you explain how to set up Python to work with Scratch?  Will every user that wants to use the server have to have Python installed?

For that you would need to modify the Java code source, but I don't think the Scratch Java Player has network connections already placed in it.

Yes, each person will need Python if they want to host a server or connect to one, but you could create an executable for Windows or something so they won't need Python.

How to connect Python to Scratch: http://scratch.mit.edu/forums/viewtopic.php?id=61628

Offline

 

Board footer