Multiplayer in Hopscotch - How it would work

suggestions
fish4president2020

#1

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]
|
[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


#4

@omtl what do you think?


#5

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!)


#6

please just go away

ugh


#7

Don’t care it’s literally one post downwards


#8

With these

You can already do that.


#9

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


#10

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


#11

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


#12

How would a multiplayer Crossy road work?


#13

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


#14

You need a player 1 and 2 Position variables.


#15

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


#16

Read the conversation above ^^^^^


#17

But how would the servers know where the players are?


#18

Explain that please, @Mr.rex.


#19

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


#20

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


#21

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


#22

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