Beispiel #1
0
    def loadingScreen(self):
        """Upcoming system to show deaths that level, time taken, etc. """
        self.continueButton = pygame.image.load(Directory().get_directory() + '/images/intro/play.png')
        self.continueButton2 = pygame.image.load(Directory().get_directory() + '/images/intro/play2.png')

        # pygame.display.set_caption("Master of Thieves")
        self.background_image = pygame.transform.scale(pygame.image.load(Directory().get_directory() + "/images/backgrounds/background0.png"), (self.WIN_WIDTH, self.WIN_HEIGHT)) # Tutorial background
        self.screen.blit(self.background_image, (0,0))
        self.showTimeTaken()
        pygame.mouse.set_visible(True)
        self.m1 = self.screen.blit(self.continueButton, (0, 75))
        self.loadingStatus = True
        while self.loadingStatus == True:
            for e in pygame.event.get():
                self.pos = pygame.mouse.get_pos()
                if e.type == QUIT:
                    exit()
                if e.type == MOUSEMOTION:
                    if self.m1.collidepoint(self.pos): # Scrolling over the Main Menu button, so change the image so the user knows they are on it
                        self.screen.blit(self.continueButton2, (0, 75))
                    else:
                        self.screen.blit(self.continueButton, (0, 75)) # Change back to the normal image since the user is no longer on it
                if e.type == MOUSEBUTTONDOWN:
                    if self.m1.collidepoint(self.pos):
                        self.loadingStatus = False
            pygame.display.update()
Beispiel #2
0
    def tutorial(self):
        pygame.display.set_caption(self.GAMENAME)
        self.background_image = pygame.transform.scale(pygame.image.load(Directory().get_directory() + "/images/intro/tutscreen.png"), (self.WIN_WIDTH, self.WIN_HEIGHT)) # Tutorial background
        self.screen.blit(self.background_image, (0,0))

        # Menu buttons
        self.menu = pygame.image.load(Directory().get_directory() + '/images/intro/menu.png')
        self.menu2 = pygame.image.load(Directory().get_directory() + '/images/intro/menu2.png')

        self.m1 = self.screen.blit(self.menu, (0,0))
        self.tutstatus = True
        while self.tutstatus == True:
            for e in pygame.event.get():
                self.pos = pygame.mouse.get_pos()
                if e.type == QUIT: # "X"ed out of the game
                    exit()
                if e.type == MOUSEMOTION:
                    if self.m1.collidepoint(self.pos): # Scrolling over the Main Menu button, so change the image so the user knows they are on it
                        self.screen.blit(self.menu2, (0,0))
                    else:
                        self.screen.blit(self.menu, (0,0)) # Change back to the normal image since the user is no longer on it
                if e.type == MOUSEBUTTONDOWN:
                    if self.m1.collidepoint(self.pos):
                        self.tutstatus = False
                        self.titleScreen() # Clicked to go back to main menu
                        self.getGameVersion()
                        pygame.display.update()
            pygame.display.update()
Beispiel #3
0
    def __init__(self):
        os.environ['SDL_VIDEO_CENTERED'] = '1'

        self.WIN_WIDTH = 800
        self.WIN_HEIGHT = 800
        self.HALF_WIDTH = int(self.WIN_WIDTH / 2)
        self.HALF_HEIGHT = int(self.WIN_HEIGHT / 2)

        self.DISPLAY = (self.WIN_WIDTH, self.WIN_HEIGHT)
        self.DEPTH = 32
        self.FLAGS = 0
        self.CAMERA_SLACK = 30

        self.GAMENAME = "Master of Thieves"

        self.icon = pygame.image.load(Directory().get_directory() + "/images/winicon.ico")
        self.icon.set_alpha(0)
        pygame.display.set_icon(self.icon)

        self.screen = pygame.display.set_mode(self.DISPLAY, self.FLAGS, self.DEPTH)
        self.screen_rect = self.screen.get_rect()

        self.font = pygame.font.SysFont("arial", 25)
        self.buildFont = pygame.font.SysFont("arial", 12)

        self.loadingBar = pygame.transform.scale(pygame.image.load(Directory().get_directory() + "/images/button.png"), (self.WIN_WIDTH, 35))

        self.optionsMenu = False

        self.gameVersion = self.buildFont.render('Alpha 0.0.1', True, (0,0,0))
