Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Making A Multiplayer Racing Game
- Burgame-Productions
-
59 posts
Making A Multiplayer Racing Game
I am back, and on my project, Scratch Cat Racing, I am working on an update that will be adding Online Play, I have seen projects that have this option, but I am looking for tips on how to do that. Help is very much needed. 

- codeman1044
-
1000+ posts
Making A Multiplayer Racing Game
You should use 4 variables at minimum: player1x, player1y, player2x, and player2y. These will be updated when you use the arrow keys instead of the x/y position of the sprites. Since the variables are cloud variables, this will update live.
- Burgame-Productions
-
59 posts
Making A Multiplayer Racing Game
Okay, thanks for the tips, it sorta looks like this? I know the variable would really be a cloud variable
Last edited by Burgame-Productions (May 8, 2019 13:04:55)
- imfh
-
1000+ posts
Making A Multiplayer Racing Game
You could do something like that, but it might disconnect from the cloud server. The forever loop runs 30 times a second. Setting a cloud variable that fast sometimes causes the server to disconnect to prevent it from being overloaded. It's possible you won't have that problem, but you might want to try something like this instead: Okay, thanks for the tips, it sorta looks like this?
The glide block will make the other player move smoothly even if the game lags. You will also need some if blocks so it knows whether the player is player 1, 2, or not playing.
- Burgame-Productions
-
59 posts
Making A Multiplayer Racing Game
You could do something like that, but it might disconnect from the cloud server. The forever loop runs 30 times a second. Setting a cloud variable that fast sometimes causes the server to disconnect to prevent it from being overloaded. It's possible you won't have that problem, but you might want to try something like this instead: Okay, thanks for the tips, it sorta looks like this?
The glide block will make the other player move smoothly even if the game lags. You will also need some if blocks so it knows whether the player is player 1, 2, or not playing.
Okay, I didn't think about that,
thanks for the extra information!
- Mr_Custom
-
100+ posts
Making A Multiplayer Racing Game
This tutorial might be helpful for your player kicking and joining: https://scratch.mit.edu/projects/297268676/
- bgscratchgamesmaker
-
1 post
Making A Multiplayer Racing Game
I had same one I just want a multiplayer I used cloud variables too but it did not work I used my brother's computer too see that but It did not work is there's a solution?
- Discussion Forums
- » Help with Scripts
-
» Making A Multiplayer Racing Game