Python Forum

Full Version: My Pygame Sprite not appearing...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My sprite is not appearing. I am trying to draw a rectangle.
code:

import pygame

pygame.init()

#Display#
display = pygame.display.set_mode((800, 500))
pygame.display.set_caption("Magic Tales")

#Variables#

Spd = 20
x1 = 360
y1 = 250
x2 = 440
y2 = 250
fight = True

while fight:
    pygame.time.delay(20)
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            fight = False






    pygame.draw.rect(display, (20, 20, 20), (400, 248, 80, 20))
        
    display.fill((0, 60, 80))
    pygame.display.update()

    












pygame.quit()

            
I'm not really sure, but shouldn't this be in the game development section?