Discuss Scratch

AppleArrowPro
Scratcher
74 posts

is it possible to make online multiplayer?

OOI NEED AN EXPLANATION!!!!:

Last edited by AppleArrowPro (April 10, 2014 19:53:00)

wolfiewolf17
Scratcher
2 posts

is it possible to make online multiplayer?

Lets say you wanted to make a sprite move to the left 3 paces a bunch of times, but didn't want to keep on putting in a bunch of blocks, so you would make a purple block called, say, move left 3. So when you got the Define block, just connect the Move left 3 paces stuff under it. Then you can just take out the regular “move left 3” block and attach it to whatever and it will behave like any other block!
SoccerNinja
Scratcher
35 posts

is it possible to make online multiplayer?

I am m

butterking829 wrote:

MCAnimator3D wrote:

It is possible to create a multiplayer game, but it is soooo complicated. First you have to set up a connection with another player, then you have to assign controls to just one computer so one player doesn't control the other and you have to update the cloud variables every few milliseconds for the other players to receive data and move the other player. On top of that, strings are not allowed in cloud variables so you have to translate all the letters to a number value and translate it back to a string just so you can display one's username. And on top of that, cloud lists aren't released yet, so some values just need to be compiled into one variable and decompiled to read the data. And on top of that, cloud variables only have a limit of ten per project, so you can't create too many for separate values (that's where cloud lists would be useful).

Looks like I went a little too far answering the question, “Is it possible to make a multiplayer game”.

Oh and the part about following 1234abcdcba4321 is his signature. That's something that almost everyone has (mine is the 90 Degree Games banner below).
Well, could you show me in BLOCKS how to do it? I would like to set up a multiplayer game where you battle an online opponent.
I am making an engine and it is VERY COMPLEX! too complex to put into blocks.(in my opinion)
AppleArrowPro
Scratcher
74 posts

is it possible to make online multiplayer?

wolfiewolf17 wrote:

Lets say you wanted to make a sprite move to the left 3 paces a bunch of times, but didn't want to keep on putting in a bunch of blocks, so you would make a purple block called, say, move left 3. So when you got the Define block, just connect the Move left 3 paces stuff under it. Then you can just take out the regular “move left 3” block and attach it to whatever and it will behave like any other block!

what the wha?
MiniFluffyBug
Scratcher
500+ posts

is it possible to make online multiplayer?

wolfiewolf17 wrote:

Lets say you wanted to make a sprite move to the left 3 paces a bunch of times, but didn't want to keep on putting in a bunch of blocks, so you would make a purple block called, say, move left 3. So when you got the Define block, just connect the Move left 3 paces stuff under it. Then you can just take out the regular “move left 3” block and attach it to whatever and it will behave like any other block!
That wouldn't work. You could use a repeat block. But it wouldn't work because you need to define it. Like it a dictionary. For what it means, you can't just put the word.
AppleArrowPro
Scratcher
74 posts

is it possible to make online multiplayer?

butterking829 wrote:

AonymousGuy wrote:

butterking829 wrote:

AonymousProfessor wrote:

In theory, yes.
In practice, cloud variables are really slow to update and not very many people have figured out a way to get around this. (griffpatch has)
ok. Well, is there a possible way you could show me in BLOCKS sir?
Yes.
when gf clicked
set [My Id v] to (Cloud ID)
change [Cloud ID v] by (1)
decode (Cloud List Var) //category=custom
if <not <[decoded list v] contains (username)>> then
wait until <(Cloud Person's Turn) = (My Id)>
decode (Cloud List Var) //category=custom
add (username) to [decoded list v]
encode decoded list //category=custom
set [Cloud List Var v] to (encoded value)
change [Cloud Person's Turn v] by (1)
end
forever
decode (Cloud List Var) //category=custom
if <(Cloud Person's Turn) = (MyId)> then
Here's where the updating scripts go //category=grey
else
Draw Everyone //category=custom
end
end
Or at least that's how I would do it. (Well, the changing of the “Cloud Person's Turn” needs to be a bit different, but whatever)

And I have made it like this, except it didn't work, because of the “in practice” section of what I said above.

How do you do the darkish reddish script thingy????



what is the updating script thingy???
(please explain in scripts.)
AppleArrowPro
Scratcher
74 posts

is it possible to make online multiplayer?

Spriterocket wrote:

I haven't tried the string. (I'm a new scratcher right now=no cloud variables )
when green flag clicked
change [Cloud Variable: players v] by (1)
if <(Cloud Variable: players) = [2]> then

say [Game Found] for (2) secs
broadcast [Start v]

else
change [Cloud Variable: players v] by (-1)
say [No Game Found] for (2) secs
end
To log on
I have no idea how to automatically stop the stream if the player hits the stop sign, though.
GR8!!!
AppleArrowPro
Scratcher
74 posts

is it possible to make online multiplayer?

AppleArrowPro wrote:

Spriterocket wrote:

I haven't tried the string. (I'm a new scratcher right now=no cloud variables )
when green flag clicked
change [Cloud Variable: players v] by (1)
if <(Cloud Variable: players) = [2]> then

say [Game Found] for (2) secs
broadcast [Start v]

else
change [Cloud Variable: players v] by (-1)
say [No Game Found] for (2) secs
end
To log on
I have no idea how to automatically stop the stream if the player hits the stop sign, though.
GR8!!!
I know how to log on!

when green flag clicked
if <(answer) = [mario and luigi]> then
ask [user name] and wait
if <(answer) = [abc123]> then
say [welcome "mario and luigi"!!!] for (2) secs

end

end
AonymousProfessor
Scratcher
100+ posts

is it possible to make online multiplayer?

Okay, I finally made the script I was sort of making an obscure reference to above.

It's kind of complicated, but here is the link.
butterking829
Scratcher
48 posts

is it possible to make online multiplayer?

Spriterocket wrote:

I haven't tried the string. (I'm a new scratcher right now=no cloud variables )
when green flag clicked
change [Cloud Variable: players v] by (1)
if <(Cloud Variable: players) = [2]> then

