Added: 2 years ago
From: thenewboston
Views: 75,269
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (189)

Sign In or Sign Up now to post a comment!
  • "Couldn't open background.jpg" -.-'

  • Notice the file "Boobs2" at 0:35

  • How do you open pygame??

  • @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.

  • Resolution of images?

  • 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 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

  • @liizzset i tooooooo having the same problem .........

    if got the solution pls inform me toooooooo.....

    

  • 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

    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

  • @Geordan271 You might want to check your path, his will probably be diffrent from yours

  • Where have you learned all this? Answer me!

  • @TheErikbs

    Beginning Game Development with Python and Pyagme

  • @TheErikbs books

  • I keep getting pygame.error: couldn't open ad.jpg when I try to open the background what am I doing wrong?

  • @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!

  • Thank you @F1zzyHD !!!

  • FUCK JUSTIN BEIBER

  • @woutardpwnz dude.

    not relative.

  • @vesemirthewitcher ARE YOU SERIOUS!?

  • @woutardpwnz that was so off-topic, but i agree.

  • @CombatArmsRuneScape THUMBS UP!?

  • @woutardpwnz ...?

  • @woutardpwnz I would gladly double thumb that up if it had ANYTHING to do with the vid.

  • @vesemirthewitcher LLAMAS!

  • whoops I was zoomed in I feel like an idiot

  • :( 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

  • 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 Thanks for the help!

  • @DeathHBFelix i can't believe that you just wrote a spanish translation to your solution. magnificent.

  • What IDE is that? I use Netbeans 6.9.1

  • @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!

  • 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.

  • in, um, my ball.. lol

  • 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.

  • 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 try something like this:

    if characterx > screenx:

     characterx = screenx

  • @pobah341 i think you also have to subtract the width of the character's image

  • I love pygame, THANKS SO MUCH

  • no link to the next vid in description ;c

  • mif = mom i f...

  • Thanks Man ! really helpfull

    

  • Thanks Man ! really helpfull

  • 0:34 Top right corner. Does it say boobsz? Or am i hallucinating?

  • @TheDelusive You're hallucinating. There is boobsz in the top left corner though.

  • @WzMystery LOL! thats what i ment! XD

  • what IDE is he using?

  • @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 thanks bro, already caught on!

  • just put eveyr thing in the same folder as python

  • i always laugh when he says...."Lets tighten this up a bit" haha

  • how can i make ball go in the opposite way when it hits the screen?

  • WWAAAH!!! IT WONT LOAD THE JPG"S!!!

  • You should make tutorial for those jpg's also =)

  • 5:49 I don't have an Xbox :( . What am I supposed to do now? /lol

  • nvm i figured it out wasnt in files

  • @lemiho20 wait, how did you get it to work?

  • how come i cant save jpg files

  • still pretending you're a programmer, huh

    lol

  • "When teh users click that Xbox..."

    Lol Microsoft fan yappy xD

  • hi Bucky,

    Where do you get image from please or did make them? thanks

  • is python derived from java? because the codes looks similar with java

  • @HawxTeamDelta No it does not look like java.

  • @HawxTeamDelta python derived from C

  • @HawxTeamDelta nothing close to java, this is really easy, java uses a weird language

  • Comment removed

  • @JokeEmperor go here

    daniweb . com/ forums /thread209165. html

    No spaces

  • @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

    

  • 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

  • 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 don't get used to them, they end at 19 :(

  • my ball has black around it. . . what's wrong with it?

  • @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 I saved it as a png.

  • @ShinyHunterBWord And you're certain that your picture file is transparent on the edges?

  • 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?

  • 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 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"

  • @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)

  • what is the name of this IDE???

  • @stAxSurf It's IDLE, the standart IDE for Python.(You get it by installing python)

  • @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.

  • 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++?

  • Imports should be on septate lines

  • i am using pygame 1.9.1, and this is not working.

  • @plasticfood000

    I have the same problem.

  • Thank you for a great tutorial

  • how make a background?

  • 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

  • Comment removed

  • 4:00

  • Python seems really easy...

  • 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 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

  • @didagoal hey?????????????

  • Thanks murcurio0000, I read that comment about them being in the same folder. That's what it was. Many thanks. :)

  • 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.

  • Good tutorial I am really getting more out of this than the documentation although the documentation is pretty good too.

  • Ive watched the beginner python tutorials, should i watch the wxpython ones before this too??????

  • best tutorial ever

  • thank yooooouuuuuuuu!

  • how do you get the images???

  • 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

  • Do you have them in the same file as the python script?

  • nrm I got it... when you load it make sure you use the exact location I.E c:\\python\\img\\mario\\marior­un1

  • what did you use to make the images???

  • Keep doing python tutorials.

  • Dude this is an awsome tutorial!

    I tried other tutorials but there way too confusing

  • 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?

  • I have the same problem

  • @SpecialEdMafia

    your images needs to be in the same directory as the script if you follow this tutorial

  • it is in the same directory

  • this guy totally rocks!!!!.Bucky bro you are lucky that you are a web designer and game developer.Both are awesome jobs.

  • Comment removed

  • at 6:51: is there a way to controll when that happens?

  • whenever i i finish the hole thing and run it always says: there is no moduel names locals

  • Thats exactly what i get. Idk what this is

  • how do you make it play sounds?

  • the comment tag is #

  • the best tutorials on youtube is by this Guy ThanXX

  • just a quick Noob question:

    what is the comment "tags" in python ?

    i need it to keep track of what the eff im doing

  • # creates a comment line

  • 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

  • OMG i cant get the pygame lauchers or "SCRIPT" pls help it will be greatly appreciated

  • Same, i have to goto... Computer>Os>and theres a pygame file with python app

  • mouse_c=pygame.image.load(mif)­.covert_alpha()

    AttributeError: 'pygame.Surface' object has no attribute 'covert_alpha' wtf???

  • You spelt it 'covert' as opposed to 'convert'...

  • lol, thx yoooouu :3

  • @slashsd36000 I know that this I'm replying to an old comment,but you spelled convert wrong. :)

  • @slashsd36000 I know that I'm replying to an old comment,but you spelled convert wrong. :)

  • @NightLord785 Thanks for the help -_-

  • JLPZ76 try gimp

  • thanks for the video dude

  • how i can develop those images ?

    the ball and the background

    please help

  • Comment removed

  • GIMP, Photoshop Even Paint....

  • 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.

  • i cant intall it. where do i go from the pygame folder? there is no application. PLEASE REPLY

  • Comment removed

  • nevermind, i found it its in Properties :D

  • umm...how do i find the size for my images?? im using Paint btw

  • find the short cut 4 the image and put ur mouse over it and it should tell u the size

  • 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...)

  • Mine says all this crap about unexpected indent HELP!

  • Make sure you use 4 spaces every time you are in a indented block. For more info, google python indentation

  • How did u get that red circle

  • how do i know the directory to save the image?!?!

  • 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.

  • 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?

  • 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.

  • the error messege that I'm getting is: error: Couldn't open bg.jpg What am I doing wrong?

  • 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

  • lol very funny :)

    ...if you mean that... dont start programming

  • @mercurio0000 do you have an image called bg.jpg in the same folder as your program? If not, that would explain it :P

  • @mercurio0000 lmfo

  • @mercurio0000

    you probably need to put them in the same folder as the yourgame.py

  • @mercurio0000 have you drawn your background? If not you have to draw it and save it somewhere. make sure you name it '' bg ''.

  • @xatnu thank you so much.

  • @mercurio0000 your welcome. Don't forget to do the same for the ball.

  • mercurio0000 is right...

  • @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.....

  • @mercurio0000 you're kidding, right?

    :)

  • @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 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?

  • No, newground games are made in Macromedia Flash.

  • awesome tutorial

  • do we need those images to interact with your tutorials?