Hi, I have a question about the game I am making in pygame. In the middle of the game screen there is the "notepad" where doodles can move around and such. Around that is the "desk" the notepad is on. I have a link to a screenshot here. But underneath the "notepad" is a black box which I don't see how I coded in. Here is the basic code...
import pygame
from pygame.locals import *
pygame.init()
#create screen
screen = pygame.display.set_mode((1280, 720), pygame.FULLSCREEN)
pygame.display.set_caption('screen')
#set colors
white = (255, 255, 255)
#load images
backg = pygame.image.load('backg.png')
image1 = pygame.image.load('supptruck.png')
#set transparency codes
backg.set_colorkey(white)
walk = 0
done = False
close = False
x = 171
y = 0
keystate = pygame.key.get_pressed()
#main loop
while not close:
#game loop
while not done:
#goto pause menu with escape key
for event in pygame.event.get():
if (event.type == KEYDOWN):
print event
if (event.key == K_ESCAPE):
pausemenu = True
done = True
#detect movement left or right
if (event.type == KEYDOWN):
print event
if (event.key == K_RIGHT):
walk = 1
if (event.key == K_LEFT):
walk = 2
if (event.type == KEYUP):
print event
if (event.key == K_RIGHT):
walk = 0
if (event.key == K_LEFT):
walk = 0
#change backdrop position
if walk == 1:
x -= 1
if walk == 2:
x += 1
#paste images
screen.blit(image1, (x, y))
screen.blit(backg, (0,0))
#update screen
pygame.display.flip()
I am wondering if any of you guys can spot anything in it that may make that box.
Thanks!!!