say [Game Found] for (2) secs
broadcast [Start v]

else
change [Cloud Variable: players v] by (-1)
say [No Game Found] for (2) secs
end
To log on
I have no idea how to automatically stop the stream if the player hits the stop sign, though.
yes yes, but what would I do to make it so the other players are visible? i understand the connection though.
kmissioneer
Scratcher
67 posts

is it possible to make online multiplayer?

i have made a multiplayer game that works, and, trust me, it is considerably more complicated than anyone here makes it seem, except for this guy, who pretty much summed it up in an extremely basic way.

MCAnimator3D wrote:

It is possible to create a multiplayer game, but it is soooo complicated. First you have to set up a connection with another player, then you have to assign controls to just one computer so one player doesn't control the other and you have to update the cloud variables every few milliseconds for the other players to receive data and move the other player. On top of that, strings are not allowed in cloud variables so you have to translate all the letters to a number value and translate it back to a string just so you can display one's username. And on top of that, cloud lists aren't released yet, so some values just need to be compiled into one variable and decompiled to read the data. And on top of that, cloud variables only have a limit of ten per project, so you can't create too many for separate values (that's where cloud lists would be useful).

Looks like I went a little too far answering the question, “Is it possible to make a multiplayer game”.

Oh and the part about following 1234abcdcba4321 is his signature. That's something that almost everyone has (mine is the 90 Degree Games banner below).

If you want to see just how complicated it has to be (and, trust me, it has to be this complicated, or else it won't work), go here. This is @griffpatch ‘s most basic multiplayer base. Take a glance at the multiplayer sprite. The game i made was a remix of this, although i changed a considerably large amount. Really, best way to make a multiplayer game would be to just remix this base, study it’s scripts, and then remove and change things to make it your own.
Spriterocket
New Scratcher
3 posts

is it possible to make online multiplayer?

butterking829 wrote:

Spriterocket wrote:

I haven't tried the string. (I'm a new scratcher right now=no cloud variables )
when green flag clicked
change [Cloud Variable: players v] by (1)
if <(Cloud Variable: players) = [2]> then

say [Game Found] for (2) secs
broadcast [Start v]

else
change [Cloud Variable: players v] by (-1)
say [No Game Found] for (2) secs
end
To log on
I have no idea how to automatically stop the stream if the player hits the stop sign, though.
yes yes, but what would I do to make it so the other players are visible? i understand the connection though.

I would make two more sprites (for player 1 and player 2) that would use two more cloud variables to tell the sprites their X and Y positions. On your side you would have a local variable that would determine whether or not you are player one or player two so you can assign the same key controls to both players.
AppleArrowPro
Scratcher
74 posts

is it possible to make online multiplayer?

Alberknyis
Scratcher
1000+ posts

is it possible to make online multiplayer?

Yes, of course it is possible. Just really hard,

Powered by DjangoBB