Pygame Sprites And Groups Explained!

preview_player
Показать описание
In this video I will explain the how to use pygame Sprite and Group Classes.

I'll show how to use inheritance to make a standard python class into a child of the pygame sprite class. I also go over how to use groups, how to draw and update them and additional methods like the kill method to delete a sprite from the group.

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

Excellent, thanks. I've been writing a simple game in Pygame for the last 3 weeks and have used lists rather than groups. I guess you live and learn...

Steve-tpfb
Автор

Really informational and condensed video! Thanks!

kristofferjohansson
Автор

Thanks for this video, you explained this theme better than other authors. I think you decerve to have more subscribers and you have a nice voice)

RG_UWU
Автор

This is my 9th lesson of python and i want to learn pygame but my tutor will teach me that in a bit. However, i wanted to learn it soon so I used this tutorial. Thanks

gauravka
Автор

This is perfect video and you're professional, thank you.

muhammadmz
Автор

TOP SPOT VIDEO!!! BIG HELP I HAVE LIKED AND SUBBED!!!

xStream
Автор

Great! Should have watched this video before writing this all myself using my own classes and list :-|

jmz..
Автор

for some reason it doesn't show sprites in a Group as yours does, for me it just stays at <Group(1 sprites)>

uferis
Автор

why when i try my code the block just stoped dropping when i click again.. but when i copy and paste your code it worked perfectly

bxrbloxx
Автор

hey Russ! that's great, keep up please :)

lhomme_flaneur
Автор

My anti virus warns me from going to you're site? But other then that great video! Seems like a realy usefull way to use classes for games.

Tumla
Автор

It says error for squares.draw(screen)

doramon
Автор

If your heart leaves your body, you will break your opponent's eye. Please remind me of your name.

ytk
Автор

Nice one, but i still dont use sprite class. :(
I designed my own for this what suits more with my needing, then the built in sprite group.

Klannahar
Автор

in my code:
enemy = Enemy(x, y, random.choice(colors))
enemies.add(enemy)

i have initialised everything before and the problem says
expected type 'AbstractGroup[_SpriteSupportsGroup]', got 'Enemy' instead
what does this mean exactly

jima