Share your repls and programming experiences

← Back to all posts
I made TETRIS
DynamicSquid (1973)

Tetris. Yay!

Special thanks to @Codemonkey51, @AARIZBOYA, @CodeLongAndPros, @BobTheTomatoPie, @yuhuiguo, @ChezCoder, @SixBeeps, @Jakman, @OcelotCat, @johnstev111, @HahaYes, and @AbhayBhat for their death message suggestions. So blame/thank them for the death messages xD

Oh, and I suggest you play it with the screen size reduced. 67% worked great for me. Also send me a screenshot of your high score to get a mention!

So this game was actually one of the first games I made using Java/Processing, so I had absolutely no clue what I was doing. That's why the game's terrible. I found this in a old folder that I made a couple months back, and I guess sharing it with you guys wont hurt.

Anyway, after working on this game for four days, I kinda lost all motivation and gave up on continuing to work on this project... However, if this project gets a decent amount of likes, I might regain my motivation and completely refactor the code, and improve the game :)

I also had to do a lot of tweaking to make this game work for repl.it since I did this in another compiler, and repl.it doesn't support some features of Processing, and it's a complete mess.

And before you comment all the bugs about the game and repetition of the code, yes, I know. Here's a complete list of bugs:

  1. pieces don't have side collision detection
  2. the square won't rotate
  3. rotating pieces bypass wall collision detection
  4. line clear is very buggy
  5. the code is complete garbage

But if this game does well (gets a decent amount of likes), then I might regain my motivation to make a better one.

TL;DR

Bottom line is, the code sucks, there's a bunch of bugs, I lost motivation in improving it, but let me know if you want to see a version 2 of Tetris by upvoting :)

Also, I just released Minesweeper v3! Play it here!

Enjoy!

EDIT:

Okay, so you guys have been absolutely amazing so I think I actually might make a second version now. It'll definitely take a while since I'm quite busy with some other stuff (like making Pacman), but thanks to all those who supported this project!

ANOTHER EDIT:

Thanks so much for 50 upvotes! This is my first project which surpassed that mark. And I'm on my way to 500 cycles! Thanks to all! I guess I'll do a 500 cycle special. Coming out soon :)

Commentshotnewtop
Muffinlavania (669)

Wow! Tetris in coding.. Never thought I'd see it...

Muffinlavania (669)

@Muffinlavania also if you mash your arrow keys you can stick a block into another one btw

DynamicSquid (1973)

@Muffinlavania oh thanks! also yeah, I have a list of bugs in the description

HahaYes (903)

The word "Death message " took me a sec to comprehend.

HahaYes (903)

@HahaYes I thought it was blackmail for a sec

mwilki7 (993)

I wouldn't feel too bad.
The line clear algorithm works and I'd say that's the hardest thing about programming tetris. It also looks way better than mine.

DynamicSquid (1973)

@mwilki7 oh thanks! I just checked your out, it's still good too! well, you can't really compare them since we did it in different languages

AlexBean11 (4)

Fatal Error!: Found Raw squid in hard drive. XD

VulcanWM (1731)

I am trying to make a new thing in my website called circuits. It is going to be a bit like cycles. So every time somebody gives me a game or quiz to put on my website, I give them a circuit. Do you have a VWM Gaming Profile so I can note down your 2 circuits? @DynamicSquid

DynamicSquid (1973)

@medcho no, unfortunately not. but don't worry about giving me a prize. Just mentioning me in good enough for me :)

Rithaquick (17)

Bro you have 499 cycles noice

johnstev111 (229)

@DynamicSquid You are at 580... is it going to be a 600 cycle special?

DynamicSquid (1973)

@johnstev111 yeah that's a good point. probably lol

johnstev111 (229)

@DynamicSquid You have 600 cycles... 600 cycle special?

DynamicSquid (1973)

@johnstev111 wait, I have 666 cycles. last time I checked I was at 580. Am I lagging?

DynamicSquid (1973)

@johnstev111 uh... why is it climbing? is this a glitch?

johnstev111 (229)

@DynamicSquid I don't know... A 700 cycle special would do though... EDIT: you have 703 cycles

DynamicSquid (1973)

@johnstev111 yeah lol. wait, I literally just went from 580, to 700 cycles in a couple minutes. I'm really confused... wait, I did get second place on #WEEKLY 1, so I think I go some points of that? I'mma check with some mods

DynamicSquid (1973)

@johnstev111 yeah, I've never seen anything like this. But the really weird part is you can see it too

johnstev111 (229)

@DynamicSquid Well, everybody must see it too...

DynamicSquid (1973)