Beispiel #4
0
 def __init__(self):
     """Handles loading the sound files; they are called by doing sounds.NAME in the game class."""
     self.coin_sound = pygame.mixer.Sound(Directory().get_directory() +
                                          '/sounds/game/coin_sound.wav')
     #self.death_sound = pygame.mixer.Sound(Directory().get_directory() + '/sounds/game/death.wav')
     self.door = pygame.mixer.Sound(Directory().get_directory() +
                                    '/sounds/game/door.wav')
Beispiel #5
0
    def titleScreen(self):
        pygame.display.set_caption(self.GAMENAME) # Window caption
        self.background_image = pygame.transform.scale(pygame.image.load(Directory().get_directory() + "/images/intro/title_bg.png"), (self.WIN_WIDTH, self.WIN_HEIGHT)) # Load the title background

        # All of the button images - probably should have loaded through images like the rest
        self.play = pygame.image.load(Directory().get_directory() + '/images/intro/play.png')
        self.play2 = pygame.image.load(Directory().get_directory() + '/images/intro/play2.png')
        self.exit = pygame.image.load(Directory().get_directory() + '/images/intro/exit.png')
        self.exit2 = pygame.image.load(Directory().get_directory() + '/images/intro/exit2.png')
        self.tut = pygame.image.load(Directory().get_directory() + '/images/intro/tutorial.png')
        self.tut2 = pygame.image.load(Directory().get_directory() + '/images/intro/tutorial2.png')
        self.options = pygame.image.load(Directory().get_directory() + '/images/intro/options.png')
        self.options2 = pygame.image.load(Directory().get_directory() + '/images/intro/options1.png')

        # Blit the initial images to the screen; order: PLAY, TUT, EXIT
        self.screen.blit(self.background_image, (0,0))
        self.b1 = self.screen.blit(self.play, (0,100))
        self.b2 = self.screen.blit(self.tut, (0,200))
        self.b3 = self.screen.blit(self.options, (0,300))
        self.b4 = self.screen.blit(self.exit, (0,400))
        self.title = True # Title status is true while the game waits for the user to make a choice

        # We want the cursor on the main menu and tutorial screen.
        pygame.mouse.set_visible(True)
        pygame.display.update()
Beispiel #6
0
 def __init__(self, x, y):
     """Handles the creation and images of platforms; they are the P in level creation."""
     Entity.__init__(self)
     self.image = pygame.transform.scale(
         pygame.image.load(Directory().get_directory() +
                           "/images/brick.png"), (32, 32))
     self.rect = Rect(x, y, 23, 32)
     self.mask = pygame.mask.from_surface(self.image)
Beispiel #7
0
 def __init__(self, x, y):
     """Handles the door image and position of the door; it is created with the T and B in level creation."""
     Entity.__init__(self)
     door1 = pygame.transform.scale(
         pygame.image.load(Directory().get_directory() +
                           "/images/door_closed.png"), (32, 32))
     self.image = door1.convert_alpha()
     self.rect = Rect(x, y, 32, 5)
Beispiel #8
0
 def __init__(self, x, y):
     """Handles the coins image and size; they are O in the level creation."""
     Entity.__init__(self)
     self.image = pygame.transform.scale(
         pygame.image.load(Directory().get_directory() +
                           "/images/coin.png"), (22, 20))
     self.mask = pygame.mask.from_surface(self.image)
     self.image.convert_alpha()
     self.rect = Rect(x, y, 22, 20)
Beispiel #9
0
 def __init__(self, x, y, number):
     """Handles the creation and images of spikes in the game class; A(1) = up, V(2) = down, >(3) = right, <(4) = left"""
     Entity.__init__(self)
     self.number = number
     spike = pygame.transform.scale(
         pygame.image.load(Directory().get_directory() + "/images/spike" +
                           str(self.number) + ".png"), (32, 32))
     self.image = spike.convert_alpha()
     self.mask = pygame.mask.from_surface(self.image)
     self.rect = Rect(x, y, 32, 32)
Beispiel #10
0
 def __init__(self, x, y, level):
     """Handles loading the correct trophy image for each level and it's location based on being passed an X, Y, and the current level within the game class when the level is loaded (it is the X)."""
     Entity.__init__(self)
     self.level = level
     trophy = pygame.transform.scale(
         pygame.image.load(Directory().get_directory() +
                           "/images/trophies/trophy" + str(self.level) +
                           ".png"), (32, 32))
     self.image = trophy.convert_alpha()
     self.mask = pygame.mask.from_surface(self.image)
     self.rect = Rect(x, y, 32, 32)
