Discuss Scratch
- Discussion Forums
- » Things I'm Making and Creating
- » help with code
- Shadow36821
-
Scratcher
100+ posts
help with code
So I am making a game with pygame and the game is still under dev. But, my tank image will not load when I run the shell. The rest works pefectly. Here is the code:
blip=“blip.png”
back=“blipbg.jpg”
import pygame, sys
from pygame.locals import *
pygame.init()
displaysurf=pygame.display.set_mode((600,600),0,32)
displaybk=pygame.image.load(back).convert()
bliptank=pygame.image.load(blip).convert_alpha()
while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
Heres where I think the problem is:
displaysurt.blit(blip, (25,25))
pygame.displaysurf.flip()
blip=“blip.png”
back=“blipbg.jpg”
import pygame, sys
from pygame.locals import *
pygame.init()
displaysurf=pygame.display.set_mode((600,600),0,32)
displaybk=pygame.image.load(back).convert()
bliptank=pygame.image.load(blip).convert_alpha()
while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
Heres where I think the problem is:
displaysurt.blit(blip, (25,25))
pygame.displaysurf.flip()
- Discussion Forums
- » Things I'm Making and Creating
-
» help with code