Z? wup
Sarajevo, Federation of Bosnia and Herzego, Bosnia and Herzegovina
free palestine
trust me [matias.ma]
free palestine
trust me [matias.ma]
Currently Online
Achievement Showcase
1,180
Achievements
131
Rare Achievements
Favorite Game
𓅪
import pygame
import sys
import random

pygame.init()

WIDTH, HEIGHT = 400, 600
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Floppy Bird")

WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
GREEN = (0, 255, 0)

bird_x, bird_y = 100, HEIGHT // 2
bird_radius = 15
gravity = 0.5
bird_velocity = 0
jump_strength = -10

pipe_width = 50
pipe_gap = 150
pipe_speed = 5
pipes = []
score = 0

clock = pygame.time.Clock()
font = pygame.font.SysFont("Arial", 30)

def create_pipe():
y = random.randint(100, HEIGHT - 100 - pipe_gap)
pipes.append((WIDTH, y))

create_pipe()

def draw_pipes():
for pipe_x, pipe_y in pipes:
pygame.draw.rect(screen, GREEN, (pipe_x, 0, pipe_width, pipe_y))
pygame.draw.rect(screen, GREEN, (pipe_x, pipe_y + pipe_gap, pipe_width, HEIGHT))

def move_pipes():
global score
for i, (pipe_x, pipe_y) in enumerate(pipes):
pipes = (pipe_x - pipe_speed, pipe_y)

if pipes and pipes[0][0] + pipe_width < 0:
pipes.pop(0)
create_pipe()
score += 1

def check_collision():
for pipe_x, pipe_y in pipes:
if (bird_x + bird_radius > pipe_x and bird_x - bird_radius < pipe_x + pipe_width and
(bird_y - bird_radius < pipe_y or bird_y + bird_radius > pipe_y + pipe_gap)):
return True
if bird_y - bird_radius < 0 or bird_y + bird_radius > HEIGHT:
return True
return False

running = True
while running:
screen.fill(WHITE)

for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
if event.type == pygame.KEYDOWN and event.key == pygame.K_SPACE:
bird_velocity = jump_strength

bird_velocity += gravity
bird_y += bird_velocity

move_pipes()

pygame.draw.circle(screen, BLACK, (bird_x, bird_y), bird_radius)
draw_pipes()

if check_collision():
running = False

score_text = font.render(f"Score: {score}", True, BLACK)
screen.blit(score_text, (10, 10))

pygame.display.flip()
clock.tick(30)

screen.fill(WHITE)
game_over_text = font.render("Game Over!", True, BLACK)
screen.blit(game_over_text, (WIDTH // 2 - 100, HEIGHT // 2 - 20))
final_score_text = font.render(f"Final Score: {score}", True, BLACK)
screen.blit(final_score_text, (WIDTH // 2 - 100, HEIGHT // 2 + 20))
pygame.display.flip()
pygame.time.wait(3000)
pygame.quit()
Recent Activity
3,000 hrs on record
last played on Nov 12
0.2 hrs on record
last played on Nov 11
63 hrs on record
last played on Nov 11
Aug 15, 2025 @ 1:14am 
😡
Mar 31, 2025 @ 6:07am 
bih
Jan 20, 2025 @ 3:31pm 
+rep bot
Nov 20, 2024 @ 10:41am 
+rep, very good mate
Nov 11, 2024 @ 8:22am 
гашиш
Nov 8, 2024 @ 8:43am 
+REP