I can't and don't want to know how to use images in pygame zero. I thought of an alternative by making a spritesheet with the def function. I can't figure out how to color a pixel in a specific position though :/
I don't really know how to do it, but this would be my best guess
import pgzrun
HEIGHT = 100
WIDTH = 100
red = (255, 0, 0)
yellow = (255, 255, 0)
white = (255, 255, 255)
teal = (0, 255, 255)
blue = (0, 0, 255)
green = (0, 255, 0)
magenta = (255, 0, 255)
black = (0, 0, 0)
def draw():
screen.clear()
screen.fill(white)
screen.fill((50,50)color = green)
pgzrun.go()
this program is supposed to make the center of the screen green this program doesn't work
The problem is that
screen.fillfills the entire screen and you can't give a specific position to the place where it fills. Another thing that's wrong is you make a function calleddrawand then put inscreen.fill. I personally don't recommend pg zero to do these types of things because it's really simple. Instead, try using Pygame. I hope this helped!