Just stumbled on your channel, it's way too underrated and deserves more views and subscribers!
@CodingWithRuss Жыл бұрын
Thanks! :)
@Sirbozo7 ай бұрын
ye
@falkerhard2 ай бұрын
Thank you for this. It is better than any python book I have read so far.
@CodingWithRuss2 ай бұрын
Glad you found it useful!
@joshuabarqueesimeth453016 күн бұрын
obviously, since any python book wouldn't be teaching you about the library pygame, unless you buy a pygame book.
@mej0berr Жыл бұрын
ive been stuck on rectangles for the whole day thank you very much
@CodingWithRuss Жыл бұрын
Glad it helped :)
@angelhc4757 Жыл бұрын
your videos gives me an epic beginning for videogames! you're a hero :,)
@CodingWithRuss Жыл бұрын
Thanks, glad the videos help :)
@yourboizach9681 Жыл бұрын
Absolutely brilliant man, your pygame tutorials are hard carrying me right now haha.
@CodingWithRuss Жыл бұрын
Glad I could help!
@mariamsalim894 Жыл бұрын
Thanks a lot for the tutorial it helped a lot. However, how can I make the rectangle transparent because I have an image bg and not a color bg. I only want to see the soldier.
@CodingWithRuss Жыл бұрын
In this case you wouldn't need to draw the rectangle with pygame.draw.rect. You can miss that out and the rectangle won't be visible but it will still be there to be used for collision and positioning.
@CodingWithRuss Жыл бұрын
For the source code used in this tutorial, head over to my website: www.codingwithruss.com/pygame/working-with-rectangles-in-pygame/
@Thrawien Жыл бұрын
Can you code character movement controlled by a mouse click in pygame? Like what would be used in a point and click adventure? Ive looked around for guides but I’ve struggled to understand the answers in stackoverflow as im a relative beginner
@CodingWithRuss Жыл бұрын
That's a good idea, I hadn't actually tried that before although I have made elements of that separately (aiming at the mouse and taking mouse input) before so should be something I could combine. I'll add it to the list of video topics and see if I can put together a tutorial for something like that, but it may be a little while yet as I've got a few other tutorials I'm working on already.
@Thrawien Жыл бұрын
@@CodingWithRuss that would be incredible. Ive really enjoyed your tutorials you have a great way of explaining things. Especially to beginners like me! I feel like I can try to do a couple of practice projects now. Finally put my pixel art to use!
@LoganadoLakings Жыл бұрын
What is the difference between pygame.display.flip() and pygame.display.update()
@CodingWithRuss Жыл бұрын
There's very little difference in most applications. Check out the docs for a detailed explanation of how .update differs from .flip: www.pygame.org/docs/ref/display.html#pygame.display.update
@LoganadoLakings Жыл бұрын
@@CodingWithRuss Oh ok makes sense now thank you
@firej1911 ай бұрын
I know it's a little bit after the video was uplaoded, but should I use classes or rectangles?
@CodingWithRuss11 ай бұрын
You can use both, it depends on the application. If it is just a rectangle to use for visual purposes then a rect is fine, but if you want to use it in a game as a character or an object that has movement and collision etc then it would be better to use a class and put a rectangle inside the class.
@firej1911 ай бұрын
@CodingWithRuss Great thank you so much
@leorachid414 ай бұрын
Great job
@CodingWithRuss4 ай бұрын
Thanks :)
@RakloRakloRaklo6 ай бұрын
Hi, I don't know if you're still answering those, but is it possible to change the size of the rectangle after it has already been drawn, such as when I press a certain button?
@sdjukfoisdhfuoishdfjsdoifjksdj4 ай бұрын
possible. just change the hight or width.
@ajeetsn24027 күн бұрын
you can by update
@carl64029 ай бұрын
Hey can i ask why is my player/character is duplicating when i moved. Or am i shouldn't delete the pygame.draw.rect first? (btw i have background on it)
@TToastedG9 ай бұрын
Did you put pygame.display.flip() at the end of your loop?
@carl64029 ай бұрын
@@TToastedG yes i did
@ImWatchinYou Жыл бұрын
Why attach the image to the rect instead of just controlling the image location directly?
@CodingWithRuss Жыл бұрын
It's ok to position the image directly for simpler applications but generally you will be relying on the rectangle for collision checks as well, so drawing the image over it allows you to do that.
@KtheSoulmate3 ай бұрын
Thanks from Algeria
@joshuabarqueesimeth453016 күн бұрын
what is the point of saying rect_1 instead of rect1, it wastes time to type a _
@joshuabarqueesimeth453016 күн бұрын
and you don't need to type == true when checking for a key pressed, the if statement itself checks for true already, if you want to check for false, you say if not key[pygame.key].