Python and Pygame Tutorial - Build Tetris! Full GameDev Course

preview_player
Показать описание
Learn how to code Tetris in Python with Pygame in this full tutorial. This Python Pygame tutorial is meant for intermediate programmers with some experience, but everyone is welcome to follow along.

If you have trouble downloading the code from the links, make sure you click on DOWNLOAD RAW and then copy the code from there.

Tutorial from Tech With Tim.

--

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

It seems this tutorial is doing a good job in motivating people to try programming. Here are some tips that were missing from the tutorial. Run the program *very* often and do *very* small changes to make sure your code keeps working. It is a good practice to avoid "magic values" in your code. If you use (0, 0, 0) to represent black, write black = (0, 0, 0). If your play area width on screen is game board width times block size in pixels, write play_area_width_px = game_board_width * block_size_px. Also, in this tutorial we are inventing new rules for Tetris as we go. Since we are trying reimplementing an existing game we'd be better off following some existing specification. For example, we might decide to implement the "Standard Rotation System" that specifies one specific way of rotating the blocks.

ToniRuottu
Автор

I think it would be better if you code bit by bit then show the result, then add/fix and explain along the way.
For example,
Step 1 create the grid
Step 2 Add the pieces
-Create class Piece
- ...
...

Farnyyy
Автор

keep uploading such videos. they are gold for us.
we we'll support...

zippytyro
Автор

I really tried to follow but is to much. You need to explain while you are coding and not code and then explain.

Sethyys
Автор

Awesome video. Thanks was a big help. even though there was some errors i was able to cross reference the full code you provided and figure out where to make small changes to get the game to run. The small errors are a good way to learn whats happening and what needs to change, and where. found it vary helpfull in learning rather then just coping code. Thanks keep up the videos

timb
Автор

Hi, thanks for this tutorial it was a great help.
I think i found a bug that I can't quite figure how to fix :
If you fill 2 lines but there is one that is not complete in between those two, then the grid doesn't go down correctly, do you have any idea how to fix this ?

Aghamyr
Автор

The full code link isn't exactly the full code of what he did, like the score and high score code isn't in it and a lots of stuff isn't in it too. And the you lost code doesn't work, it doesn't show you lost when I lost.

AndyTheBoiz
Автор

This is a great tutorial but you do go with this a little fast, and it's hard to catch up. Just a suggestion for future tutorials.

framerate
Автор

how to customize grid size by taking user input?
and also how to add a function/method for calculating and displaying score?
please help me

ADITYAGUPTA-gtue
Автор

thank you so much for uploading this. however I do notice that the final code and the tutorial are different. is there any way we can see the final version? (i think the score portion is not included)

jiwonkim
Автор

This is a great tutorial! But the game is missing some elements like control for hard dropping pieces, the Standard Rotation System which allows for T-spin and I-spin. When I played it, the speed which the pieces are dropping are too fast. Can anyone adjust the speed which the pieces are dropping?

theragingUnegoist
Автор

How do we make the substitute box that is in classic Tetris to sub out the next piece please make a quick video in this to improve playability please and thx this video is Awesome i smashed a like early

-SHEESH-YIKES-
Автор

if we add "score" part in this code ..then the game is not to any suggestions????reply

kotwalmisba
Автор

Tim: Guys if you want to watch this video you have to already have experience with pygame
Also Tim: HEY GUYS HERE'S HOW TO INSTALL PYGAME

alsoSallon
Автор

whats the format for shapes in visual studio code... I'm getting many errors for this format

hephaestus
Автор

I don not understand by the word top_left_x and top_left_y.

TMLA
Автор

I've got a summary for everyon here: "Just type the code I will explain later"

andreclerigo
Автор

I am C# developer using Monogame. I never coded with python. I checked a little bit how things going on with Python and Pygame. Everything looking very strange and different. I can barely understand what things happening here

isimbulamadmobenibulsun
Автор

I almost followed the entire code but when I run, my program is just displaying the window but the shapes are not falling down. Can someone help? I completed till 57:00 of the tutorial

sarfraznawaz
Автор

Error: Display Surface Quits. Plz Explain

vivekraj