Beispiel #11
0
    def update(self, up, left, right, platforms):
        """Handle the directions of the character and change the image based on left or right."""
        if up:
            # only jump if on the ground
            if self.on_ground:
                self.yvel -= 10
        if left and self.dead == False:
            self.direction = 'left'
            self.image = pygame.transform.scale(pygame.image.load(Directory().get_directory() + "/images/Thief2.png"), (40, 40))
            self.image.convert_alpha()
            self.mask = pygame.mask.from_surface(self.image)
            self.xvel = -8
        if right and self.dead == False:
            self.direction = 'right'
            self.image = pygame.transform.scale(pygame.image.load(Directory().get_directory() + "/images/Thief.png"), (40, 40))
            self.image.convert_alpha()
            self.mask = pygame.mask.from_surface(self.image)
            self.xvel = 8
        if self.on_ground == False:
            # only accelerate with gravity if in the air
            self.yvel += 0.95
            # max falling speed
            if self.yvel > 100: 
                self.yvel = 100
        if not(left or right):
            self.xvel = 0

        # increment in x direction
        self.rect.left += self.xvel

        # do x-axis collisions
        self.collide(self.xvel, 0, platforms)

        # increment in y direction
        self.rect.top += self.yvel

        # assuming we're in the air
        self.on_ground = False;

        # do y-axis collisions
        self.collide(0, self.yvel, platforms)
Beispiel #12
0
 def __init__(self, x, y):
     """The player class handles all actions of the user. It is the C in level loading."""
     Entity.__init__(self)
     self.xvel = 0
     self.yvel = 0
     self.dead = False
     self.direction = 'right'
     self.on_ground = True
     self.canDie = True
     self.coin_count = 0
     self.deaths = 0
     self.levelDeaths = 0
     self.up = False
     self.right = False
     self.left = False
     self.image = pygame.transform.scale(
         pygame.image.load(Directory().get_directory() + "/images/Thief.png"), (40, 40)
     )
     self.image.convert_alpha()
     self.mask = pygame.mask.from_surface(self.image)
     self.rect = Rect(x, y, 32, 40)
     self.canPressKey = True
Beispiel #13
0
    def buildLevel(self):
        """
        KEY FOR LEVELS
        P = Platform
        C = player starting position
        A = Spike (Up)    - 1
        V = Spike (Down)  - 2
        > = Spike (Right) - 3
        < = Spike (Left)  - 4
        K = Key
        X = Trophy
        T = Door Top
        B = Door Bottom
        O = Coin
        """
        level = open(Directory.get_directory() + '/levels/level' + str(self.level) + '.txt', 'r')
        for row in level:
            for col in row:
                if col.isdigit() and self.loadedCoins == False:
                    if int(col) > 0:
                        self.loadedCoins = True
                        self.levelCoins = int(col)
                    else:
                        self.loadedCoins = True
                        self.levelCoins = 1
                if col == "P":
                    p = Platform(self.x, self.y) # Place a platform at the given x,y
                    self.platforms.insert(0, p) # Insert it into the platforms list
                    self.entities.add(p) # Add to Entities so it appears on screen
                if col == "C":
                    self.charX = self.x # The character x found from file loading
                    self.charY = self.y # The character y found from file loading
                    self.player = Player(self.charX, self.charY) # Set the player along with the x,y of the starting position
                if col == "A":
                    spike = Spike(self.x, self.y, 1) # Load a spike at the x,y found
                    self.entities.add(spike) # Add the spike to the Entities
                    self.spikes.add(spike) # Add the spike to the spike sprite group for collison purposes
                if col == "V":
                    spike = Spike(self.x, self.y, 2) # Load a spike at the x,y found
                    self.entities.add(spike) # Add the spike to the Entities
                    self.spikes.add(spike) # Add the spike to the spike sprite group for collison purposes
                if col == ">":
                    spike = Spike(self.x, self.y, 3) # Load a spike at the x,y found
                    self.entities.add(spike) # Add the spike to the Entities
                    self.spikes.add(spike) # Add the spike to the spike sprite group for collison purposes
                if col == "<":
                    spike = Spike(self.x, self.y, 4) # Load a spike at the x,y found
                    self.entities.add(spike) # Add the spike to the Entities
                    self.spikes.add(spike) # Add the spike to the spike sprite group for collison purposes
                if col == "O":
                    coin = Coins(self.x, self.y) # Load a coin image at the given x,y
                    self.entities.add(coin) # Coin 1 to the Entities
                    self.coin.add(coin) # add coin 1 to the coinA sprite group
                if col == "X":
                    try:
                        win_object = Trophy(self.x, self.y, self.level) # Load the proper trophy by passing the level to the trophy class and load at the given x,y from file loading
                        self.entities.add(win_object) # Add the trophy to the Entities so it appears
                        self.trophies.add(win_object) # Also make it a trophy sprite for collision detection purposes
                    except:
                        win_object = Trophy(self.x, self.y, 0)
                        self.entities.add(win_object) # Add the trophy to the Entities so it appears
                        self.trophies.add(win_object) # Also make it a trophy sprite for collision detection purposes
                if col == "T":
                    self.doorA = Door(self.x, self.y)
                    self.platforms.append(self.doorA) # Make the door top a platform so the player cannot walk through it
                    self.entities.add(self.doorA) # Add the door bottom to the Entities
                if col == "B":
                    self.doorB = Door(self.x, self.y)
                    self.platforms.append(self.doorB) # Make the door bottom a platform so the player cannot walk through it
                    self.entities.add(self.doorB) # Add the door bottom to Entities
                self.x += 32
            self.y += 32
            self.x = 0

        # Try loading in the level image and theme; if it fails, use level 0 theme and background
        try:
            self.background = pygame.image.load(Directory.get_directory() + '/images/backgrounds/background' + str(self.level) + '.png').convert_alpha()
            self.background_rect = self.background.get_rect()
        except:
            self.background = pygame.image.load(Directory.get_directory() + '/images/backgrounds/background0.png').convert_alpha()
            self.background_rect = self.background.get_rect()
