Multiplayer Questions

This is mostly a question for @richard and the makecode team (@MakeCode ). Is there a planned fix for the screen expansion thing. I know it isn’t technically officially supported but it’s just kinda limiting. Also I know you’ve stated this before but do you have an idea of when the seperate multiplayer screen could be implemented? No rush of course i was just curious. On this topic i’d also like to say the multiplayer settings are very helpful and work very well! Thanks for your time
-JtSpeedRun

Disclaimer: This wasn’t made to rush anyone I was just curious!

2 Likes

This is not something we’re working on right now

5 Likes

How do you add multiplayer with this set up
Screenshot 2024-04-30 2.20.01 PM
Screenshot 2024-04-30 2.18.17 PM
Screenshot 2024-04-30 2.18.23 PM
Screenshot 2024-04-30 2.18.33 PM

1 Like

@mcodes are you asking how you could take a game with one player sprite and turn it into a game with multiple player sprites?

I could give some more detailed advice if you shared a link to your game.

yeah okay its a mario project

@mcodes the basic way you convert a project to a multiplayer project is to swap the blocks in your code with the multiplayer versions of those blocks.

For example, this snippet of code:

image

Would become this:

image

And this jumping code:

image

Becomes this:

image

(note that I dragged the local “player” variable out of the button event).

Once you’ve done that, you can create multiple player sprites by looping over the “array of all players” block like so:

image

(again, I dragged the local “value” variable out of the for-loop)

Finally, in all of your overlap events, make sure that instead of referencing “mySprite”, you drag the local sprite variable out of the event

work in progress!

what do mean by this

@mcodes whenever you’re using an event block that involves sprites (e.g. sprite overlaps, tilemap overlaps, etc.), you generally want to drag the local variable out of the event instead of referencing a global one. For example, in this GIF instead of the global myEnemy I drag the “othersprite” variable out of the event and use that.

drag-local

1 Like

Im trying to make a goomba but I cant figure out how to stomp them I just want them to stay still btw may someone help me