Hey man, I am following your tutorials at the moment, and I am having a problem with pygame crashing.
I am using Python 2.5, and I am also using the Python shell for editing. everything works with the program, except when I go to exit, the pygame window seems to freeze? Any help would be much appreciated! :D
@TheSpliceScreen: sure, zip up your script and any files it uses (images, sounds, etc...) and upload it someplace so I can download it. If you don't already have a site that you can upload files to, I give this one a try:
@TheSpliceScreen add a line pygame.quit() before sys.exit(). It will close but you'll get an error. It won't affect your program you create a variable done = False and when the user presses QUIT, you can change it to done = True. Then change the while 1 to while not none:
@metalx1000, oh yeah, I finally noticed that; I came back here to correct my comment and found you'd beaten me to it. :-)
Anyhow, thanks for some very nice tutorials, Kris!
After watching a couple of them, I discovered the "Pop out" button at the bottom of the screen, which opens the video in a resizeable window, which makes it a lot easier to read your screenshots.
boy that black background isnt nice for watching , its like looking into the blackness of space with a few brighter bits, the text. Dont know how you work with Vim.
@poojkhgf: What do you use, nano? Text Editors are a thing that are a matter of Opinion. To each his own. But, the black background has nothing to do with vim. It's my choice in themes for my terminal. Black is less stressful on the eyes.
@metalx1000 I know Text editors are a personal choice but If I was making a video I would make one where it was easy for people to see the text !!! Even when the text is bright green it is still not as easy to see as black on white. When the text is other colours I have great difficulty. Be kind to viewers ! please?
@john81078: Not sure if I understand what you are asking. The tutorial shows you how to load a file that is one your computer. Are you asking what to do if the image isn't in the same folder as the pygame script?
Python is great. I have really been slacking on it lately. But now that I'm starting up with it again I'm going to start doing a bunch of videos on it.
please could you tell me how can i load an image in windows
warking2012 6 days ago
@warking2012: Same way.
metalx1000 6 days ago
Really great tutorials.
getsallad 5 months ago
Hey man, I am following your tutorials at the moment, and I am having a problem with pygame crashing.
I am using Python 2.5, and I am also using the Python shell for editing. everything works with the program, except when I go to exit, the pygame window seems to freeze? Any help would be much appreciated! :D
Cheers, Dan
TheSpliceScreen 9 months ago
@TheSpliceScreen: sure, zip up your script and any files it uses (images, sounds, etc...) and upload it someplace so I can download it. If you don't already have a site that you can upload files to, I give this one a try:
ompldr.org
metalx1000 9 months ago
@TheSpliceScreen You should also enter in the if statement in the for loop 'pygame.quit()' but put it before sys.exit()
evil69kitty 8 months ago
@TheSpliceScreen add a line pygame.quit() before sys.exit(). It will close but you'll get an error. It won't affect your program you create a variable done = False and when the user presses QUIT, you can change it to done = True. Then change the while 1 to while not none:
Hope this helps ^_^!
achuaditi 6 months ago
@TheSpliceScreen import os and use the function os_exit(0) function instead of sys.exit()
admirF96 2 months ago
you should set tabstop = 4 (it seems 8?)
rennabh 10 months ago
okay i fixed it. im glad i found this tut, cuz thenewboston showed the long and hard way to do it.
OCoptimusconvoy 1 year ago
This has been flagged as spam show
it says for me that it could not open my images. ive used them before though, in pygame.
OCoptimusconvoy 1 year ago
it says for me that it could not open my images. ive used them before though, in pygame.
OCoptimusconvoy 1 year ago
Chris, filmsbychris(dot)com seems to be owned by a squatter, now.
ncdave4life 1 year ago
@ncdave4life: Yeah, I'm filmsbykris(dot)com
metalx1000 1 year ago
@metalx1000, oh yeah, I finally noticed that; I came back here to correct my comment and found you'd beaten me to it. :-)
Anyhow, thanks for some very nice tutorials, Kris!
After watching a couple of them, I discovered the "Pop out" button at the bottom of the screen, which opens the video in a resizeable window, which makes it a lot easier to read your screenshots.
ncdave4life 1 year ago
boy that black background isnt nice for watching , its like looking into the blackness of space with a few brighter bits, the text. Dont know how you work with Vim.
poojkhgf 1 year ago
@poojkhgf: What do you use, nano? Text Editors are a thing that are a matter of Opinion. To each his own. But, the black background has nothing to do with vim. It's my choice in themes for my terminal. Black is less stressful on the eyes.
metalx1000 1 year ago
@metalx1000 I know Text editors are a personal choice but If I was making a video I would make one where it was easy for people to see the text !!! Even when the text is bright green it is still not as easy to see as black on white. When the text is other colours I have great difficulty. Be kind to viewers ! please?
poojkhgf 1 year ago
so what do i do if the image is already on my computer
john81078 1 year ago
@john81078: Not sure if I understand what you are asking. The tutorial shows you how to load a file that is one your computer. Are you asking what to do if the image isn't in the same folder as the pygame script?
metalx1000 1 year ago
@metalx1000 U copy & pasted the url of the image. so what do you do if the image doesn't have a url because its on your computer not the enternet
john81078 1 year ago
@john81078: When I copy and pasted the URL it was to download the image to the local DIR using wget.
Sorry for the confusion.
metalx1000 1 year ago
I love your tutorials! Keep em coming. :P
acollsen 1 year ago
Perfect timing on that one,
since Iam trying to learn python : )
krezkort 2 years ago
Python is great. I have really been slacking on it lately. But now that I'm starting up with it again I'm going to start doing a bunch of videos on it.
metalx1000 2 years ago
What os do you use?
florinr23 2 years ago
Linux OS.
Distro, Debian or Debian based (currently Mint).
metalx1000 2 years ago
awesome tutorials, can't wait to see more
johnKazansky 2 years ago
Fullscreen mode? This is practice for your phone, right.
De4dSpace 2 years ago
Yes, I know how to do full screen.
But, I have to do a tutorial on key press so you don't get stuck in fullscreen mode.
But, if you would like to jump ahead use this code:
pygame.display.toggle_fullscreen()
metalx1000 2 years ago
Very nice
borttrollad 2 years ago