Beginner Godot Tutorial - How to Make Tetris
HTML-код
- Опубликовано: 8 июн 2024
- Learn the basics of Godot by making a tetris game from scratch.
This tutorial will use the tilemap node to create the game board and game pieces. I will explain how to create the various functions to create, move and rotate the pieces, and to check for and delete completed rows.
A user interface is also created to show the next piece, the current score and new game button.
Code and assets for this video: github.com/russs123/tetris_tut
Incredible tutorial. I really struggled with some of these concepts but I learned a ton. One thing to note - your score UI doesn't refresh back to 0 when starting a new game and will only revert back to 100 (not 0) when you clear your first line on the new game.
I added in my new_game():
score = 0
$HUD.get_node("Score").text = "SCORE: " + str(score)
I'll probably implement a "previous score" and maybe a "high score" UI so you get the best of all 3. Thanks again for the awesome tutorial :)
Ah dang, I must have missed that! Good catch and thanks for posting the fix. Glad you liked the tutorial :)
That was the first tutorial i watched to get into blender and it helped me create my party-game in Godot !
Thanks a lot man, keep it up
I finally see someone using the Tilemap node to create the game Tetris, you know how to take advantage of what Godot has, I thank you, I think that with you I will finally learn how to make this game that I have wanted to make for a long time, because I want to make a game inspired by this. I have subscribed, thanks friend, it's not easy to find good tutorials in Godot (subscribed)
Thanks! I found it a good way to learn tilemaps and get some practice with them while making this game - there's still a lot of tilemap functionality that I haven't used but it's a good start.
If anyone else is wondering why their game is too fast compared to the video, if you have a monitor with a higher refresh rate, you might have to go to Project -> Project Settings (Turn on Advanced Settings) -> Application -> Run -> Max FPS (Set it to 60 to match what's in the tutorial).
Other than that, great tutorial! I liked how you used a 7 bag from the start, and used steps instead of a timer. I also like how clean the code is! Learning how to use TileMaps with this was an absolute delight.
Thank you very much Russ! You can't undertstand how helpful you are, finding tutorials as good as yours is very rare. Being used to Unity I missed the huge amount of tutorials when I changed to Godot, but thankfully I found yours. Keep it up man
Hey Russ - great job. I was able to follow along and got things working just as you did in just a night (though I was porting to C# as I went). I learned a lot about the TileMap - what a nice feature. Thanks a ton.
Thanks! Glad to hear you liked it.
I am really enjoying these tutorials. They may be short, but you learn a lot from them!
Tht is the first tutorial I picked up and I thank you !
I just tried to implemented the level system + speed increse and the HUD as in the OG gameboy version as a fun side exercise, and it worked !<
BTW, I made a mistake : do not use Input.is_action_pressed("ui_up") if you want to rotate your piece.
be careful to use the Input.is_action_JUST_pressed("ui_up") so your piece is rotating at each keystroke, not if the key stays pressed.
Code was right, but I didn't pay close attention ;)
Did the same thing, that piece was SPINNIN'
Just a new subscriber. wanted to learn python especially in games (not for money but for fun) then I found your channel with a lot of information to use. Thank you Russ! I soon can make my own game and play with my children for memories. Keep it up! You're awesome and cool as hell!
Thanks you! Glad you find the videos useful and I'm sure you will be able to make your own games in no time :)
Thanks very much this helped a lot in my godot journey!
Glad you liked it!
Coming from a C# background GDScript isn't too bad. First game in Godot, and everything works well and thank you!
with all the loops it really feels like they would have done it back in the days ( not a bad thing ) , since you are using the tileset node did you try to use the patterns function ( set_pattern function (( takes layer , position , and the pattern you want to draw yourtilemap.tile_set.get_pattern(index) ) ? could save the manuel setup of the pieces ... btw i tried it and i couldnt make the patterns draw maybe you know more :D . anyway thanks for the tut !
would you need to overhaul how the tetriminos are detected to do a scoring system for each row that a player might iterate down? like i guess when the button is held down, for each row + 1 it typically adds to the score
Nice!
Thanks!
valeu pela aula
so cool
Thanks :)
how can we make the movement smooth
1:28 How did you do that?
May I ask what version of Godot you are using?
in the video you can see it's 4.1.1
@@papercavegames Thank you
@@logun886 no problem :)
Well I somehow not completely how you know all these methods.
???