Since I don't know how you coded the program, I cannot be sure of the exact problem that is causing your program to display a black screen. However, I suspect it might be one of the following:
- Not having a game loop.
- Not calling pygame.display.update() in your game loop.
- Not filling the screen with any color, for example, screen.fill(background_color).
Hope this is helpful!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…