1515
1616import math
1717import random
18+ import time
1819
1920# Check for updates
2021import requests
5556planes = ["assets/plane.png" , "assets/plane2.png" , "assets/plane3.png" , "assets/plane4.png" ]
5657plane_index = 0
5758
59+ # ==========================================================================
5860
5961# Function to rotate an image
6062def rotate_image (image , angle ):
@@ -83,16 +85,36 @@ def __init__(self, x, y, length):
8385 def draw (self , surface ):
8486 pygame .draw .line (surface , white , (self .x , self .y ), (self .x , self .y + self .length ), 1 )
8587
88+ # ==========================================================================
89+
8690
8791# Initialize Pygame
8892pygame .init ()
8993
9094# Set up the display window
91- screen = pygame .display .set_mode ((1000 , 800 ) ) # (width, height)
95+ screen = pygame .display .set_mode ((1000 , 750 ), pygame . RESIZABLE ) # (width, height)
9296pygame .display .set_caption (f"HyperAir { version } " )
9397
9498# Set up fonts
9599font = pygame .font .Font ("fonts/courierprime.ttf" , 15 ) # (font, size)
100+ logofont = pygame .font .Font ("fonts/RobotoMono-Regular.ttf" , 70 )
101+
102+ # ==========================================================================
103+
104+ # Loading Screen
105+ logo = pygame .image .load ("assets/logo.png" )
106+ loadingtitle = logofont .render ("Hyper Studios" , True , white )
107+
108+ screen .fill ((0 , 0 , 0 ))
109+
110+ screen .blit (logo , (90 , (screen .get_height () - logo .get_height ()) // 2 ))
111+ screen .blit (loadingtitle , (360 , (screen .get_height () - loadingtitle .get_height ()) // 2 ))
112+
113+ pygame .display .flip ()
114+
115+ time .sleep (5 )
116+
117+ # ==========================================================================
96118
97119# Load the image of the plane
98120plane_image = pygame .image .load (planes [plane_index ])
@@ -117,6 +139,7 @@ def draw(self, surface):
117139bird_image = pygame .image .load ("assets/bird.png" )
118140
119141# ==========================================================================
142+
120143# Load the icon image
121144icon_image = pygame .image .load ("assets/jetengine.png" )
122145
@@ -125,7 +148,6 @@ def draw(self, surface):
125148
126149# ==========================================================================
127150
128-
129151# Set up text
130152title = font .render (f"[HyperAir { version } ]" , True , gray )
131153speedtxt = font .render (f"[Speed: { speed :.2f} ]" , True , gray )
@@ -334,4 +356,4 @@ def draw(self, surface):
334356 pygame .display .flip ()
335357
336358# Quit Pygame
337- pygame .quit ()
359+ # pygame.quit()
0 commit comments