[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Pygame (Python Game Development) Tutorial – 4 – Quit Event Handling
by
Tags:
Comments
32 responses to “Pygame (Python Game Development) Tutorial – 4 – Quit Event Handling”
-
expected an indented (gameExit)
Please help
-
Event object is not callable for line 9
-
AttributeError: module 'pygame.time' has no attribute 'CLock'
how to resolve this error. -
where is source code available on github?..please provide me the full link i cant find where it is
-
i am getting error which says =>
if event.type == pygame.QUIT():
TypeError: 'int' object is not callable -
How different is this series from the one on Sentdex's own channel? They look almost identical.
-
any reason you dont import the parameters from pygame so you dont have to write pygame.thing all the time?
-
AttributeError: module 'pygame' has no attribute 'dysplay' help
-
ladies!!!!!
-
i like reading documents
-
My Plan is to watch 10 videos a day for 10 days! Gotta have a strategy cause my body does not want to watch 100 videos, I'ma do it though!
-
I did the pygame.QUIT part, but i still can't exit… what am i doing wrong? please help 🙁
import pygame
pygame.init()
gameDisplay = pygame.display.set_mode((800,600))
pygame.display.set_caption('Slither')pygame.display.update()
gameExit = False
while not gameExit:
for event in pygame.event.get():
if event.type == pygame.QUIT:
gameExit == Truepygame.quit()
quit() -
Is there any reason not to use while True: … break as opposed to a bool like gameExit? Just thinking about improving readability
-
you're awesome
-
I got this error:
if event.type == pygame.QUIT():
TypeError: 'int' object is not callable
-
Dude thanks for making these vids!
-
Great one sir, but can anyone tell me what this gameDisplay is for? He told in the previous video that it is the game surface which will be updated, but in the updating statement gameDisplay is obviously NOT used..
-
this is awesome!!!!!
-
I cant Quit out of the windows by clicking the x button.
import pygamepygame.init()
gamedisplay = pygame.display.set_mode ((800,600))
pygame.display.set_caption ('snake')pygame.display.update()
while True:
passgameExit = False
while not gameExit:
for event in pygame.event.get():
if event.type == pygame.QUIT:
gameExit = True#print(event)
pygame.quit()
quit()
What am I doing wrong? -
Man, you saved my life and initiated my life in pygame. Really, thanks. Keep the good job. 😀 Greeting from México.
-
I love you, man! You are a really great teacher
-
TIP: if you don't like referencing QUIT or other Pygame variables with pygame.QUIT add from pygame.locals import * to your code under inport pygame
-
I'm gonna make the greatest game everrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.
-
I am getting this error, anyone know why?
File "pygameTest.py", line 14, in <module>
if event.type == pygame.QUIT():
TypeError: 'int' object is not callableBelow is my code:
import pygame
pygame.init()
gDisplay = pygame.display.set_mode((800, 600))
pygame.display.set_caption('DogBaller')pygame.display.update()
gExit = False
while not gExit:
for event in pygame.event.get():
if event.type == pygame.QUIT():
print(event)
gExit = True
print(event)pygame.quit()
quit() -
I love how as the video number goes up, the view count goes down.
-
No offense to Bucky cause I LOVE him, but this guy's pygame tutorials stuck with me a whole lot more than Bucky's did.
So, thank you. I love both you guys for helping me teach myself 🙂 -
Best pygame series ever!!! Too bad that after each video the view count seems to decrease
-
rawr
-
good tutorial!
-
nice one
-
Thx dude! You are awesome!
-
it seems to be a very good tutorial! Keep going!!
Leave a Reply