Beispiel #14
0
    def buildLevel(self):
        """
        KEY FOR LEVELS
        P = Platform
        C = player starting position
        A = Spike (Up)    - 1
        V = Spike (Down)  - 2
        > = Spike (Right) - 3
        < = Spike (Left)  - 4
        K = Key
        X = Trophy
        T = Door Top
        B = Door Bottom
        O = Coin
        """
        level = open(
            Directory.get_directory() + '/levels/level' + str(self.level) +
            '.txt', 'r')
        for row in level:
            for col in row:
                if col.isdigit() and self.loadedCoins == False:
                    if int(col) > 0:
                        self.loadedCoins = True
                        self.levelCoins = int(col)
                    else:
                        self.loadedCoins = True
                        self.levelCoins = 1
                if col == "P":
                    p = Platform(self.x,
                                 self.y)  # Place a platform at the given x,y
                    self.platforms.insert(
                        0, p)  # Insert it into the platforms list
                    self.entities.add(
                        p)  # Add to Entities so it appears on screen
                if col == "C":
                    self.charX = self.x  # The character x found from file loading
                    self.charY = self.y  # The character y found from file loading
                    self.player = Player(
                        self.charX, self.charY
                    )  # Set the player along with the x,y of the starting position
                if col == "A":
                    spike = Spike(self.x, self.y,
                                  1)  # Load a spike at the x,y found
                    self.entities.add(spike)  # Add the spike to the Entities
                    self.spikes.add(
                        spike
                    )  # Add the spike to the spike sprite group for collison purposes
                if col == "V":
                    spike = Spike(self.x, self.y,
                                  2)  # Load a spike at the x,y found
                    self.entities.add(spike)  # Add the spike to the Entities
                    self.spikes.add(
                        spike
                    )  # Add the spike to the spike sprite group for collison purposes
                if col == ">":
                    spike = Spike(self.x, self.y,
                                  3)  # Load a spike at the x,y found
                    self.entities.add(spike)  # Add the spike to the Entities
                    self.spikes.add(
                        spike
                    )  # Add the spike to the spike sprite group for collison purposes
                if col == "<":
                    spike = Spike(self.x, self.y,
                                  4)  # Load a spike at the x,y found
                    self.entities.add(spike)  # Add the spike to the Entities
                    self.spikes.add(
                        spike
                    )  # Add the spike to the spike sprite group for collison purposes
                if col == "O":
                    coin = Coins(self.x,
                                 self.y)  # Load a coin image at the given x,y
                    self.entities.add(coin)  # Coin 1 to the Entities
                    self.coin.add(coin)  # add coin 1 to the coinA sprite group
                if col == "X":
                    try:
                        win_object = Trophy(
                            self.x, self.y, self.level
                        )  # Load the proper trophy by passing the level to the trophy class and load at the given x,y from file loading
                        self.entities.add(
                            win_object
                        )  # Add the trophy to the Entities so it appears
                        self.trophies.add(
                            win_object
                        )  # Also make it a trophy sprite for collision detection purposes
                    except:
                        win_object = Trophy(self.x, self.y, 0)
                        self.entities.add(
                            win_object
                        )  # Add the trophy to the Entities so it appears
                        self.trophies.add(
                            win_object
                        )  # Also make it a trophy sprite for collision detection purposes
                if col == "T":
                    self.doorA = Door(self.x, self.y)
                    self.platforms.append(
                        self.doorA
                    )  # Make the door top a platform so the player cannot walk through it
                    self.entities.add(
                        self.doorA)  # Add the door bottom to the Entities
                if col == "B":
                    self.doorB = Door(self.x, self.y)
                    self.platforms.append(
                        self.doorB
                    )  # Make the door bottom a platform so the player cannot walk through it
                    self.entities.add(
                        self.doorB)  # Add the door bottom to Entities
                self.x += 32
            self.y += 32
            self.x = 0

        # Try loading in the level image and theme; if it fails, use level 0 theme and background
        try:
            self.background = pygame.image.load(
                Directory.get_directory() + '/images/backgrounds/background' +
                str(self.level) + '.png').convert_alpha()
            self.background_rect = self.background.get_rect()
        except:
            self.background = pygame.image.load(
                Directory.get_directory() +
                '/images/backgrounds/background0.png').convert_alpha()
            self.background_rect = self.background.get_rect()
