- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Pygame Beginner Tutorial | Drawing and moving rectangle on game window
DISCORD: https://discord.gg/Y32YFRwfzZ
INSTAGRAM: https://instagram.com/chipkali_gamedev
X (Twitter): https://x.com/_pathik_sarkar_
NEXT VIDEO: https://youtu.be/ZXo5JxuFLYY
PREVIOUS VIDEO: https://youtu.be/kkLLrUxEkd0
# code (python)
import pygame
import sys
pygame.init()
clock = pygame.time.Clock()
screen_size = (400, 400)
screen = pygame.display.set_mode(screen_size) # game window
pygame.display.set_caption("My Game")
# rectangle or rect
# (x cor, y cor, width, height)
rect = [0, 0, 30, 30] # tuple is immutable, list is not
# [0], [1], [2], [3]
# color(rgb)
# (red, green, blue) (0 to 255)
color = (0, 255, 0) # pure green
while True:
pygame.display.flip() # showing display and updating
screen.fill((0, 0, 0)) # filling with black
clock.tick(60) # max 60 fps
for event in pygame.event.get():
if event.type==pygame.QUIT:
pygame.quit()
sys.exit()
# rect[0] = rect[0] + 1 # move right
# rect[0] = rect[0] - 1 # move left
# rect[1] = rect[1] + 1 # move down
# rect[1] = rect[1] - 1 # move up
# rect[2] += 1 # increase width
# rect[2] -= 1 # decrease width
# rect[3] += 1 # increase height
# rect[3] -= 1 # decrease height
pygame.draw.rect(screen, color, rect)
Видео Pygame Beginner Tutorial | Drawing and moving rectangle on game window канала Chipkali
INSTAGRAM: https://instagram.com/chipkali_gamedev
X (Twitter): https://x.com/_pathik_sarkar_
NEXT VIDEO: https://youtu.be/ZXo5JxuFLYY
PREVIOUS VIDEO: https://youtu.be/kkLLrUxEkd0
# code (python)
import pygame
import sys
pygame.init()
clock = pygame.time.Clock()
screen_size = (400, 400)
screen = pygame.display.set_mode(screen_size) # game window
pygame.display.set_caption("My Game")
# rectangle or rect
# (x cor, y cor, width, height)
rect = [0, 0, 30, 30] # tuple is immutable, list is not
# [0], [1], [2], [3]
# color(rgb)
# (red, green, blue) (0 to 255)
color = (0, 255, 0) # pure green
while True:
pygame.display.flip() # showing display and updating
screen.fill((0, 0, 0)) # filling with black
clock.tick(60) # max 60 fps
for event in pygame.event.get():
if event.type==pygame.QUIT:
pygame.quit()
sys.exit()
# rect[0] = rect[0] + 1 # move right
# rect[0] = rect[0] - 1 # move left
# rect[1] = rect[1] + 1 # move down
# rect[1] = rect[1] - 1 # move up
# rect[2] += 1 # increase width
# rect[2] -= 1 # decrease width
# rect[3] += 1 # increase height
# rect[3] -= 1 # decrease height
pygame.draw.rect(screen, color, rect)
Видео Pygame Beginner Tutorial | Drawing and moving rectangle on game window канала Chipkali
Комментарии отсутствуют
Информация о видео
9 июня 2026 г. 19:19:41
00:08:36
Другие видео канала





![Senshee gameplay [NO COMMENTRY]](https://i.ytimg.com/vi/px7fP7JDv3Q/default.jpg)




