Python Pygame Tutorial - Episode 3! Creating and Tracking Score, and Drawing Text Onto Screens!

preview_player
Показать описание
Learn to develop video games using python and pygame!! This is episode 3 in an intro to Pygame series from LeMaster Tech. This episode covers creating and tracking a score variable and defining and drawing text into a game in pygame!

Be sure to check out our channel for tons of additional python tutorials and practice problems and be sure to like and subscribe if you find our content useful!!

If you want to see anything specific on the channel or have technical questions about anything leave a comment on our of our videos and we will get back as soon as we can!

Thanks for watching and supporting the channel!
Рекомендации по теме
Комментарии
Автор

score on regular_surface, regular_surface on display screen
score=0
font=pygame.font.Font("ttf file", 50)
regular_surface=font.render("Score:", True, "black")
if score==0:
score_surface=font.render(f"{score}, True, "red")
else:
score_surface=font.render(f"{score}, True, "green")

zzwuxoo
Автор

For me the program is very lagy and im on a good gaming computer. But I just realized that if the mouse coursor is still or outside the game window then it start to lag. If im inside the gaming window and are moving the mouse then it works greate. Why does that happen?

Tumla
Автор

I have a problem when the score += 1 It’s print the new value in old value why ?
I don’t know to remove the old value I hope you will answer to me 💔

jelwaanowaida