Share your repls and programming experiences

← Back to all posts
I made TETRIS
DynamicSquid

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 :)

Voters
Dukdukduk
HOTDOGSANDWICH
comet99
MemeManHimself
maxina
kwab4ever
ninja2k11
GovindRamanan
legobuddy63
programmeruser
Comments
hotnewtop
Muffinlavania

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

Muffinlavania

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

DynamicSquid

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

JBloves27

This is very cool!

DynamicSquid

@JBYT27 thanks!

ChezCoder

ehh! :D

DynamicSquid
HahaYes

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

HahaYes

@HahaYes I thought it was blackmail for a sec

DynamicSquid

@HahaYes oh lol xD

GeorgeLee2468

This is actually great

DynamicSquid

@GeorgeLee2468 thanks :)

Bookie0

Cool !

DynamicSquid

@Bookie0 thanks :)

mwilki7

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

@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

BobTheTomatoPie

Btw i get the Dani reference

DynamicSquid

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

BobTheTomatoPie

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

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

HahaYes
DynamicSquid

@HahaYes that makes me go Y E S S

AphixDev

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

BobTheTomatoPie

This is awesome! Instant upvote!

DynamicSquid

@BobTheTomatoPie thanks! glad you liked it!

Reuben123

@DynamicSquid This is awesome. Good job! :D

DynamicSquid

@Reuben123 thank you!!!

AlexBean11

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

DynamicSquid
firefish

@AlexBean11 Thank you!

VulcanWM

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

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

VulcanWM

Ok sure @DynamicSquid

Rithaquick

Bro you have 499 cycles noice

DynamicSquid

@Rithaquick :) mind getting me to 500?

Rithaquick
Rithaquick

I upvoted :)

DynamicSquid

@Rithaquick yay! I'm at 500 :) thanks!

PowerCoder

@DynamicSquid I got you to 501 :D

DynamicSquid
firefish

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

DynamicSquid

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

firefish

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

DynamicSquid

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

firefish

@DynamicSquid 695? What?

DynamicSquid

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

firefish

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

DynamicSquid

@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

firefish

@DynamicSquid Really weird bug...

DynamicSquid

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

firefish

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

DynamicSquid

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

firefish

@DynamicSquid Yeah.. do that

firefish

@DynamicSquid What has the mod said?

DynamicSquid

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

firefish

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

DynamicSquid

@johnstev111 yeah, imma do that now

[deleted]

Really cool

DynamicSquid

@TheLimifiedCode glad you liked it :)

HahaYes

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

DynamicSquid

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

HahaYes

@DynamicSquid Lol it was a joke but thanks

Wumi4

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

Blackout4344

Omg!! THIS IS AMAZING!

DynamicSquid

@Blackout4344 THANK YOU!

Blackout4344
rkitis

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

DynamicSquid

@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

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

DynamicSquid

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

rkitis
DynamicSquid

@rkitis 😃

TheBerserker

'You died till you were dead.' upvote time

DynamicSquid
BlueComet

WOW THIS IS EPIC

DynamicSquid

THANK YOU!

BobTheTomatoPie

How do you make it speed drop?

DynamicSquid

@BobTheTomatoPie so I think I have to change the delay to like 0, but it's going to be quite laborious since I have to do it for every single piece, and every single orientation. if I end up making a second version, it'll be a lot eaiser

NoelB33

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

DynamicSquid

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

NoelB33

I know I was joking lol @DynamicSquid

DynamicSquid

@NoelBryan oh lol xD

NoelB33

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

DynamicSquid

@NoelBryan yeah, for sure

CodeLongAndPros

@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)

DynamicSquid

@CodeLongAndPros bruh... lol

CodeLongAndPros

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

DynamicSquid
CodeLongAndPros

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

CodeLongAndPros
Jakman

@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

wow nice!

DynamicSquid

@AARIZBOYA thanks :)

AARIZBOYA

i added somethig on long sppech.

LilWolfy

nice game

DynamicSquid

@LilWolfy thanks!

mathiasaboye


R.I.P.

DynamicSquid
matthewproskils

YES!! MORE THAN 40! 44!

DynamicSquid

@matthewproskils Oh sweet! Well done :)

matthewproskils

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

matthewproskils
DynamicSquid

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

matthewproskils

@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

@matthewproskils yeah, the line clear's really glitchy

matthewproskils
Markpg

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

DynamicSquid

@Markpg oh lol!

RayvelArjoon

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

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

RayvelArjoon

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

DynamicSquid

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

RayvelArjoon

@DynamicSquid You sly dog!
I mean squid

DynamicSquid
EDKTHEPRO

@DynamicSquid XD But ur not a dog...

saopedro

how do i play

DynamicSquid

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

Kopamed

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

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