Discuss Scratch

tarafun
Scratcher
3 posts

Multiplayer Server Game

Could anybody help me with a game including a functional multiplayer system. This game is going to be like fortnite or surviv.io. It would also be nice to include real time fighting.

Last edited by tarafun (June 16, 2018 22:34:49)

DrZomgaming
Scratcher
10 posts

Multiplayer Server Game

okay so cloud variables are required. cloud variables basically is data stored in the server. for example, everyone's x and y coordinates and if they're doing something or not.
You might also need lists

when I start as a clone
join the dark side of the force::#000000
switch costume to [stormtrooper]
forever
if <touching [lightsaber]?> then
delete this clone
end
deck26
Scratcher
1000+ posts

Multiplayer Server Game

https://scratch.mit.edu/projects/77775784/ may help but note that cloud variables are limited to 128 digits and you can only have 10 in a project.
EPICPIKAGUY
Scratcher
100+ posts

Multiplayer Server Game

deck26 wrote:

https://scratch.mit.edu/projects/77775784/ may help but note that cloud variables are limited to 128 digits and you can only have 10 in a project.

This was really helpful! The techniques you used were really good, and also space-efficient (though, if you really wanted to, you could have the connection variable be 10 digits long and have each player change a digit.)
tarafun
Scratcher
3 posts

Multiplayer Server Game

I understand the cloud variables for a players slot space. But I don't understand how i can have multiple players in one server without all being shown on another person's screen
deck26
Scratcher
1000+ posts

Multiplayer Server Game

tarafun wrote:

I understand the cloud variables for a players slot space. But I don't understand how i can have multiple players in one server without all being shown on another person's screen
You control what the project shows so it's in your hands!
deck26
Scratcher
1000+ posts

Multiplayer Server Game


EPICPIKAGUY wrote:

deck26 wrote:

https://scratch.mit.edu/projects/77775784/ may help but note that cloud variables are limited to 128 digits and you can only have 10 in a project.

This was really helpful! The techniques you used were really good, and also space-efficient (though, if you really wanted to, you could have the connection variable be 10 digits long and have each player change a digit.)
That risks a cloud far being updated simultaneously by more than one player and data being missed. So you end up with a polling system which itself needs managing. That's why I prefer one cloud far per player.

Last edited by deck26 (June 27, 2018 07:09:07)

Powered by DjangoBB