# Tetris for makecode

**URL:** <https://forum.makecode.com/t/tetris-for-makecode/8575>\
**Category:** Game Design\
**Created:** [June 7, 2021, 3:51pm UTC](https://forum.makecode.com/t/tetris-for-makecode/8575 "2021-06-07T15:51:18Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![JRT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jrt/32/4826_2.png) [@JRT](https://forum.makecode.com/u/JRT)\
**Post date:** [June 7, 2021, 3:51pm UTC](https://forum.makecode.com/t/tetris-for-makecode/8575/1 "2021-06-07T15:51:18Z")

</div>

so I’ve bin trying to put Tetris in makecode arcade for a wile and I need help anyone who wants can help out. I want to have it like the nes version.

---

<div class="post-metadata">

**Author:** ![E-EnerG-Gamecentral](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/e-energ-gamecentral/32/5353_2.png) [@E-EnerG-Gamecentral](https://forum.makecode.com/u/E-EnerG-Gamecentral)\
**Post date:** [June 7, 2021, 6:59pm UTC](https://forum.makecode.com/t/tetris-for-makecode/8575/2 "2021-06-07T18:59:08Z")

</div>

Randomized Tetris Block Generator (and some art) [https://makecode.com/\_73oUwy1gxLik](https://makecode.com/_73oUwy1gxLik)

---

<div class="post-metadata">

**Author:** ![JRT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jrt/32/4826_2.png) [@JRT](https://forum.makecode.com/u/JRT)\
**Post date:** [June 8, 2021, 12:07am UTC](https://forum.makecode.com/t/tetris-for-makecode/8575/3 "2021-06-08T00:07:23Z")

</div>

thx, by the way I am working on the music: [https://makecode.com/\_ccjh2r7Ciad9](https://makecode.com/_ccjh2r7Ciad9)

---

<div class="post-metadata">

**Author:** ![E-EnerG-Gamecentral](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/e-energ-gamecentral/32/5353_2.png) [@E-EnerG-Gamecentral](https://forum.makecode.com/u/E-EnerG-Gamecentral)\
**Post date:** [June 8, 2021, 3:32pm UTC](https://forum.makecode.com/t/tetris-for-makecode/8575/4 "2021-06-08T15:32:22Z")

</div>

The art + the theme song + some code = [https://makecode.com/\_7ecbFERUbCKW](https://makecode.com/_7ecbFERUbCKW) 🙂

---

<div class="post-metadata">

**Author:** ![JRT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jrt/32/4826_2.png) [@JRT](https://forum.makecode.com/u/JRT)\
**Post date:** [June 8, 2021, 10:28pm UTC](https://forum.makecode.com/t/tetris-for-makecode/8575/5 "2021-06-08T22:28:47Z")

</div>

thanks, I think if we use this we can make it work:  
forever(function () {  
let Tetromino1: Sprite = null  
let Tetromino2: Sprite = null  
if (Tetromino1.bottom ==Tetromino2.y) {  
Tetromino1.setVelocity(0, 0)  
}  
})

---

<div class="post-metadata">

**Author:** ![E-EnerG-Gamecentral](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/e-energ-gamecentral/32/5353_2.png) [@E-EnerG-Gamecentral](https://forum.makecode.com/u/E-EnerG-Gamecentral)\
**Post date:** [June 9, 2021, 6:18pm UTC](https://forum.makecode.com/t/tetris-for-makecode/8575/6 "2021-06-09T18:18:11Z")

</div>

Sorta buggy Tetris pre-alpha 1 - [https://makecode.com/\_3631gTV24VY4](https://makecode.com/_3631gTV24VY4)  
also the tetris blocks don’t collide yet

---

<div class="post-metadata">

**Author:** ![JRT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jrt/32/4826_2.png) [@JRT](https://forum.makecode.com/u/JRT)\
**Post date:** [June 9, 2021, 8:46pm UTC](https://forum.makecode.com/t/tetris-for-makecode/8575/7 "2021-06-09T20:46:03Z")

</div>

that’s ok and thanks but how do we add collision? I tried but I couldn’t get it to work.

---

<div class="post-metadata">

**Author:** ![E-EnerG-Gamecentral](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/e-energ-gamecentral/32/5353_2.png) [@E-EnerG-Gamecentral](https://forum.makecode.com/u/E-EnerG-Gamecentral)\
**Post date:** [June 9, 2021, 11:23pm UTC](https://forum.makecode.com/t/tetris-for-makecode/8575/8 "2021-06-09T23:23:48Z")

</div>

hmm… i’m not sure- maybe if we get help?  
for now here’s a less buggy version - [https://makecode.com/\_JCmLHrH6E0Hh](https://makecode.com/_JCmLHrH6E0Hh)

---

<div class="post-metadata">

**Author:** ![JRT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jrt/32/4826_2.png) [@JRT](https://forum.makecode.com/u/JRT)\
**Post date:** [June 10, 2021, 3:10pm UTC](https://forum.makecode.com/t/tetris-for-makecode/8575/9 "2021-06-10T15:10:52Z")

</div>

I added a way to change the music from A type to B type by pressing J and K [https://makecode.com/\_PLjeEuaoXXwr](https://makecode.com/_PLjeEuaoXXwr)

---

<div class="post-metadata">

**Author:** ![E-EnerG-Gamecentral](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/e-energ-gamecentral/32/5353_2.png) [@E-EnerG-Gamecentral](https://forum.makecode.com/u/E-EnerG-Gamecentral)\
**Post date:** [May 2, 2022, 5:08pm UTC](https://forum.makecode.com/t/tetris-for-makecode/8575/10 "2022-05-02T17:08:09Z")

</div>

I DID IT!  
I managed to add Colision!

> **[Tetris Part I.3 \[Glitch\]](https://arcade.makecode.com/96725-02834-80146-43474)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

However if you reach the top the game crashes ☹

---

<div class="post-metadata">

**Author:** ![Taser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/taser/32/29517_2.png) [@Taser](https://forum.makecode.com/u/Taser)\
**Post date:** [November 27, 2023, 8:54pm UTC](https://forum.makecode.com/t/tetris-for-makecode/8575/11 "2023-11-27T20:54:08Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/8/819784a5bbdfc43fe48657aea2a33ac95a2e451a.png)  
Very strange
