Can someone try it out for me and give me feedback?
Code:
Move Zero
zero_y_velocity += gravity
zero_y += zero_y_velocity
Set background color
screen.fill(bg_color)
Draw Zero
screen.blit(zero_image, (zero_x, zero_y))
Update and draw pipes
for pipe in pipes:
pipe.update()
pipe.draw()
Update and draw pipes
for pipe in pipes:
if pipes[0].x < -52:
pipes.pop(0)
if pipes[0].x < screen_width - 100:
pipes.append(Pipe(screen_width, random.randint(200, screen_height - 200)))
Check collisions
if zero_y > screen_height - 40 or zero_y < 0:
hit_sound.play()
# Zeichne den toten Bildschirm
font = pygame.font.Font(None, 36)
text = font.render("You died!", 1, (10, 10, 10))
screen.blit(text, (100, 200))
pygame.display.update()
pygame.time.wait(3000)
break
for pipe in pipes:
if pipe.x < 50 and pipe.x > 20:
if zero_y < pipe.y or zero_y > pipe.y + 320:
hit_sound.play()
# Zeichne den toten Bildschirm
font = pygame.font.Font(None, 36)
text =