# Screen Wrap

**URL:** <https://forum.makecode.com/t/screen-wrap/6450>\
**Category:** Arcade\
**Created:** [March 1, 2021, 10:13pm UTC](https://forum.makecode.com/t/screen-wrap/6450 "2021-03-01T22:13:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mhutter11](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Mhutter11](https://forum.makecode.com/u/Mhutter11)\
**Post date:** [March 1, 2021, 10:13pm UTC](https://forum.makecode.com/t/screen-wrap/6450/1 "2021-03-01T22:13:27Z")

</div>

Is there a way to turn on “screen wrap”?  
So that is my sprite goes off the screen to the right, it  
would appear on the opposite side of the screen?

---

<div class="post-metadata">

**Author:** ![ggiscool](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ggiscool/32/3431_2.png) [@ggiscool](https://forum.makecode.com/u/ggiscool)\
**Post date:** [March 1, 2021, 11:54pm UTC](https://forum.makecode.com/t/screen-wrap/6450/2 "2021-03-01T23:54:35Z")

</div>

> **[screen wrap example](https://arcade.makecode.com/86888-72121-99767-23549)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

well I tried

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [March 2, 2021, 1:32am UTC](https://forum.makecode.com/t/screen-wrap/6450/3 "2021-03-02T01:32:32Z")

</div>

> **[Sprite screen wrapping](https://arcade.makecode.com/49466-30453-97758-13718)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/5/58af72a64a85c9f1dacd65a6f646298f4c968b4f.png)  
So basically what this `on game update` block does is that it loops over all the sprites in `sprites_to_wrap` and checks if they are out of the screen. If they are, teleport them to the opposite side of the screen.

---

<div class="post-metadata">

**Author:** ![omnisImperium](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/omnisimperium/32/2728_2.png) [@omnisImperium](https://forum.makecode.com/u/omnisImperium)\
**Post date:** [March 2, 2021, 4:35pm UTC](https://forum.makecode.com/t/screen-wrap/6450/4 "2021-03-02T16:35:26Z")

</div>

Question: Do the sprites have a maximum velocity. I did a small experiment using your project, where I gave the player a ay of 200, and took away the controls. I did this so I could see how fast would it travel. It was stuck at 500, and wouldn’t move any faster. Is this a bug in the code, or is the mazimum velocity for sprites 500?

---

<div class="post-metadata">

**Author:** ![Agent\_14](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agent_14/32/17567_2.png) [@Agent\_14](https://forum.makecode.com/u/Agent_14)\
**Post date:** [March 2, 2021, 4:35pm UTC](https://forum.makecode.com/t/screen-wrap/6450/5 "2021-03-02T16:35:30Z")

</div>

This should probably be in an extension too…

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [March 2, 2021, 4:38pm UTC](https://forum.makecode.com/t/screen-wrap/6450/6 "2021-03-02T16:38:09Z")

</div>

I think 500 or 512 is the maximum.

---

<div class="post-metadata">

**Author:** ![ggiscool](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ggiscool/32/3431_2.png) [@ggiscool](https://forum.makecode.com/u/ggiscool)\
**Post date:** [March 2, 2021, 4:44pm UTC](https://forum.makecode.com/t/screen-wrap/6450/7 "2021-03-02T16:44:00Z")

</div>

wow you are sooo much smarter than me my attempted screen wrap still glitching

---

<div class="post-metadata">

**Author:** ![Agent\_14](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agent_14/32/17567_2.png) [@Agent\_14](https://forum.makecode.com/u/Agent_14)\
**Post date:** [March 2, 2021, 5:06pm UTC](https://forum.makecode.com/t/screen-wrap/6450/8 "2021-03-02T17:06:45Z")

</div>

Because it teleported you to somewhere that would teleport you back. That was why.
