How to Draw Different Shapes in Pygame. Lines, Rectangles, Circles, Ellipses, Arcs, Polygons etc

preview_player
Показать описание
In this video I am going to show you how to draw different shapes in Pygame, including lines, rectangles, squares, circles, ellipses, arcs and polygons.
Рекомендации по теме
Комментарии
Автор

Hi Guys, if you like the video or find the video useful, please support the channel by LIKING and SUBSCRIBING. Thank you for your support!

mkcodingspace
Автор

Thanks bro, it really helped me out, gonna drop a follow for sure

meeswouterse
Автор

what is the best way to calculate vertical and horizontal lines for checkerboard individual squares? I am trying to represent fences for a Quoridor type game and I want the fences to fit exactly to the height and width of each individual rectangle. I guess the best way to visually describe it is that I want one side of a rectangle border via the draw line method, so I want the leftmost vertical border line for a rectangle.

DaLastMonster
Автор

You might have to teach the other channels how to make videos. Good Job.

carlriley
Автор

Good job getting straight to the point

afailable
Автор

my backround won't turn
and my pygame.display.update() keeps getting an error

stutteringcris
Автор

Bro, thanks so much!!! I’ve been trying to figure out how to draw a rectangle for days!!

pier
Автор

very helpful tutorial, thank you man. subbed

athanb
Автор

I keep getting a error at "state=False" any help? (python 3.8.2)
Edit1: also an error at "pygame.display.update()"

RainDev.
Автор

quick question how do i fix iccp known incorrest sRGB profile

zeybess
Автор

I have problems with " clock has no attributes tick" how to solve?

BRIJESH_VYAS
Автор

when you were making the straight line u forgot to add width to it it should be

startX=0; startY=0; endX=720; endY=480; width=10
pygame.draw.line(WIN, BLACK, (startX, startY), (endX, endY), width)

and not what you put

startX=0; startY=0; endX=720; endY=480; width=10
pygame.draw.line(WIN, BLACK, (startX, startY), (endX, endY))

you do not have the width added to urs (also my window resolution is different and i used mine for second example just took away width i also had wn named WIN instead and a different thickness)
it is used to make ur line thicker
so put a comman then width at the end of them bracket thingys

dynast