Pygame Tutorial #1 - Basic Movement and Key Presses

preview_player
Показать описание
This is a new series on my channel where I am going to be going through the pygame module in python. Pygame is used to make games and is also useful for making software and other types of programs. In this first tutorial I show how to set up the screen and implement basic character movement.

Want to learn the fundamentals of programming? Check out my course:

Please LIKE and SUBSCRIBE for more content!

◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python

◾◾◾◾◾◾

⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡
Рекомендации по теме
Комментарии
Автор

while True:

print('thanks')

BEHDJDHDGAFAJFKNFH
Автор

This is the first time where with my beginner level python knowledge helped me understand something like this. Great Video!

cnnrrche
Автор

Very nice of you to include a challenge with a solution hint at the end, very educational, feels like I'm in school again.

tenmamut
Автор

Dude, this is awesome, I am so proud of myself making a drawing rectangle

DearHRS
Автор

Yay! Now I have a moving purple rectangle! (I changed the RGB to (200, 23, 255) to make a light purple color)

boopypasta
Автор

Seriously the best tutorial I've ever seen. Good job!

viennesekangaroo
Автор

I've searched high and low for exactly this, thank you so much.

troylangner
Автор

Man... Crazy how this video helps. It's simple yet everything I was looking for the past few hours.

tristandombroski
Автор

finally, thank you so much, my pygame wouldn't work and you fixed

raniabou-ismail
Автор

i did this to make sure that the square wasn't able to move out of the screen. if makes sure that fx the specific function K_LEFT doesn't work if you're too far to the left. (in this case, x = 0)
if x > 0:
if keys[pygame.K_LEFT]:
x -= velocity
if x < 460:
if keys[pygame.K_RIGHT]:
x += velocity
if y > 0:
if keys[pygame.K_UP]:
y -= velocity
if y < 440:
if keys[pygame.K_DOWN]:
y += velocity

elliottandreasen
Автор

As someone who's been trying to learn pygame in python for a while now, this was very simplified and easy to follow . Thanks so much . :) Looking forward to learning with the others .

brianmartin
Автор

Congratulations bro.

When I was watching your series it had only 100 views you grew so fast in 2 months

sankethb.k
Автор

I’m making a small game for my school project, this was really helpful!

person-vidm
Автор

hey mate i do it but 1 second later pygame window closes hlp me

rolandozarate
Автор

Thanks a lot, just what I was looking for: short, clear and practical. Let's go to the next one! 😀

mrknarf
Автор

finally after serching so much found the tutuorial i needed

devansh
Автор

Never seen a better tutorial. This is great, thank you so much!

hapdio
Автор

Very well spoken and clearly explained concepts. Great work!!

bzsgzs
Автор

OMG Tim I made it! Thanks alot I had so much fun with your tutorial, pls make more for me !!! Your tutorial is easy to understand and clear .

yeaseulyoo
Автор

I'm 28 and I started my codeing career with this video. thanks tim

shannexthedestroyer