Creating and Moving Rectangles In Pygame - Beginner Tutorial

preview_player
Показать описание
In this video I will explain how to work with rectangles in Pygame.

I'll go over the two methods of creating them, which is to create them from scratch using the .Rect class or by creating a rectangle from an existing object such as an image using the .get_rect() method.

I'll also explain how to move rectangles and adjust their properties after they have been created.

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

Just stumbled on your channel, it's way too underrated and deserves more views and subscribers!

chigstardan
Автор

your videos gives me an epic beginning for videogames! you're a hero :, )

angelhc
Автор

ive been stuck on rectangles for the whole day thank you very much

oooh_the_bank
Автор

Absolutely brilliant man, your pygame tutorials are hard carrying me right now haha.

yourboizach
Автор

Hi, I don't know if you're still answering those, but is it possible to change the size of the rectangle after it has already been drawn, such as when I press a certain button?

Gentlepork
Автор

Thanks a lot for the tutorial it helped a lot. However, how can I make the rectangle transparent because I have an image bg and not a color bg. I only want to see the soldier.

mariamsalim
Автор

What is the difference between pygame.display.flip() and pygame.display.update()

LoganadoLakings
Автор

Can you code character movement controlled by a mouse click in pygame? Like what would be used in a point and click adventure? Ive looked around for guides but I’ve struggled to understand the answers in stackoverflow as im a relative beginner

Thrawien
Автор

I know it's a little bit after the video was uplaoded, but should I use classes or rectangles?

firej
Автор

Hey can i ask why is my player/character is duplicating when i moved. Or am i shouldn't delete the pygame.draw.rect first?
(btw i have background on it)

carl
Автор

Why attach the image to the rect instead of just controlling the image location directly?

ImWatchinYou