-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_assets.py
More file actions
33 lines (25 loc) · 852 Bytes
/
create_assets.py
File metadata and controls
33 lines (25 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import pygame
import os
# Initialize Pygame
pygame.init()
# Create assets directory if it doesn't exist
os.makedirs("assets", exist_ok=True)
# Set up colors
WHITE = (255, 255, 255)
YELLOW = (255, 255, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
# Create bird image (yellow circle)
bird_surface = pygame.Surface((40, 40), pygame.SRCALPHA)
pygame.draw.circle(bird_surface, YELLOW, (20, 20), 20)
pygame.image.save(bird_surface, "assets/bird.png")
# Create pipe image (green rectangle)
pipe_surface = pygame.Surface((80, 320), pygame.SRCALPHA)
pipe_surface.fill(GREEN)
pygame.image.save(pipe_surface, "assets/pipe.png")
# Create background image (blue sky)
background_surface = pygame.Surface((400, 600))
background_surface.fill(BLUE)
pygame.image.save(background_surface, "assets/background.png")
pygame.quit()
print("Assets created successfully!")