@johnstev111 yeah... I guess I have 700 cycles now? I'll go talk to a mod

DynamicSquid (1973)

@johnstev111 oh, I actually haven't talked to a mod yet :) I'm too busy doing the WEEKLY #2 challenge

johnstev111 (229)

@DynamicSquid You should talk to one though... this is weird

rkitis (5)

Awesome game! But it feels a lot harder than Tetris used to be. Lol. I got murdered!

DynamicSquid (1973)

@rkitis oh lol :) it's definitely a lot glitcher than traditional tetris. but since all you guys love this, I might make a second version

rkitis (5)

Sweet! You did a great job! Thank you! @DynamicSquid

DynamicSquid (1973)

@rkitis thanks! also don't forget to upvote :)

TheBerserker (2)

'You died till you were dead.' upvote time

BobTheTomatoPie (973)

Btw i get the Dani reference

DynamicSquid (1973)

@BobTheTomatoPie Dani? I do watch him, but I didn't intentionally put a reference in. What is it?

BobTheTomatoPie (973)

Someone made a comment on his vid saying make a 3d game, (or you can't do that?) and now all his videos have that in their titles and if you read the comments it's flooded with (or you can't do that) @DynamicSquid

DynamicSquid (1973)

@BobTheTomatoPie Oh yeah, right right right, that is a Dani reference, forgot about that :)

nt998302 (159)

@BobTheTomatoPie Didn't see this comment. Dani's my favorite dev dude xD

BobTheTomatoPie (973)

This is awesome! Instant upvote!

NoelB33 (279)

If you make a version 2 I challenge you to make mobile support :)

DynamicSquid (1973)

@NoelBryan well, this is a java game, not a HTMl one, and I don't know any html, so...

NoelB33 (279)

I mean it should be possible, but considering I don’t know much java it’s probably really hard. @DynamicSquid

CodeLongAndPros (884)

@NoelBryan

If you make a version 2 I challenge you to make mobile support :)

I challenge you to add support for Windows 3.11. (Which I have)

CodeLongAndPros (884)

@DynamicSquid In QEMU. With Turbo C 3. It’s a personal project.

CodeLongAndPros (884)

@DynamicSquid
No, seriously, it’s better than Win 10.

Jakman (324)

@DynamicSquid if you wanna try that learn kotlin. It is basically Java that lets you try event oriented programming. That means that you can just call words called actions such as the return keyword. Kotlin is basically based around oop and eop. Its great man.

AARIZBOYA (22)

i added somethig on long sppech.

matthewproskils (263)

YES!! MORE THAN 40! 44!

matthewproskils (263)

@DynamicSquid I think i would have gotten a higher score if there weren't so many "bugs"

DynamicSquid (1973)

@matthewproskils yeah lol, if the line clear was working properly, you go go forever on this thing since it never speeds up

matthewproskils (263)

@DynamicSquid lol, when I knock into some weird black spaces with my piece, parts of the piece which are touching the black spaces dissapear.

DynamicSquid (1973)

@matthewproskils yeah, the line clear's really glitchy

Markpg (3)

Funny thing was my brother was watching the movie death note and i got scared for a bit

RayvelArjoon (68)

It's not too smooth. But it's okay. I'd also add small details to this HTML5 game and change the value in the <title> tag; maybe add some metadata too. Also, try using a framework to add to some of the possibilities with game physics and data. I suggest maybe p5 or Phaser.

DynamicSquid (1973)

@RayvelArjoon It's not an HTML game, it's Processing. But thanks anyway! And don't forget to upvote :)

RayvelArjoon (68)

@DynamicSquid Well, you're using HTML, CSS, and JavaScript, so technically it's an HTML5 game.

DynamicSquid (1973)

@RayvelArjoon Actually no, no I'm not. Take a closer look :)

DynamicSquid (1973)

@saopedro you don't know how to play Tetris?

Kopamed (221)

Its quite glitchy - block usually fuse and melt into each other and thus result in their deformed version making it hard to play. But other wise, sick game dude!

DynamicSquid (1973)

@Kopamed yeah, I included a list of bugs in the description, but thanks anyway!

HahaYes (903)

wow, I don't get a shoutout for all my bad jokes. I feel insulted

DynamicSquid (1973)

@HahaYes Oh sorry, I complete lost track. Fixed it now!

HahaYes (903)

@DynamicSquid Lol it was a joke but thanks

nt998302 (159)

@DynamicSquid Not sure if you meant this, but the front page reminded me of Dani xD

DangHoang2 (20)

Nice work!Although it looks kinda ugly, you still got some coding exprience!