# How to make Sokoban boxes in MakeCode

**URL:** <https://forum.makecode.com/t/how-to-make-sokoban-boxes-in-makecode/42087>\
**Category:** Help\
**Tags:** make\
**Created:** [February 11, 2026, 7:53pm UTC](https://forum.makecode.com/t/how-to-make-sokoban-boxes-in-makecode/42087 "2026-02-11T19:53:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Janjia](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@Janjia](https://forum.makecode.com/u/Janjia)\
**Post date:** [February 11, 2026, 7:53pm UTC](https://forum.makecode.com/t/how-to-make-sokoban-boxes-in-makecode/42087/1 "2026-02-11T19:53:08Z")

</div>

I already have the grid-based movement, but how do I deal with the box-pushing aspect? If I just make the box react to overlapping with the player, they’ll get pushed against a wall and moved into. What do I do?

---

<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:** [February 11, 2026, 8:08pm UTC](https://forum.makecode.com/t/how-to-make-sokoban-boxes-in-makecode/42087/2 "2026-02-11T20:08:56Z")

</div>

here’s a basic way to do it:

> **[sokoban-basic](https://arcade.makecode.com/24266-75699-74550-43475)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

and here’s a more advanced version that animates the boxes:

> **[sokoban-animated](https://arcade.makecode.com/28270-64434-24240-22702)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Janjia](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@Janjia](https://forum.makecode.com/u/Janjia)\
**Post date:** [February 12, 2026, 5:37pm UTC](https://forum.makecode.com/t/how-to-make-sokoban-boxes-in-makecode/42087/3 "2026-02-12T17:37:22Z")

</div>

I’m not sure these will work. I hand-coded my movement to snap to the grid:

> **[Grid-Snap Movement](https://arcade.makecode.com/S91615-87915-27138-96111)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Not-a-creepy-doll](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/not-a-creepy-doll/32/28255_2.png) [@Not-a-creepy-doll](https://forum.makecode.com/u/Not-a-creepy-doll)\
**Post date:** [February 12, 2026, 5:52pm UTC](https://forum.makecode.com/t/how-to-make-sokoban-boxes-in-makecode/42087/4 "2026-02-12T17:52:00Z")

</div>

The sokuban basic might work, if you make it so if the Player tries to move where the box is the box moves as well

---

<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:** [February 12, 2026, 10:24pm UTC](https://forum.makecode.com/t/how-to-make-sokoban-boxes-in-makecode/42087/5 "2026-02-12T22:24:21Z")

</div>

so something more like this:

 ![arcade-screenshot (7)](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/e/a/ea87ac005c7d58ece28485df4353979004512d4f.png)

---

<div class="post-metadata">

**Author:** ![Janjia](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@Janjia](https://forum.makecode.com/u/Janjia)\
**Post date:** [February 18, 2026, 10:08pm UTC](https://forum.makecode.com/t/how-to-make-sokoban-boxes-in-makecode/42087/6 "2026-02-18T22:08:11Z")

</div>

thanks so much! i’ll try it.
