Pygame Event Handler Explained
HTML-код
- Опубликовано: 3 авг 2024
- In this video I will explain how the event handler in pygame works, how to check for events and go over some of the common event types.
I'll demonstrate the different events in a basic pygame program to see how they work.
Take a look at the tutorial on my website for a reference on pygame events here: www.codingwithruss.com/pygame/...
Great info in such a digestible timeframe. Really enjoy the channel.
Thanks, glad you liked it!
Hello folks! Visit codingwithruss.com/tutorial/handling-events to get the code and a quick reference of what was covered in this video.
Thank you ❤😊for the video
I followed every step, and it worked perfectly for me ❤😊
Glad to hear it worked!
love you sir you taught me so many things ❤❤❤❤❤❤❤❤❤❤
Nice video mate. 👍
Cheers!
congrats for 15k subscribers! still waiting for discord server or any social media app where we can post doubts
Thank you!
Very good tutorial!
Thanks!
Hi, thanks for this stuff!!! I've a question!! Is there any way to execute special movements, by a sequence of buttons pressed in a certain order?? For example... a "Hadouken" in Street Fighter!!
Hmm that's an interesting one! I'm sure you could do something like that. If I was doing this I would try using a timer that resets after each key, that will ensure the keys in the combo are pressed quickly one after another. Then I'd have a variable that starts at zero like combo=0 and then each key increases it by one. Pressing the wrong key or taking too long between keys would reset it back to 0. Otherwise, you keep increasing by 1 until the combo is complete so if the sequence has 4 steps, then you would check if combo == 4. Lastly you would need a way of storing your sequence order and checking what the next button is, which you could do with a list. Store each button in the list and that way you could also use the combo variable as the index for that list to check which button should be pressed next.
You could give that a go and see how you get on.
@@CodingWithRuss thanks, I’m trying something like that, but, I’ve not idea if, “that‘ the way”... I’ll keep on.... thanks bro!!!
Use FINGERDOWN to get multiple touches in pygame (touchscreen)
Yes good point. There are so many events that can be detected within pygame
can we built a career in game development if we know pygame.
in theory, yes
in practice, due to python being very slow on larger programs, it's not ideal
I think you have better chances doing smth else with programming other than game development.
Pygame is good for simple 2d games with hardly any power to run
It’s a good start
#problem #help #sos
hello, I have some trouble in sublime text 3. When I run my file in cmd, it runs well, but in sublime text it says "module 'pygame' is not found".
help me please, I dunno how to fix this
go to the terminal in your computer and then type in "pip install pygame"
Anyone else got an indent error on line 12 too?
is it ethical to steal codes from other games
if its open source/allowed, go ahead, if not, then no, in fact its illgal
First :)
:)