#Hello everyone I made a game that is like Flappy bird but the character is a Flipper zero

4 messages · Page 1 of 1 (latest)

fallen orbit
#

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 =

#

Hello everyone I made a game that is like Flappy bird but the character is a Flipper zero

fallen orbit
# tepid crystal missing zero image

Here is an updated version

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()

Create new pipe if the first is off the screen

if pipes[0].x < -52:
pipes.pop(0)

Add a new pipe if necessary

if pipes[-1].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()
# Draw the dead screen
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()
# Draw the dead screen
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