# Multiplayer Questions

**URL:** <https://forum.makecode.com/t/multiplayer-questions/28506>\
**Category:** Help\
**Created:** [April 30, 2024, 2:39pm UTC](https://forum.makecode.com/t/multiplayer-questions/28506 "2024-04-30T14:39:37Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![JtSpeedRun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jtspeedrun/32/33167_2.png) [@JtSpeedRun](https://forum.makecode.com/u/JtSpeedRun)\
**Post date:** [April 30, 2024, 2:39pm UTC](https://forum.makecode.com/t/multiplayer-questions/28506/1 "2024-04-30T14:39:37Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [April 30, 2024, 4:39pm UTC](https://forum.makecode.com/t/multiplayer-questions/28506/2 "2024-04-30T16:39:41Z")

</div>

This is not something we’re working on right now

---

<div class="post-metadata">

**Author:** ![mcodez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mcodez/32/30743_2.png) [@mcodez](https://forum.makecode.com/u/mcodez)\
**Post date:** [April 30, 2024, 9:22pm UTC](https://forum.makecode.com/t/multiplayer-questions/28506/3 "2024-04-30T21:22:22Z")

</div>

How do you add multiplayer with this set up  
 ![Screenshot 2024-04-30 2.20.01 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/6/6a0e7a75e40398352fe809c33cb4969d092ebb57.png)  
 ![Screenshot 2024-04-30 2.18.17 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/f42fe03903830ad018f5050bfa0131d5599b1634.png)  
 ![Screenshot 2024-04-30 2.18.23 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/4/44138dce2bba87e4092568d0aae9dbdecc555257.png)  
 ![Screenshot 2024-04-30 2.18.33 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/d/d0735ee65a729a5f3101464d284e25cbb5b80495.png)

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [April 30, 2024, 9:26pm UTC](https://forum.makecode.com/t/multiplayer-questions/28506/4 "2024-04-30T21:26:53Z")

</div>

@mcodez 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.

---

<div class="post-metadata">

**Author:** ![mcodez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mcodez/32/30743_2.png) [@mcodez](https://forum.makecode.com/u/mcodez)\
**Post date:** [April 30, 2024, 10:10pm UTC](https://forum.makecode.com/t/multiplayer-questions/28506/5 "2024-04-30T22:10:32Z")

</div>

yeah okay its a mario project

> **[soper mareo bors](https://arcade.makecode.com/S18962-49329-16388-71129)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [April 30, 2024, 10:22pm UTC](https://forum.makecode.com/t/multiplayer-questions/28506/6 "2024-04-30T22:22:22Z")

</div>

@mcodez 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](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/d/dc9be47b7202325c074c56f40ceac345ba0aff1b.png)

Would become this:

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/e/e4f75214c22cdec81855c29a6a14cb442d24f749.png)

And this jumping code:

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/0/04d8864f9386a8f57b97a01f15aa974392d1fcfa.png)

Becomes this:

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/1/1f392e7249d346d44c8612a2a0ca714570ccd59d.png)

(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](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/b/b61d7d7e6956ab1875af4b3315aded1c556ee1bb.png)

(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

---

<div class="post-metadata">

**Author:** ![mcodez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mcodez/32/30743_2.png) [@mcodez](https://forum.makecode.com/u/mcodez)\
**Post date:** [April 30, 2024, 10:22pm UTC](https://forum.makecode.com/t/multiplayer-questions/28506/7 "2024-04-30T22:22:45Z")

</div>

work in progress!

---

<div class="post-metadata">

**Author:** ![mcodez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mcodez/32/30743_2.png) [@mcodez](https://forum.makecode.com/u/mcodez)\
**Post date:** [April 30, 2024, 10:48pm UTC](https://forum.makecode.com/t/multiplayer-questions/28506/8 "2024-04-30T22:48:52Z")

</div>

> [@richard](#):
>
> Finally, in all of your overlap events, make sure that instead of referencing “mySprite”, you drag the local sprite variable out of the event

what do mean by this

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [April 30, 2024, 11:00pm UTC](https://forum.makecode.com/t/multiplayer-questions/28506/9 "2024-04-30T23:00:06Z")

</div>

@mcodez 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](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/2c9b6775e76458f20a835036dde53c6f3b530165.gif)

---

<div class="post-metadata">

**Author:** ![mcodez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mcodez/32/30743_2.png) [@mcodez](https://forum.makecode.com/u/mcodez)\
**Post date:** [May 2, 2024, 10:23pm UTC](https://forum.makecode.com/t/multiplayer-questions/28506/11 "2024-05-02T22:23:08Z")

</div>

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

> **[soper mareo bors](https://arcade.makecode.com/31166-39860-83350-37591)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.
