Return to repo list

gatemender

Arcade game about fixing warp gates. LibreJam Dec 2020 Entry.
Return to HMagellan.com

commit 8704aab66254b5d325dd4cb73e8ab63c4b145bc0
parent 9bab819442ba4666c1678d8f6e06c5f50605118b
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Mon, 14 Dec 2020 18:10:24 -0600

Added title

Diffstat:
Adata/title.png | 0
Msrc/constants.py | 1+
Msrc/game.py | 4++++
3 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/data/title.png b/data/title.png Binary files differ. diff --git a/src/constants.py b/src/constants.py @@ -33,6 +33,7 @@ SHIP_MAX_SPEED = 5 BULLET_SPEED = 8 DEGREE_CORRECTION = 90 IMAGE_FILES = { + "Title" : os.path.join("data", "title.png"), "Ship": os.path.join("data", "ship1.png"), "Bullet" : os.path.join("data", "bullet1.png"), "Small_Asteroid" : os.path.join("data", "asteroid_small.png"), diff --git a/src/game.py b/src/game.py @@ -45,6 +45,9 @@ class Game(object): self.game_over_text = self.font.render("GAME OVER", False, (255, 255, 255)) self.lives_text = self.font.render(str(self.lives), False, (255, 255, 255)) self.level_text = self.font.render("GATE " + str(self.level_factor), False, (255, 255, 255)) + self.title = self.images["Title"] + self.title_rect = self.title.get_rect() + self.title_rect.center = (self.screen_rect.center[0], self.screen_rect.center[1] - 100) self.start_button = self.font.render("START", False, (255, 255, 255), (20, 20, 20)) self.start_button_rect = self.start_button.get_rect() self.start_button_rect.center = (self.screen_rect.centerx, self.screen_rect.centery + 10) @@ -276,6 +279,7 @@ class Game(object): self.screen.blit(self.score_surface, self.score_surface_rect) elif self.mode == MODES.Menu: self.screen.fill((0, 0, 0)) + self.screen.blit(self.title, self.title_rect) if not self.show_info: self.screen.blit(self.start_button, self.start_button_rect) self.screen.blit(self.instructions_button, self.instructions_button_rect)