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

#1 2013-01-22 16:53:30

Scratcher456
Scratcher
Registered: 2010-12-04
Posts: 58

Making 'Rooms' for a Multiplayer Cloud Variables Game

So... The open beta of Scratch 2.0 is coming up, and this is going to involve the introduction of cloud variables. I've been thinking about some ideas for fairly basic games that would use this to create a multiplayer experience. However, one challenge that I keep coming across is the idea of having games with a limited number of players.

     Say, for example, that I want to make a game that is in some way co-op. I can have 2 players who help each other in one way or another (just an idea). 1 sprite could be controlled by a constantly updating set of cloud variables that would be controlled by a player, and the other would be controlled by another set controlled by another player.


     My problem is this: What if I have 4 players online, but the game is 2 player co-op. Any ideas how to split them off into 'rooms' so that they could each play in a 2 player game? Any ideas would be appreciated.


Mining diamonds, mining diamonds, mining diamonds...

Offline

 

#2 2013-01-22 17:04:17

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Making 'Rooms' for a Multiplayer Cloud Variables Game

Scratcher456 wrote:

So... The open beta of Scratch 2.0 is coming up, and this is going to involve the introduction of cloud variables. I've been thinking about some ideas for fairly basic games that would use this to create a multiplayer experience. However, one challenge that I keep coming across is the idea of having games with a limited number of players.

     Say, for example, that I want to make a game that is in some way co-op. I can have 2 players who help each other in one way or another (just an idea). 1 sprite could be controlled by a constantly updating set of cloud variables that would be controlled by a player, and the other would be controlled by another set controlled by another player.


     My problem is this: What if I have 4 players online, but the game is 2 player co-op. Any ideas how to split them off into 'rooms' so that they could each play in a 2 player game? Any ideas would be appreciated.

Well, you could create a cloud list called "rooms", and after each room will be the 1~2 players in it. Then, make each or your global lists so that the first ~3 spaces are for Player1, the next amount for Player2, and on, with blank spaces for people who've dropped out or for rooms without a 2nd player. Finally, you just need to make your game so that it could look at the "rooms" list, find you in there, and figure out which parts of the other cloud lists it should access and which to not. Then, viola! you have a 1~1,000,000+ player gaming experience.

Note, this is all theoretical work seeing as I can't test it.

Anyway, I hope that this helps! Also, hello Scratcher456 and welcome to Scratch! I wish you many great games in the future!

Last edited by ErnieParke (2013-01-22 17:05:25)


http://i46.tinypic.com/35ismmc.png

Offline

 

#3 2013-01-22 17:26:21

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Making 'Rooms' for a Multiplayer Cloud Variables Game

Would be relatively simple using a cloud list. Let's suppose each "room" needs to hold 6 variables. Once you figure out how to assign a room to a group of players, to get each variable you'd do:

((((room #) - [1]) * [6]) + (variable #))


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#4 2013-01-24 12:51:53

Scratcher456
Scratcher
Registered: 2010-12-04
Posts: 58

Re: Making 'Rooms' for a Multiplayer Cloud Variables Game

Ernie, that sounds pretty good... I like the idea!


Mining diamonds, mining diamonds, mining diamonds...

Offline

 

#5 2013-01-24 16:16:59

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Making 'Rooms' for a Multiplayer Cloud Variables Game

Scratcher456 wrote:

Ernie, that sounds pretty good... I like the idea!

Thanks! Remember, if you want something a bit more compact, you could try technoguyx's method.


http://i46.tinypic.com/35ismmc.png

Offline

 

Board footer