Beispiel #15
0
# Read about what each thing does in the respective class
# !!! WARNING !!! The game will break if the level does not contain the player ("C") within; the game may break if the door Top and Bottom is not found as well.

import pygame

from Entities.player import Player
from Entities.platform import Platform
from Entities.door import Door
from Entities.coins import Coins
from Entities.spike import Spike
from Entities.trophies import Trophy
from display.display import Display
from BuildFunctions.directory import Directory

Display = Display()
Directory = Directory()


class LevelLoader(object):
    """
    This class actually handles a lot of things; while also handling the level loading, it also must be used to call from another class in the game
    class itself.  For example, to use anything from the Player class, the user must have LevelLoader()getPlayer().functionHere.
    In all honesty, this class handles pretty much everything that has anything to do with levels.
    """
    def __init__(self):
        self.level = 0
        self.platforms = []

        self.doorsClosed = True

        self.entities = pygame.sprite.Group()
Beispiel #16
0
def main():
    pygame.mixer.pre_init(44100, -16, 2, 2048)
    timer = pygame.time.Clock()

    pygame.mouse.set_visible(False)

    print("Successfully reading from directory: " +
          Directory().get_directory())
    LevelLoader.buildLevel()
    starting_time = pause.time()
    Variables.canUseKeys = False

    total_level_width = len('level'[0]) * 32
    total_level_height = len('level') * 32
    camera = Camera(complex_camera, total_level_width, total_level_height)
    LevelLoader.entities.add(LevelLoader.getPlayer())
    pygame.display.update()

    while 1:
        pygame.display.set_caption(Display.gameName() + " | Level: " +
                                   str(LevelLoader.get_level()) +
                                   " | Deaths (level): " +
                                   str(Deaths.getLevelDeaths()) +
                                   " | Deaths (Total): " +
                                   str(Deaths.getDeathsTotal()) + " | FPS: " +
                                   str(int(timer.get_fps())))
        asize = ((Display.screen_rect.w // LevelLoader.getBGWidth() + 1) *
                 LevelLoader.getBGWidth(),
                 (Display.screen_rect.h // LevelLoader.getBGHeight() + 1) *
                 LevelLoader.getBGHeight())

        for x in range(0, asize[0], LevelLoader.getBGWidth()):
            for y in range(0, asize[1], LevelLoader.getBGHeight()):
                Display.screen.blit(LevelLoader.getBackground(), (x, y))

        timer.tick(38)

        if not Variables.loadedTheme:
            Variables.loadedTheme = True
            try:
                print("\nAttempting to choose level specific theme...")
                theme = (Themes(LevelLoader.get_level()))
                print("Level specific theme selection successful.")
            except:
                print(
                    "Failed to load level specific theme; attempting default theme..."
                )
                theme = (Themes(0))
                print("Loaded backup theme.")
            pygame.mixer.music.play(-1, 0.0)
        pygame.mixer.music.set_volume(Variables.volume)

        coin_collide = pygame.sprite.spritecollide(LevelLoader.getPlayer(),
                                                   LevelLoader.get_coins(),
                                                   True,
                                                   pygame.sprite.collide_mask)
        for coin in coin_collide:
            if coin:
                LevelLoader.getPlayer().add_coin()
                sounds.coin_sound.play()
                sounds.coin_sound.set_volume(Variables.volume)

        if pygame.sprite.spritecollide(LevelLoader.getPlayer(),
                                       LevelLoader.getTrophy(), True,
                                       pygame.sprite.collide_mask):
            if Variables.showTime:
                print("getting time for level: " +
                      str(LevelLoader.get_level()))
                end_time = pause.time()
                Variables.total_time = float("{0:.2f}".format(end_time -
                                                              starting_time))
                print(str(Variables.total_time))
                Display.loadingScreen()
                pygame.mouse.set_visible(False)
            try:
                Variables.loadedTheme = False
                Variables.canUseKeys = False
                LevelLoader.add_level()
                Display.loadingLevel(LevelLoader.get_level())
                Deaths.resetLevelDeaths()
                LevelLoader.rebuildDoors()
                LevelLoader.getPlayer().resetCoins()
                LevelLoader.clearScreen()
                pygame.display.update()
                LevelLoader.rebuildObjects()
                pause.sleep(5)
                LevelLoader.buildLevel()
                LevelLoader.entities.add(LevelLoader.getPlayer())
                starting_time = pause.time()
            except:
                Display.gameOver()
                pygame.display.update()
                pause.sleep(5)
                Display.reloadTitleScreen()
                Deaths.resetDeathsTotal()
                LevelLoader.reset_level()
                pygame.mixer.music.stop()
                break

        if pygame.sprite.spritecollide(
                LevelLoader.getPlayer(), LevelLoader.getSpikes(), False,
                pygame.sprite.collide_mask) and LevelLoader.getPlayer(
                ).canDie == True:
            LevelLoader.getPlayer().dead = True

        if LevelLoader.getPlayer().dead:
            Variables.canUseKeys = False
            LevelLoader.rebuildDoors()
            Deaths.addDeaths()
            LevelLoader.getPlayer().resetCoins()
            LevelLoader.clearScreen()
            pygame.display.update()
            LevelLoader.rebuildObjects()
            pause.sleep(1)
            LevelLoader.buildLevel()
            LevelLoader.entities.add(LevelLoader.getPlayer())

        if LevelLoader.getPlayer().get_coins() >= LevelLoader.get_level_coins(
        ) and LevelLoader.doorStatus() == True:
            sounds.door.play()
            sounds.door.set_volume(Variables.volume)
            for x in range(2):
                LevelLoader.delPlatforms()
            LevelLoader.delDoors()

        camera.update(LevelLoader.getPlayer())

        LevelLoader.getPlayer().update(LevelLoader.getPlayer().up,
                                       LevelLoader.getPlayer().left,
                                       LevelLoader.getPlayer().right,
                                       LevelLoader.getPlatforms())
        for ent in LevelLoader.getEntities():
            Display.screen.blit(ent.image, camera.apply(ent))

        if Variables.canUseKeys:
            LevelLoader.getPlayer().get_key_press()

        Display.getGameVersion()
        LevelLoader.infoScreen()
        pygame.display.update()
        Variables.canUseKeys = True
Beispiel #17
0
    def optionsScreen(self):
        self.background_image = pygame.transform.scale(pygame.image.load(Directory().get_directory() + "/images/intro/title_bg.png"), (self.WIN_WIDTH, self.WIN_HEIGHT)) # Tutorial background
        self.screen.blit(self.background_image, (0,0))

        self.menu = pygame.image.load(Directory().get_directory() + '/images/intro/menu.png')
        self.menu2 = pygame.image.load(Directory().get_directory() + '/images/intro/menu2.png')
        self.mute = pygame.image.load(Directory().get_directory() + '/images/intro/mute.png')
        self.mute1 = pygame.image.load(Directory().get_directory() + '/images/intro/mute1.png')
        self.volumeInc = pygame.image.load(Directory().get_directory() + '/images/intro/volume+.png')
        self.volumeInc1 = pygame.image.load(Directory().get_directory() + '/images/intro/volume+1.png')
        self.volumeDec = pygame.image.load(Directory().get_directory() + '/images/intro/volume-.png')
        self.volumeDec1 = pygame.image.load(Directory().get_directory() + '/images/intro/volume-1.png')
        self.showTime = pygame.image.load(Directory().get_directory() + '/images/intro/showtime.png')
        self.showTime1 = pygame.image.load(Directory().get_directory() + '/images/intro/showtime1.png')
        self.bug = pygame.image.load(Directory().get_directory() + '/images/intro/bug.png')
        self.bug1 = pygame.image.load(Directory().get_directory() + '/images/intro/bug1.png')

        self.m1 = self.screen.blit(self.menu, (0,100))
        self.m2 = self.screen.blit(self.mute, (0,200))
        self.m3 = self.screen.blit(self.volumeInc, (0,300))
        self.m4 = self.screen.blit(self.volumeDec, (0,400))
        self.m5 = self.screen.blit(self.showTime, (0,500))
        self.m6 = self.screen.blit(self.bug, (0,600))

        while self.optionsMenu == True:
            pygame.display.set_caption(self.GAMENAME + " - Options | Muted: " + str(Variables.muted) + " | Current Volume: " + str(Variables.volume) + " | time-per-level: " + str(Variables.showTime))
            for e in pygame.event.get():
                self.pos = pygame.mouse.get_pos()
                if e.type == QUIT:
                    exit()
                if e.type == MOUSEMOTION:
                    if self.m1.collidepoint(self.pos):
                        self.screen.blit(self.menu2, (0,100))
                    elif self.m2.collidepoint(self.pos):
                        self.screen.blit(self.mute1, (0,200))
                    elif self.m3.collidepoint(self.pos):
                        self.screen.blit(self.volumeInc1, (0,300))
                    elif self.m4.collidepoint(self.pos):
                        self.screen.blit(self.volumeDec1, (0,400))
                    elif self.m5.collidepoint(self.pos):
                        self.screen.blit(self.showTime1, (0,500))
                    elif self.m6.collidepoint(self.pos):
                        self.screen.blit(self.bug1, (0,600))
                    else:
                        self.screen.blit(self.menu, (0,100))
                        self.screen.blit(self.mute, (0,200))
                        self.screen.blit(self.volumeInc, (0,300))
                        self.screen.blit(self.volumeDec, (0,400))
                        self.screen.blit(self.showTime, (0,500))
                        self.screen.blit(self.bug, (0,600))
                if e.type == MOUSEBUTTONDOWN:
                    if self.m1.collidepoint(self.pos):
                        self.optionsMenu = False
                        self.titleScreen()
                        print(Variables.muted)
                        self.getGameVersion()
                    if self.m2.collidepoint(self.pos):
                        if Variables.muted == False:
                            Variables.volume = 0.0
                            Variables.muted = True
                            break
                        if Variables.muted == True:
                            Variables.volume = 0.2
                            Variables.muted = False
                            break
                    if self.m3.collidepoint(self.pos):
                        if Variables.volume <= 0.9:
                            Variables.volume += 0.1
                            Variables.muted = False
                        else:
                            Variables.volume = 1.0
                    if self.m4.collidepoint(self.pos):
                        if Variables.volume >= 0.1:
                            Variables.volume -= 0.1
                        if Variables.volume < 0.1:
                            Variables.volume = 0.0
                            Variables.muted = True
                    if self.m5.collidepoint(self.pos):
                        if Variables.showTime == False:
                            Variables.showTime = True
                            break
                        if Variables.showTime == True:
                            Variables.showTime = False
                            break
                    #if self.m6.collidepoint(self.pos):
                    #	result = tkMessageBox.askquestion("Issues Page Launcher", "This will launch a webbrowser directed to the MoT issues page; click 'yes' if you are okay with this or no to cancel.", icon='warning')
                    #	if result == "yes":
                    #		webbrowser.open('http://wepcgame.com/issues/my_view_page.php')
                    #	else:
                    #		break
            pygame.display.update()