Multiplayer in Hopscotch - How it would work

Yeah there’s a lot of topics asking for this, but in this one I’m gonna get a lot more in-depth with the idea and how it would work.

So first off, when creating a game it gives you an option to make it singleplayer or multiplayer. That part’s simple. Working out how it would be incorporated into games is a bit more complicated. First, every time you enter a multiplayer project it will start a ‘server’ where you are the admin. Each server you start can only hold 5 users, or 8 if you’re a subscriber. Then there will be an ‘invite user’ button. Click on the button and enter a username (it will have a prediction thingy like when you tag someone on the forum) and choose if you want to make them an admin then hit invite and they’ll be invited. You can only invite the same user to the same game every hour to prevent spam. When you go to exit the game it’ll ask you if you’re sure. Now there will be a new tab, ‘invites,’ which will function identically to the notifications tab. Whenever you get invited, a notification will pop up in your invites tab saying ‘[Username] invited you to play [game] with [optional other invited users]’ and there would be a turquoise button saying Accept and a red button saying Decline. Hitting decline will hide the notification and hitting Accept will take you right into the game as a guest/admin. If the host closes the server the notification will disappear. Admins can invite users, kick users, edit the code and shut down/restart the server (host only,) but guests can only play on, exit and enter the server. Now that we’ve covered the inviting feature, let’s get into the coding aspect.

So first, variable blocks are replaced with global variable and user variable blocks. And yes, they both have the object and iPad variants. Next is a player number block. An example of how to make an object only controllable if you’re P4 is this:

[When (Arrow button) is tapped]
| [Check once if ((Player Number) = (4))]
| | [Change X/Y by (Number)]
| |
| [End]

There will also be a variable, “Total players.”

Now this concept would take some cleverness to make games around so maybe add a tutorial?

There could also be an option to add a chat but I won’t get into that right now.

Any CC on this idea?

Also @Liza @Montoya @Rodrigo @AwesomeOnion


@omtl what do you think?


Hi! In the OMTL guidelines, it says to tag only in the post you want people to see. Please change that.
(Is this a mistake? Let me know!)

1 Like

please just go away


1 Like

Don’t care it’s literally one post downwards


With these

You can already do that.

1 Like

Okay but the global variable is renamed to that in multiplayer mode just to distinguish the two

And also chatting here would require leaving the game

1 Like

Oh yea Really want this ,there also should be

Player [1] X.pos
Player [2] X.pos
Player [1] Y.pos
Player [2] x.pos

That wouldnt work because in my interpretation, the users are basically just variables used to control objects

How would a multiplayer Crossy road work?

Well, the cars would move normally, and the characters would function using code similar to the example in the first post

1 Like

You need a player 1 and 2 Position variables.

No it wasn’t, and you need to stop dude.

Read the conversation above ^^^^^

1 Like

But how would the servers know where the players are?

Explain that please, @Mr.rex.

Oh yeah and also there should be a multiplayer Variable section so then you make a variable Let’s name it [MultiplayerVar1] so then if you increase [MultiplayerVar1] it increases for all of the players

If you don’t get what I mean tell me

Players aren’t physical characters, all it does is changes what character moves when you press the buttons

1 Like

But do you agree that there should be Player1.X.pos/PlayerY.pos

So then you can do [set. pos (player1.x.pos),player1 .y.pos)] .
So then basically when ever player1 moves X.pos or Y.pos it will make the character move where player1 is

Once again players do not have objects assigned to them by default.