Programming Tetris Game, Java (fx) Tutorial 2/2

preview_player
Показать описание
We will create a tetris game in Java FX. I have divided the tutorial into two parts. This is the second part. At the end we programmed a nice tetris game together. I have used eclipse with the plugin e(fx)clipse and the dark theme. Check my channel for more JavaFX tutorials.

If you like what you see, please leave me a like. :)

Here is the first part:

You can download the code here:

--- MUSIC ---

Tetris Music By: EharBeatz
--- --- ---

Thank´s for watching! :)

#JavaFX #GameDevelopment #Tetris
Рекомендации по теме
Комментарии
Автор

nice tutorial, i just wish it could be built in a way that when you run the code, you can see it gradually being built, instead of just writing all the code at once.

keitasmith-
Автор

Thank you for sharing the video of the code, I will help me to learn more. :)

Jocker
Автор

I want to add a MENU scene before the game starts, I created a StartButton and i dont know how to code buttonAction.
Can you help me now bro?Pleaseee

phucpham
Автор

Hey, great video and tutorial. Im very new to programming and was wondering if you could describe the class diagram for this code? Would be very nice of you!

knuthundra
Автор

Привет. У меня почему то возникает ошибка когда фигура падает на дно стакана. В чем может быть проблема? Я делал на JavaFX 8.

АлександрНиколаевичь-ыи
Автор

Thank you for such an awesome tutorial. May I ask one question about the method 'RemoveRows'? At the code line 427(or 6:51), I am quite confused with the reason "lines.size()" is added to the arraylist "lines". Could you kindly explain what is the role of "lines.size()"? Thanks in advance.

eunyoungrowe
Автор

Hello, I followed this great video and it should work BUT, I have a diffrent issue : my program only run the Main class instead of the Tetris one, I don't know how to fix that, can someone help me ?

jean-pierrecarambar
Автор

Could you explain how you detected which lines are full? exactly 6:34 I am confused, when you said it would check along MESH[j][i], which in my opinion goes along first element of each rows, when from my logic it should've gone each cell of the first, second, third etc rows. i tried my logic but it doesn't work, and struggling to understand how you made it happen. If you'd explain this, it would be of great help to me thanks! @gaspar coding

shadmanshahriar
Автор

Can you provide the UML diagram for the code?

shadmanshahriar
Автор

I enjoyed working on this project! I was able to get mine up and running but I have just one question. If I wanted to make the game faster for each line how might I go about doing that? I figured out how to make the game faster starting out by just lowering the value after fall.schedule but I'd like it to start out slower and incrementally become faster as one makes lines and they remove.

basstherapyasmr
Автор

Thank you for your tut, i was able to implement it into my school project! I only have a problem when i remove 3 lines at once, has there been any fix for this bug yet ?

WaldysCZ
Автор

Is there a way to show the next piece on the side? How should I do it?

zarechthedemon
Автор

hey, i hope you can respond to this concern. Why is it that even though theres nothing wrong in your codes but when i try it in mine. Although there is no error but everytime i run it a lot of errors will pop up. What might be the reason of it

ivannemarieobediente
Автор

Can we say that this project is built in MVC architecture?

violetevan
Автор

Could you explain to me the cB method? It seems crucial when rotating the blocks

livebysoda
Автор

Hello! Can you send me jar file of this game?

nature_sounds_AT
Автор

Hallo, nachdem ich nun stundenlang deinen Code mitgetippt habe, wollte ich deine schöne App endlich starten. Dies entpuppte sich jedoch als ungeheuerlichen Krampf und ich habe alles mir mögliche versucht es zum laufen zu kriegen, verschiedene jdk und javafx Versionen in verschiedenen Kombinationen führten leider nicht zum Erfolg. Dies ist bei einer simples hello world Anwendung im übrigen nicht der Fall, dort funktioniert die gui tadellos. Nach mehreren Stunden try and error bin ich nun mit meinem Latein am Ende. Was mache ich bezüglich deiner tetris App falsch?? Danke und Gruß und mach bitte weiter Videos in diesem Stil.

maxron
Автор

hey how do I loop the entire code as in the user wanted to play again?

mohammadzaid
Автор

hey so I've built this project in JavaSE-10 with JavaFX but when I go to run the code I get a blank window with no title and absolutely nothing. do you know why? I changed form to tetromino and maintained that change throughout the program but I'm not sure if that is the culprit

krezzy
Автор

i wanna add a hardDrop function and im stuck lol

derpk
visit shbcf.ru