creating flashing text - pygame - python 3.4 (2 colours)

Опубликовано: 11 Июнь 2026
на канале: Stanman228
2,509
21

Since i'm studying software engineering I decided to do some programming in my holidays so im currently making a game, will update with more videos later. I also decided that i would start making basic tutorials for things i found hard when learning python.

leave a comment if you wish to have a tutorial on a specific part of one of my videos, or want me to do a tutorial video on something you're having trouble with.

contact me on here with any queries.


###########
required code:

import time, pygame

pygame.init()

black = [ 0, 0, 0]
white = [255,255,255]
blue = [ 0, 0,255]
red = (200, 0, 0)
light_red = (255,0,0)
green = (0, 170, 0)
light_green = (0,255,0)

tinyfont = pygame.font.SysFont("comicsansms", 15)
smallfont = pygame.font.SysFont("comicsansms", 25)
medfont = pygame.font.SysFont("comicsansms", 50)
largefont = pygame.font.SysFont("comicsansms", 80)
superlargefont = pygame.font.SysFont("comicsansms", 185)

display_width = 1050
display_height = 500

size=[display_width,display_height]
screen=pygame.display.set_mode(size)

clock = pygame.time.Clock()
FPS = 5

##########

Outtro Music: http://www.bensound.com
my website: https://tes.page.link/rniX