Discuss Scratch

GamerMYM
Scratcher
100+ posts

How to add multiplayer mode to your game?

Well I've been confused with it for years. Tell me the most basic way and how it all works.
BigNate469
Scratcher
1000+ posts

How to add multiplayer mode to your game?

Cloud variables. You have “Scratcher” status, so you can use them. When you go to create a variable, check the “cloud variable” box at the bottom. Cloud variables sync across all instances of a scratch project every 1/10 of a second automatically. You can have a maximum of 10 cloud variables, and each cloud variable can hold up to 256 NUMBERS- cloud variables don't support anything else. You can send any type of data across cloud variables, including things like player coordinates- but be warned, there is latency (as I mentioned above). Scratch runs at 30 frames per second (fps) but cloud variables sync every 1/10 of a second, meaning that at fastest another player appears to be moving at 10 fps.

Alternatively, you can add support for multiple input devices or multiple places on your keyboard for local multiplayer.

Here is an example of someone pushing cloud variables to their limit (at its peak, this project had 120+ active players at any given point in time, and it could track the highscore in real time): https://scratch.mit.edu/projects/612229554/.

Recently the scratch team decided to make cloud variables able to hold a maximum of 256 characters, breaking many projects that used much longer cloud variables to transmit large amounts of info.

Basically, Scratch only provides a way to sync info across instances running a scratch project (and that includes more than one tab running the same project). It's up to you to make it work as a multiplayer game

Last edited by BigNate469 (March 13, 2024 14:47:18)

GamerMYM
Scratcher
100+ posts

How to add multiplayer mode to your game?

BigNate469 wrote:

Cloud variables. You have “Scratcher” status, so you can use them. When you go to create a variable, check the “cloud variable” box at the bottom. Cloud variables sync across all instances of a scratch project every 1/10 of a second automatically. You can have a maximum of 10 cloud variables, and each cloud variable can hold up to 256 NUMBERS- cloud variables don't support anything else. You can send any type of data across cloud variables, including things like player coordinates- but be warned, there is latency (as I mentioned above). Scratch runs at 30 frames per second (fps) but cloud variables sync every 1/10 of a second, meaning that at fastest another player appears to be moving at 10 fps.

Alternatively, you can add support for multiple input devices or multiple places on your keyboard for local multiplayer.

Here is an example of someone pushing cloud variables to their limit (at its peak, this project had 120+ active players at any given point in time, and it could track the highscore in real time): https://scratch.mit.edu/projects/612229554/.

Recently the scratch team decided to make cloud variables able to hold a maximum of 256 characters, breaking many projects that used much longer cloud variables to transmit large amounts of info.

Basically, Scratch only provides a way to sync info across instances running a scratch project (and that includes more than one tab running the same project). It's up to you to make it work as a multiplayer game

I appreciate the quality answer but cloud variables never seem to work for me.. regardless, I'll try it again. I used to experiment with them like 3 - 4 years ago.
TangerineCatcher
Scratcher
1 post

How to add multiplayer mode to your game?

Cloud variables. The most confusing thing I have ever come across on here. I don't know much about them, but I do know that anything multiplayer related is very complicated. If you are a beginner, I recommend avoiding cloud variables as they take some understanding to use. Also, don't confirm any of my advice. I am not entirely experienced with multiplayer creation. I will update this if I figure it out, but I think everyone else has got you covered for this question.

Last edited by TangerineCatcher (Oct. 27, 2024 19:08:38)

ametrine_
Scratcher
1000+ posts

How to add multiplayer mode to your game?

TangerineCatcher wrote:

Cloud variables. The most confusing thing I have ever come across on here. I don't know much about them, but I do know that anything multiplayer related is very complicated. If you are a beginner, I recommend avoiding cloud variables as they take some understanding to use. Also, don't confirm any of my advice. I am not entirely experienced with multiplayer creation. I will update this if I figure it out, but I think everyone else has got you covered for this question.
please don't necropost
GamerMYM
Scratcher
100+ posts

How to add multiplayer mode to your game?

ametrine_ wrote:

TangerineCatcher wrote:

Cloud variables. The most confusing thing I have ever come across on here. I don't know much about them, but I do know that anything multiplayer related is very complicated. If you are a beginner, I recommend avoiding cloud variables as they take some understanding to use. Also, don't confirm any of my advice. I am not entirely experienced with multiplayer creation. I will update this if I figure it out, but I think everyone else has got you covered for this question.
please don't necropost

At least I'm still searching for responses
ametrine_
Scratcher
1000+ posts

How to add multiplayer mode to your game?

GamerMYM wrote:

At least I'm still searching for responses
oh i forgot that was a thing, sorry :p
zixm
Scratcher
2 posts

How to add multiplayer mode to your game?

how do you add multiplayer
N8_D_GR8_1
Scratcher
1000+ posts

How to add multiplayer mode to your game?

zixm wrote:

how do you add multiplayer
In the future, please create a new post for any questions you have. There are plenty of tutorials for that. Here's one that may help:

https://scratch.mit.edu/projects/161847562/
FatimaGondal
Scratcher
6 posts

How to add multiplayer mode to your game?

how do you make it into your games like this game https://scratch.mit.edu/projects/1134086545 so can you help
N8_D_GR8_1
Scratcher
1000+ posts

How to add multiplayer mode to your game?

FatimaGondal wrote:

how do you make it into your games like this game https://scratch.mit.edu/projects/1134086545 so can you help
Make sure you read the topic replies before posting. (See my previous post)

Powered by DjangoBB