I did this and the window popped up but the background and the cursor image did not appear. i click the window and did not responding appear and the window closed. Ran the program again same thing happened. Placedprogram in a folder with the two images did not work. Do I have to rewrite the program or if my python which is called ActivePython is the problem. New at this so I am not sure if the ActivePython and the newer version of pygame have different protocols than the old version
hey can somebody help me please??? every time i try to load it says(on python shell) that it couldnt find my background picture.. any suggestions? please get back to me, thanks :)
@ShinyHunterBWord Is it a .png format? Not all image formats supports transparency, so my guess would be that they fill the edges with the color black.
Should anything happen when I type in the stuff at the end of this tutorial? With the weird indent thing.... I'm not sure, but do I press backspace to change indents?
@stAxSurf Its no plug-in, it's a function of Idle. If I for example write a class and import it(import myClass) and later write the classname.*, this little dialog pops up (myClass. ) Then I can select each attribute and method, that I want(by using Tab)
Yes yes, I know, but I was watching that there is a kind of plugin for pygame, because when you wrote "screen.blit" appeared a list with the options to put. Sorry for my bad english.
People who are planning on watching a whole searues of tutorials and make a awesome game then dont count on it with this tutorial, srry for saying this bucky but your tutorials left me hanging and wasted my time with the pygame sense you never completed! on your last one i saw comments from a year ago of people waiting for it! what are you doing now? coco2d? c++?
Okay guys, Just put your pictures in the directory as the game, by default if you don't save it somewhere else, drag the photos into C:\Python26 and it will work fine
You should make a computer aided design tutorial. It would really help. My friends and I are going to make a car from scratch. We don't know how to make mini versions of the car so we would really appreciate it if you would help us with that. Also just because everyone that sees my user name ask me why I choose that name. It is my real name.
The third parameter for pygame.displaya.set_mode() is not the bit resolution of your processor, but the actual bit colour depth. Set it to whatever you want it as long as it is multiple of 8. I'd go for 24, because having transparency (bits from 24 to 32) while using sprite colour transparency picking, is nonsensical.
Really good tutorial, I mean it, but you should REALLY read the "style guide for python code". With 2000 views here atm means that you've spread strange and sometimes unreadable standards to alot of people. Great tutorial otherwise, and I guess it's easy to follow the tutorial. But if I would've read the source code on itself i would've been totally lost.
@rosenhill No, I was not kidding a year ago when I wrote my previous comment. And neither are the other 13 people that have thumb up my previous comment. How ever I got help within a few days. thank you for your comment anyways.
@mercurio0000 I had the same error, but seemingly the problem is either you have the images somewhere unspecified, or python can't understand the location of the image. Instead of just typing the name of the image for "bif" type in it's whole location eg C:\Program files etc but make sure to put the letter r before it e.g bif=r"C:\Program..." An easy way to find the whole location is by pressing "start menu button" and "r" and then dragging the image into the "run command box" that appears
I think you made this so easy for me. except my images are not loading. I'm assuming that is because my system the path is pointing somewhere else. Can you please tell me how I can fix this or where the picture files need to be?
"Couldn't open background.jpg" -.-'
Linoouui 2 weeks ago
Notice the file "Boobs2" at 0:35
CaptianMolesto 2 weeks ago 2
How do you open pygame??
conormurray1995 3 weeks ago in playlist Computer Game Development Tutorial
@conormurray1995 Open python 3.2.2 shell, then open a new window from the shell. In the new window you write and run your program.
evukahih 3 weeks ago
Resolution of images?
supersushi269 1 month ago
This has been flagged as spam show
What IDE is he using ?
MrAlr7aLL 1 month ago
I did this and the window popped up but the background and the cursor image did not appear. i click the window and did not responding appear and the window closed. Ran the program again same thing happened. Placedprogram in a folder with the two images did not work. Do I have to rewrite the program or if my python which is called ActivePython is the problem. New at this so I am not sure if the ActivePython and the newer version of pygame have different protocols than the old version
liizzset 1 month ago
@liizzset i dont think it's your program, cuz mine does it too. I'm running ver 3.2.2 and does the EXACTLY same as yours
iEatgunz 1 month ago
@liizzset i tooooooo having the same problem .........
if got the solution pls inform me toooooooo.....
nazookahamed 1 week ago in playlist Computer Game Development Tutorial
hey can somebody help me please??? every time i try to load it says(on python shell) that it couldnt find my background picture.. any suggestions? please get back to me, thanks :)
Geordan271 2 months ago
@Geordan271
You have to specify the exact location if it is not in the directory your .py file is in.
For example let's play my file is on the desktop. i would put C:\User\NAME HERE\Desktop\bj.jpg
nintechpro 2 months ago
@Geordan271 You might want to check your path, his will probably be diffrent from yours
hackstuff123 1 month ago
Where have you learned all this? Answer me!
TheErikbs 3 months ago
@TheErikbs
Beginning Game Development with Python and Pyagme
lostsh0t1 2 months ago
@TheErikbs books
PorifersAnims 1 month ago
I keep getting pygame.error: couldn't open ad.jpg when I try to open the background what am I doing wrong?
stafforadam 3 months ago
@stafforadam put the jpg file where you saved the script, if you saved it in desktop, save your background on the desktop aswell, hope this helps!
StevenNomenaMusic 3 months ago
Thank you @F1zzyHD !!!
Aetricify 3 months ago
FUCK JUSTIN BEIBER
woutardpwnz 5 months ago
@woutardpwnz dude.
not relative.
vesemirthewitcher 2 months ago
@vesemirthewitcher ARE YOU SERIOUS!?
woutardpwnz 2 months ago
@woutardpwnz that was so off-topic, but i agree.
CombatArmsRuneScape 2 months ago
@CombatArmsRuneScape THUMBS UP!?
woutardpwnz 2 months ago
@woutardpwnz ...?
CombatArmsRuneScape 2 months ago
@woutardpwnz I would gladly double thumb that up if it had ANYTHING to do with the vid.
vesemirthewitcher 2 months ago
@vesemirthewitcher LLAMAS!
woutardpwnz 2 months ago
whoops I was zoomed in I feel like an idiot
merkhclassof2010 5 months ago
:( its cut off and i can't see some of it whatever im sure it's just as great as all the others though I'm stuck at the loop
merkhclassof2010 5 months ago
English:
Hello, for those who can not solve the problem of "xxx.jpg" try this:
Instead of putting a place name the specific address of where the image, example:
Bad : "img = xxx.jpg." , Good : "img = C: \ Users \ Someguy \ Desktop \ xxx.jpg"
Español:
Hola, para los que no pueden resolver el problema de "xxx.jpg" intenten esto:
En vez de colocarle un nombre coloquen la dirección específica de donde se encuentra la imagen, ejemplo:
Mal : "img=xxx.jpg".Bien : "img=C:\Users\Someguy\Desktop\xxx.jpg"
DeathHBFelix 5 months ago 4
@DeathHBFelix Thanks for the help!
MrLarryChicken 5 months ago
@DeathHBFelix i can't believe that you just wrote a spanish translation to your solution. magnificent.
TehBunnysBack 4 months ago
What IDE is that? I use Netbeans 6.9.1
cwbh10 5 months ago
@cwbh10
for the current tutorials and the other python tutorials bucky uses the built-in ide of python,
IDLE, search that on your computer, if you installed python you also have idle. :)
-- Awesome tuts Bucky!
goldenangelgr 5 months ago
ok the png is not showing at first, and then if i move it out of the screen then back, the part that is out of the screen shows the image.
ThePyable 6 months ago
in, um, my ball.. lol
ThePyable 6 months ago
I like thenewboston's tutorials a lot. However, I disagree with what he said in 2:43-2:47
You shouldn't just copy from others. You should learn the material inside out. It makes you a better programmer.
xGamexxTrailersxx 6 months ago
I need help trying to set up the boundaries for my game. I wouldn't want my character walking off the map...can anyone help?!
pobah341 7 months ago
@pobah341 try something like this:
if characterx > screenx:
characterx = screenx
ameanmea 7 months ago
@pobah341 i think you also have to subtract the width of the character's image
ameanmea 7 months ago
I love pygame, THANKS SO MUCH
cofagriguschest 7 months ago 18
no link to the next vid in description ;c
playdohowns 8 months ago
mif = mom i f...
worzelhund 9 months ago 2
Thanks Man ! really helpfull
Xelo07 9 months ago
Thanks Man ! really helpfull
Xelo07 9 months ago
0:34 Top right corner. Does it say boobsz? Or am i hallucinating?
TheDelusive 10 months ago
@TheDelusive You're hallucinating. There is boobsz in the top left corner though.
WzMystery 9 months ago
@WzMystery LOL! thats what i ment! XD
TheDelusive 9 months ago
what IDE is he using?
Kaleetos 10 months ago
@Kaleetos
ummm its the python IDEL its integrated already to python if you whant to follow the tutorials you going to have to download pygame
loko95ftp 9 months ago
@loko95ftp thanks bro, already caught on!
Kaleetos 9 months ago
just put eveyr thing in the same folder as python
lemiho20 11 months ago
i always laugh when he says...."Lets tighten this up a bit" haha
drainseeker7 11 months ago
how can i make ball go in the opposite way when it hits the screen?
Aevonful 11 months ago
WWAAAH!!! IT WONT LOAD THE JPG"S!!!
nick114245 11 months ago
You should make tutorial for those jpg's also =)
Revevantix 1 year ago 23
5:49 I don't have an Xbox :( . What am I supposed to do now? /lol
Terror3659 1 year ago 2
nvm i figured it out wasnt in files
lemiho20 1 year ago
@lemiho20 wait, how did you get it to work?
nick114245 11 months ago
how come i cant save jpg files
lemiho20 1 year ago
still pretending you're a programmer, huh
lol
you2besux 1 year ago
"When teh users click that Xbox..."
Lol Microsoft fan yappy xD
idvhfd 1 year ago
hi Bucky,
Where do you get image from please or did make them? thanks
MrFaithFlicks 1 year ago
is python derived from java? because the codes looks similar with java
HawxTeamDelta 1 year ago
@HawxTeamDelta No it does not look like java.
SaschaHeylik 1 year ago
@HawxTeamDelta python derived from C
TheOneWhoCommentsYou 11 months ago
@HawxTeamDelta nothing close to java, this is really easy, java uses a weird language
Sikeman214 11 months ago
Comment removed
MrFaithFlicks 1 year ago
@JokeEmperor go here
daniweb . com/ forums /thread209165. html
No spaces
F1zzyHD 1 year ago
@JokeEmperor Put your background in the same place as you installed python
He installed python on his desktop so it opens his bg
For yours if you have yours installed in your program files drag and drop your bg.jpg there
F1zzyHD 1 year ago
Why?
I save all my imgs as png , png is a lot bether than jpeg,gif or bmp...
It suport transperency, it have best quality and it takes litle space and it loads fast
Dexdix2 1 year ago
I just took a semester in python and I wanted to take it a step further.
This tutorial is very helpful so far
=Math
MathsVlog 1 year ago
@MathsVlog don't get used to them, they end at 19 :(
Puffsmeal 1 year ago
my ball has black around it. . . what's wrong with it?
ShinyHunterBWord 1 year ago
@ShinyHunterBWord Is it a .png format? Not all image formats supports transparency, so my guess would be that they fill the edges with the color black.
Fuglebolle 1 year ago
@Fuglebolle I saved it as a png.
ShinyHunterBWord 1 year ago
@ShinyHunterBWord And you're certain that your picture file is transparent on the edges?
Fuglebolle 1 year ago
Should anything happen when I type in the stuff at the end of this tutorial? With the weird indent thing.... I'm not sure, but do I press backspace to change indents?
TheJuvenileKiller 1 year ago
Hi, I have this error:
SyntaxError: invalid syntax
drew@drew-zowlyfon:~$ python $HOME/Documents/Pygame/1/main.py File "/home/drew/Documents/Pygame/1/main.py", line 20 screen.blit(background, (0,0)) ^
IndentationError: unindent does not match any outer indentation level
zowlyfon 1 year ago
@zowlyfon You must have made a typo or code error
Like if you put an extra space somewhere or spelled something wrong then that is a "Syntax Error"
F1zzyHD 1 year ago
@stAxSurf Its no plug-in, it's a function of Idle. If I for example write a class and import it(import myClass) and later write the classname.*, this little dialog pops up (myClass. ) Then I can select each attribute and method, that I want(by using Tab)
AlternativeStudioDe 1 year ago
what is the name of this IDE???
stAxSurf 1 year ago
@stAxSurf It's IDLE, the standart IDE for Python.(You get it by installing python)
AlternativeStudioDe 1 year ago
@AlternativeStudioDe
Yes yes, I know, but I was watching that there is a kind of plugin for pygame, because when you wrote "screen.blit" appeared a list with the options to put. Sorry for my bad english.
stAxSurf 1 year ago
People who are planning on watching a whole searues of tutorials and make a awesome game then dont count on it with this tutorial, srry for saying this bucky but your tutorials left me hanging and wasted my time with the pygame sense you never completed! on your last one i saw comments from a year ago of people waiting for it! what are you doing now? coco2d? c++?
2AWESOMETV 1 year ago
Imports should be on septate lines
deamon689 1 year ago
i am using pygame 1.9.1, and this is not working.
plasticfood000 1 year ago
@plasticfood000
I have the same problem.
Kelarre653 1 year ago
Thank you for a great tutorial
Dynamiite123 1 year ago
how make a background?
TheCoolAngel007 1 year ago
Okay guys, Just put your pictures in the directory as the game, by default if you don't save it somewhere else, drag the photos into C:\Python26 and it will work fine
DrawLemance 1 year ago
Comment removed
briishspy 1 year ago
4:00
bwrightau 1 year ago
Python seems really easy...
evilfrenchguy 1 year ago
hey ????? this program isn't like the program u used in tutorial 1
what is this one ? i am new by the way :D
didagoal 1 year ago
@didagoal you need to download python, i think bucky is using the 2.6 version, if you want to know about that go to his tutorial series on python
airgeek11 1 year ago
@didagoal hey?????????????
Penosios 1 year ago
Thanks murcurio0000, I read that comment about them being in the same folder. That's what it was. Many thanks. :)
zortchik 1 year ago
You should make a computer aided design tutorial. It would really help. My friends and I are going to make a car from scratch. We don't know how to make mini versions of the car so we would really appreciate it if you would help us with that. Also just because everyone that sees my user name ask me why I choose that name. It is my real name.
magnumblackburn 1 year ago
Good tutorial I am really getting more out of this than the documentation although the documentation is pretty good too.
izraqthedark 1 year ago
Ive watched the beginner python tutorials, should i watch the wxpython ones before this too??????
thedjatomix 1 year ago
This has been flagged as spam show
im getting an error messege : error: Couldn't open bg.jpg What am I doing wrong?
1stReCoNProductions 1 year ago
best tutorial ever
thrasher729 1 year ago
thank yooooouuuuuuuu!
kinmanyuen 2 years ago
how do you get the images???
neutella112 2 years ago
It says that the image cannot load...
for the images that can load, I copied them and tries them but, then the copied images doesn't work.... help
jeffery12108 2 years ago
Do you have them in the same file as the python script?
9695236 2 years ago
nrm I got it... when you load it make sure you use the exact location I.E c:\\python\\img\\mario\\mariorun1
jeffery12108 2 years ago
what did you use to make the images???
jeffery12108 2 years ago
Keep doing python tutorials.
Turbolego 2 years ago
Dude this is an awsome tutorial!
I tried other tutorials but there way too confusing
AlphaDelta900 2 years ago
when i try to convert my image is says it cant open it. this happens every time i try to convert picture.. anything i can do to fix this?
SpecialEdMafia 2 years ago
I have the same problem
jeffery12108 2 years ago
@SpecialEdMafia
your images needs to be in the same directory as the script if you follow this tutorial
themewz 2 years ago
it is in the same directory
jeffery12108 2 years ago
this guy totally rocks!!!!.Bucky bro you are lucky that you are a web designer and game developer.Both are awesome jobs.
pokiri446 2 years ago
This has been flagged as spam show
How come it says there's no module named locals?
tflan13 2 years ago
Comment removed
tflan13 2 years ago
at 6:51: is there a way to controll when that happens?
supergenius1994 2 years ago
whenever i i finish the hole thing and run it always says: there is no moduel names locals
skizel8576 2 years ago
Thats exactly what i get. Idk what this is
tflan13 2 years ago
how do you make it play sounds?
supergenius1994 2 years ago
the comment tag is #
unstman12 2 years ago
the best tutorials on youtube is by this Guy ThanXX
baby2bla2009 2 years ago
just a quick Noob question:
what is the comment "tags" in python ?
i need it to keep track of what the eff im doing
daeheadshot 2 years ago
# creates a comment line
AndoVenom 2 years ago
hey how do i select a picture from a txd file. i put a couple of pictures into a txd file but idk how to select them
crazynoob11 2 years ago
OMG i cant get the pygame lauchers or "SCRIPT" pls help it will be greatly appreciated
fegerlein1 2 years ago
Same, i have to goto... Computer>Os>and theres a pygame file with python app
kaleri 2 years ago
mouse_c=pygame.image.load(mif).covert_alpha()
AttributeError: 'pygame.Surface' object has no attribute 'covert_alpha' wtf???
slashsd36000 2 years ago
You spelt it 'covert' as opposed to 'convert'...
asib12 2 years ago
lol, thx yoooouu :3
slashsd36000 2 years ago
@slashsd36000 I know that this I'm replying to an old comment,but you spelled convert wrong. :)
NightLord785 1 year ago
@slashsd36000 I know that I'm replying to an old comment,but you spelled convert wrong. :)
NightLord785 1 year ago
@NightLord785 Thanks for the help -_-
slashsd36000 1 year ago
This has been flagged as spam show
@slashsd36000 I know that I'm replying to an old comment,but you spelled convert wrong. :)
NightLord785 1 year ago
JLPZ76 try gimp
jameswx09 2 years ago
thanks for the video dude
serversushi 2 years ago
how i can develop those images ?
the ball and the background
please help
JLPZ76 2 years ago
Comment removed
slashsd36000 2 years ago
GIMP, Photoshop Even Paint....
daeheadshot 2 years ago
The third parameter for pygame.displaya.set_mode() is not the bit resolution of your processor, but the actual bit colour depth. Set it to whatever you want it as long as it is multiple of 8. I'd go for 24, because having transparency (bits from 24 to 32) while using sprite colour transparency picking, is nonsensical.
gasto5 2 years ago
i cant intall it. where do i go from the pygame folder? there is no application. PLEASE REPLY
willsnoel100 2 years ago
This has been flagged as spam show
i got the same problem...
Makromax 2 years ago
Comment removed
uberxsoftxbunny 2 years ago
nevermind, i found it its in Properties :D
bubbletanking 2 years ago
umm...how do i find the size for my images?? im using Paint btw
bubbletanking 2 years ago
find the short cut 4 the image and put ur mouse over it and it should tell u the size
uberxsoftxbunny 2 years ago
i did EXACTLY what you did, but heres what happens when I run the program:
1. It doesn't respond
2.
my images are at the same directory as the script.
ALSO, the script suddenly lost color on words (like while, true, if, etc...)
BananaRDP 2 years ago
Mine says all this crap about unexpected indent HELP!
VoodoChild9021 2 years ago
Make sure you use 4 spaces every time you are in a indented block. For more info, google python indentation
Kyrax1 2 years ago
How did u get that red circle
topruttaja 2 years ago
how do i know the directory to save the image?!?!
GNSstudios 2 years ago
maybe you didnt save it so it can not find the images on the directory or remember to put the images and the code file in the same file.
7493jffdj 2 years ago
doesnt work for me :S
ive done everything the same(not the images)
it just shuts down when i open it....
what does, pygame.surface is not callible mean?
geganobo 2 years ago
Really good tutorial, I mean it, but you should REALLY read the "style guide for python code". With 2000 views here atm means that you've spread strange and sometimes unreadable standards to alot of people. Great tutorial otherwise, and I guess it's easy to follow the tutorial. But if I would've read the source code on itself i would've been totally lost.
Laserbastu 2 years ago 8
the error messege that I'm getting is: error: Couldn't open bg.jpg What am I doing wrong?
mercurio0000 2 years ago 13
bg is the name of the image file that is going for the background and .jpg is the image type.
conclusion: put the name of the image you want followed with .jpg
OATTeam 2 years ago
lol very funny :)
...if you mean that... dont start programming
geganobo 2 years ago
@mercurio0000 do you have an image called bg.jpg in the same folder as your program? If not, that would explain it :P
Anonymouseable 1 year ago
@mercurio0000 lmfo
tHebadteen 1 year ago
@mercurio0000
you probably need to put them in the same folder as the yourgame.py
DevKire 1 year ago
This has been flagged as spam show
@mercurio0000 is that what you named the image??
randOmazing 1 year ago
@mercurio0000 have you drawn your background? If not you have to draw it and save it somewhere. make sure you name it '' bg ''.
xatnu 1 year ago
@xatnu thank you so much.
mercurio0000 1 year ago
@mercurio0000 your welcome. Don't forget to do the same for the ball.
xatnu 1 year ago
mercurio0000 is right...
pyropshere228 1 year ago
@mercurio0000
You must have downloaded the image, it must be iin the same folder as the code is and ensure that its name is bg.jpg, it may be ba.jpg or bg.png.....
giwrg98 1 year ago
@mercurio0000 you're kidding, right?
:)
rosenhill 1 year ago
@rosenhill No, I was not kidding a year ago when I wrote my previous comment. And neither are the other 13 people that have thumb up my previous comment. How ever I got help within a few days. thank you for your comment anyways.
Merry Christmas!
mercurio0000 1 year ago
@mercurio0000 I had the same error, but seemingly the problem is either you have the images somewhere unspecified, or python can't understand the location of the image. Instead of just typing the name of the image for "bif" type in it's whole location eg C:\Program files etc but make sure to put the letter r before it e.g bif=r"C:\Program..." An easy way to find the whole location is by pressing "start menu button" and "r" and then dragging the image into the "run command box" that appears
TheJuvenileKiller 1 year ago
I think you made this so easy for me. except my images are not loading. I'm assuming that is because my system the path is pointing somewhere else. Can you please tell me how I can fix this or where the picture files need to be?
mercurio0000 2 years ago
No, newground games are made in Macromedia Flash.
AmvMinno 2 years ago
awesome tutorial
anime36O 2 years ago
do we need those images to interact with your tutorials?
Wowccraft 2 years ago