when i run my program when drawing a rectangle, it comes up with an syntax error and highlights the 'screen" in screnn.unlock. this only happens when i draw rectangles, not polygons.
@ExRedRain I had the same problem. TO fix it, make sure that there are the correct number of brackets in every place, especially on the pygame.draw.Rect line.
The screen.lock and unlock will give errors if there are issues with the number of brackets. You can use screen.fill() with backgrounds as well. I'm not sure the advantages of either method, but I was thinking something was wrong with the code until I checked the brackets (as I did have some version differences with the previous python tutorial). Not the case, though. Just my nubbery.
@zRichi lol then u'd just copy & paste it. cmon this is so easy... tip: either define your gfx' paths like: background = "C:\folder\file.jpg" or make sure you execute the script in the same folder as your images.
at 2:02, how do you make that box? because when i tried CTRL-SPACE, it woundn't work unless it has a space, and when i did that, it didn't have rect... i had to type :3
yes i had gone through and checked all spelling, when i stated that i copied it letter for letter and number by number, i meant it lol. i did everything, and it just simply doesn't work lmao. i haven't tried it on my desktop, but i'm about to now
ok it works fine on my desktop, but just not my laptop. i have the same exact versions on my laptop as i do on the desktop.. wonder why its so screwed up lol, oh well lmao.
srry, but i dont know what all is going on, but this doesn't work. i have copied the code EXACTLY and my pygame window just opens up black and stops responding. in the SHELL it states that "TypeError: Argument must be rect style object" and i have it all letter for letter, number for number. Idk what is happening but it does it everytime i do anything related to the pygame screen now as well
problem.
when i run my program when drawing a rectangle, it comes up with an syntax error and highlights the 'screen" in screnn.unlock. this only happens when i draw rectangles, not polygons.
any ideas?
ExRedRain 1 month ago
@ExRedRain I had the same problem. TO fix it, make sure that there are the correct number of brackets in every place, especially on the pygame.draw.Rect line.
Ultranerdguy 1 month ago
I turned transcribe audio...lol. 00:16
"Uh, you're in for a real treat."
TRANSCRIBE:
"Urine for rotary."
xDFancyPantsxD 3 months ago 6
Very good tutorial. I probably did something wrongs, though, because it says that QUIT is not defined... Any help?
pgupti 5 months ago
How do you get those texboxes with details in them?
Dragalug 5 months ago
I love the sound he makes at 2:54
neweltradom 6 months ago 2
@mrLenny1203 duuuur it's python not fucking java idiot.
monstergarage2 7 months ago
Do you Need Java for that???
MrLenny1203 7 months ago
blacks and whites arent cool
SpaceMongoose 7 months ago
The screen.lock and unlock will give errors if there are issues with the number of brackets. You can use screen.fill() with backgrounds as well. I'm not sure the advantages of either method, but I was thinking something was wrong with the code until I checked the brackets (as I did have some version differences with the previous python tutorial). Not the case, though. Just my nubbery.
Vazeroth16 9 months ago
bbb...
TheSaMaTeR 9 months ago
add more tuts
sciman001 9 months ago
when i need to search a good programming on youtube every time i add my tag "thenewboston"
muzik123beat 1 year ago
I can't get any of these to work. If you'd included the source code you'd save newbs like me hours of following your tutorial and producing nothing
zRichi 1 year ago
@zRichi lol then u'd just copy & paste it. cmon this is so easy... tip: either define your gfx' paths like: background = "C:\folder\file.jpg" or make sure you execute the script in the same folder as your images.
that would go like (command line)
cd (yourfolder)
python yourscript.py
If u need help, message me on youtube. cheers
SaschaHeylik 1 year ago
"Inside your rect put 2 parameters"
um no thx j/k great vid
Kidge 1 year ago
I was told to use the screen.fill() function because everything used to keep drawing over themselves.
How come you don't use screen.fill() but it still works?
heymangone 1 year ago
i get an error at screen.lock(), the word screen is red?
ownz100 1 year ago
When I run the module, the screen just flashed and disappeared. what happened? can some help!!
LockonStratos1 2 years ago
not half infinitely!
lfroggyl 2 years ago
When I want to add background music is it better to use the PyGame audio functions or to use something like Audiere?
PsycoHenny 2 years ago
so?, I dont know about you, but I dont use uppercase letters in my variables (Keeps things simple)
supergenius1994 2 years ago
have you learned all of them?, if thats true, then someday I think I might invent one that isnt case sensitive
supergenius1994 2 years ago
you can also do this insted:
pygame.draw.rect(screen, (0xFF0000), Rect((100,100), (130, 170)))
crazynoob11 2 years ago
#FF0000 = red
#00FF00 = green
#0000FF = blue
i learned that in my book of programming =D
first 2 numbers/letters are red 2nd two is green and you can guess that last 2 numbers/letters
crazynoob11 2 years ago
check the amount of parentheses
Fangornmmc 2 years ago
at 2:02, how do you make that box? because when i tried CTRL-SPACE, it woundn't work unless it has a space, and when i did that, it didn't have rect... i had to type :3
slashsd36000 2 years ago
I was shocked at the lock() method from the screen. I think that is new in Pygame 1.8
gasto5 2 years ago
yes i had gone through and checked all spelling, when i stated that i copied it letter for letter and number by number, i meant it lol. i did everything, and it just simply doesn't work lmao. i haven't tried it on my desktop, but i'm about to now
sexmebre 2 years ago
ok it works fine on my desktop, but just not my laptop. i have the same exact versions on my laptop as i do on the desktop.. wonder why its so screwed up lol, oh well lmao.
sexmebre 2 years ago
srry, but i dont know what all is going on, but this doesn't work. i have copied the code EXACTLY and my pygame window just opens up black and stops responding. in the SHELL it states that "TypeError: Argument must be rect style object" and i have it all letter for letter, number for number. Idk what is happening but it does it everytime i do anything related to the pygame screen now as well
sexmebre 2 years ago
do you have it space for space, parenthesis for parentheses, and colon for colon?
lfroggyl 2 years ago
omg, im really really sorry.
i accidentally pushed the rate thing and you now have 2 sdtart =( someone rate it back, nad thanks allot really helpfull
zamliman 2 years ago
way too fast uploads xD
LuXxenatorX 2 years ago 4
When you record your videos, it's what x what?
e.g. 720 x 680
tholithemba 2 years ago
You are truly the best.
TimTheAnimator 2 years ago 44
indeed
CrazyMofoCooling 2 years ago 22