This is the code for my background grid
Background = pygame.display.set_mode((900 ,900))
Green = (45,198,14)
Background.fill(Green)
for i in range(0, 900, 50):
pygame.draw.line(Background, (0, 0, 0), (0, i), (900, i))
pygame.draw.line(Background, (0, 0, 0), (i, 0), (i, 900))
pygame.display.update()
while pygame.event.wait().type != pygame.QUIT:
pass
I can not get any images to load onto it would i have to convert this into n image and then a sprite or is there a way for me to load images onto the grid. I have tried to use the blit function but it wont put images onto the grid.
RedInfantry= pygame.image.load("H:\computer science\6.2\Coursework\Week\Red team\InfantryRedV20.gif").convert()
while True:
Background.blit(RedInfantry,(0,0))
If i turn the images into a sprite would it allow me to move and remove images on the grid? Would i have to create the grid into the image to blit other images onto it.