python - Pygame screen crashes without error report -
i have 2 files, 1 generate world, , run main code. however, main screen keeps crashing no reason. think world gen may broken, @ least pass on valid data main code.
# main loop. while running: # fill screen. screen.fill((0,0,0)) # event handling. eventa in event.get(): if eventa.type == quit: running = f screen.fill(screencolor) # draw world. tile in world: if tile.surface == none: pass else: screen.blit(tile.surface,tile.location) # draw character screen.blit(player["image"],player["loc"]) # pygame commands clear up. clock.tick(fps) screen.flip() this code doesn't fill screen white. may data handle, sorry if is.
i'm sure aren't inserting many things onto screen. believe problem far more simple. have said screen.flip() however, surface object has no attribute called flip. must confused function pygame.display.flip() if use instead, game shall display visual output.
Comments
Post a Comment