Skip to Content

Can Scratch do multi-user game ?

« Bugs, Troubleshooting, Suggestions
2 replies [Last post]
Ricky Ho
Member

In a multi-user game settings, typically each user has its own local state and exchange messages to update its own state.  I am not aware how these can be achieved in Scratch.  Or anyone can share their tricks ?

The current programming model in powerful enough that a slight extension to a "space" scope should be sufficient to incorporate this capability.

  1. On top of "variable of this sprite" and "variable of all sprites", we add a scope: "variable of all sprites in this space".
  2. When broadcast a message, we add an option to broadcast to all sprites within the space.

The communication among different players VM can happen via P2P or via a hosted message broker

Does it make sense ?  Thoughts ?

 

Rgds, Ricky

http://horicky.blogspot.com

Replies
Stefano Federici
Member

I played with scratch sensor connections, and it worked but it was also a lot of work. I would rather have a look at BYOB, a very nice Scratch-based application (it looks exactly like Scratch, but with a lot more features) by the genial scratcher Jens (http://scratch.mit.edu/forums/viewtopic.php?id=10887). In the share menu you will find new commands to start a "mesh". In the example folder there are also sample projects about multi-player applications.

Karen Brennan
Member

Hi Ricky,

Other than the scoping of variables in Scratch, have you seen Scratch Connections? You might want to check out the Scratch Connections wiki at http://scratchconnections.wik.is/