Ejemplo n.º 1
0
def cliffs_area():
    """
    Create and return Cliffs Area.
    """
    room = Room()
    """ Set up the game and initialize the variables. """
    # Sprite lists
    room.wall_list = arcade.SpriteList()

    # -- Set up the walls
    # Create bottom and top row of boxes
    # This y loops a list of two, the coordinate 0, and just under the top of window
    for y in (0, SCREEN_HEIGHT - WALL_SPRITE_SIZE):
        # Loop for each box going across
        for x in range(0, SCREEN_WIDTH, WALL_SPRITE_SIZE):
            wall = arcade.Sprite(
                "images/nature_tileset_without_gaps/_lava/lava1.png",
                WALL_SPRITE_SCALING)
            wall.left = x
            wall.bottom = y
            wall.tag = "cliff"
            room.wall_list.append(wall)

    # Create left and right column of boxes
    for x in (0, SCREEN_WIDTH - WALL_SPRITE_SIZE):
        # Loop for each box going across
        for y in range(WALL_SPRITE_SIZE, SCREEN_HEIGHT - WALL_SPRITE_SIZE,
                       WALL_SPRITE_SIZE):
            # Skip making a block 4 and 5 blocks up
            if (y != WALL_SPRITE_SIZE * 4
                    and y != WALL_SPRITE_SIZE * 5) or x != 0:
                wall = arcade.Sprite(
                    "images/nature_tileset_without_gaps/_rocky/rocky4.png",
                    WALL_SPRITE_SCALING)
                wall.left = x
                wall.bottom = y
                wall.tag = "cliff"
                room.wall_list.append(wall)

    room.problem = "Find the will to live!"

    if room.is_answered is True:
        room.key = arcade.Sprite("images/16x16/Item__69.png",
                                 WALL_SPRITE_SCALING)
        room.key.center_x = random.randrange(SCREEN_WIDTH)
        room.key.center_y = random.randrange(SCREEN_HEIGHT)
        room.key.draw()

    wall = arcade.Sprite(
        "images/images/nature_tileset_without_gaps/_lava/lava.png",
        WALL_SPRITE_SCALING)
    wall.left = 5 * WALL_SPRITE_SIZE
    wall.bottom = 2 * WALL_SPRITE_SIZE
    room.wall_list.append(wall)
    room.background = \
        arcade.load_texture("images/bgs/PNG/Full/Miscellaneous/volcanoes.png")

    return room
Ejemplo n.º 2
0
def reflecting_pools():
    """
    Create and return Reflecting Pools.
    """
    room = Room()
    """ Set up the game and initialize the variables. """
    # Sprite lists
    room.wall_list = arcade.SpriteList()

    # -- Set up the walls
    # Create bottom and top row of mirrors
    # This y loops a list of two, the coordinate 0, and just under the top of window
    for y in (0, SCREEN_HEIGHT - WALL_SPRITE_SIZE):
        # Loop for each mirror going across
        for x in range(0, SCREEN_WIDTH, WALL_SPRITE_SIZE):
            wall = arcade.Sprite(
                "images/nature_tileset_without_gaps/_water/water2_transp.png",
                WALL_SPRITE_SCALING)
            wall.left = x
            wall.bottom = y
            wall.tag = "mirror"
            wall.code = dec_to_bin(x)
            room.wall_list.append(wall)

    # Create left and right column of mirrors
    for x in (0, SCREEN_WIDTH - WALL_SPRITE_SIZE):
        # Loop for each mirror going across
        for y in range(WALL_SPRITE_SIZE, SCREEN_HEIGHT - WALL_SPRITE_SIZE,
                       WALL_SPRITE_SIZE):
            # Skip making a block 4 and 5 blocks up
            if (y != WALL_SPRITE_SIZE * 4
                    and y != WALL_SPRITE_SIZE * 5) or x != 0:
                wall = arcade.Sprite(
                    "images/nature_tileset_without_gaps/_water/water1_transp.png",
                    WALL_SPRITE_SCALING)
                wall.left = x
                wall.bottom = y
                wall.tag = "mirror"
                wall.code = bin_to_dec(x)
                room.wall_list.append(wall)

    wall = arcade.Sprite(
        "images/nature_tileset_without_gaps/_water/water_full_1.png",
        WALL_SPRITE_SCALING)
    wall.left = 5 * WALL_SPRITE_SIZE
    wall.bottom = 6 * WALL_SPRITE_SIZE
    room.wall_list.append(wall)
    room.background = arcade.load_texture(
        "images/Glacial-mountains-parallax-background_vnitti.png")

    return room
Ejemplo n.º 3
0
def volcano_pit():
    """
    Create and return Volcano Pit.
    """
    room = Room()
    """ Set up the game and initialize the variables. """
    # Sprite lists
    room.wall_list = arcade.SpriteList()

    # -- Set up the walls
    # Create bottom and top row of boxes
    # This y loops a list of two, the coordinate 0, and just under the top of window
    for y in (0, SCREEN_HEIGHT - WALL_SPRITE_SIZE):
        # Loop for each box going across
        for x in range(0, SCREEN_WIDTH, WALL_SPRITE_SIZE):
            wall = arcade.Sprite(
                "images/nature_tileset_without_gaps/_lava/lava1.png",
                WALL_SPRITE_SCALING)
            wall.left = x
            wall.bottom = y
            wall.tag = "firewall"
            room.wall_list.append(wall)

    # Create left and right column of boxes
    for x in (0, SCREEN_WIDTH - WALL_SPRITE_SIZE):
        # Loop for each box going across
        for y in range(WALL_SPRITE_SIZE, SCREEN_HEIGHT - WALL_SPRITE_SIZE,
                       WALL_SPRITE_SIZE):
            # Skip making a block 4 and 5 blocks up
            if (y != WALL_SPRITE_SIZE * 4
                    and y != WALL_SPRITE_SIZE * 5) or x != 0:
                wall = arcade.Sprite(
                    "images/nature_tileset_without_gaps/_lava/lava2.png",
                    WALL_SPRITE_SCALING)
                wall.left = x
                wall.bottom = y
                wall.tag = "firewall"
                room.wall_list.append(wall)

    wall = arcade.Sprite(
        "images/images/nature_tileset_without_gaps/_lava/lava2.png",
        WALL_SPRITE_SCALING)
    wall.left = 5 * WALL_SPRITE_SIZE
    wall.bottom = 6 * WALL_SPRITE_SIZE
    room.wall_list.append(wall)
    room.background = \
        arcade.load_texture("images/bgs/PNG/Full/Miscellaneous/volcanoes.png")

    return room
Ejemplo n.º 4
0
def treasury():
    """
    Create and return Treasury.
    """
    room = Room()
    """ Set up the game and initialize the variables. """
    # Sprite lists
    room.wall_list = arcade.SpriteList()

    # -- Set up the walls
    # Create bottom and top row of mirrors
    # This y loops a list of two, the coordinate 0, and just under the top of window
    for y in (0, SCREEN_HEIGHT - WALL_SPRITE_SIZE):
        # Loop for each mirror going across
        for x in range(0, SCREEN_WIDTH, WALL_SPRITE_SIZE):
            wall = arcade.Sprite("images/16x16/Item__71.png",
                                 WALL_SPRITE_SCALING)
            wall.left = x
            wall.bottom = y
            wall.tag = "trophy"
            wall.code = dec_to_bin(x)
            room.wall_list.append(wall)

    # Create left and right column of mirrors
    for x in (0, SCREEN_WIDTH - WALL_SPRITE_SIZE):
        # Loop for each mirror going across
        for y in range(WALL_SPRITE_SIZE, SCREEN_HEIGHT - WALL_SPRITE_SIZE,
                       WALL_SPRITE_SIZE):
            # Skip making a block 4 and 5 blocks up
            if (y != WALL_SPRITE_SIZE * 4
                    and y != WALL_SPRITE_SIZE * 5) or x != 0:
                wall = arcade.Sprite("images/16x16/Item__71.png",
                                     WALL_SPRITE_SCALING)
                wall.left = x
                wall.bottom = y
                wall.tag = "trophy"
                wall.code = bin_to_dec(x)
                room.wall_list.append(wall)

    wall = arcade.Sprite("images/16x16/Item__71.png", WALL_SPRITE_SCALING)
    wall.left = 9 * WALL_SPRITE_SIZE
    wall.bottom = 3 * WALL_SPRITE_SIZE
    room.wall_list.append(wall)
    room.background = arcade.load_texture(
        "images/bgs/PNG/Full/City/classic_city.png")

    return room
Ejemplo n.º 5
0
def intro():
    """
    Create and return instructions area.
    """
    room = Room()
    room.name = "Intro"
    """ Set up the game and initialize the variables. """

    if room.is_answered is True:
        room.key = arcade.Sprite("images/16x16/Item__69.png",
                                 WALL_SPRITE_SCALING)
        room.key.center_x = random.randrange(SCREEN_WIDTH)
        room.key.center_y = random.randrange(SCREEN_HEIGHT)
        room.key.draw()

    # Load the background image for this level.
    room.background = arcade.load_texture("images/classic1.png")

    room.wall_list = arcade.SpriteList()

    return room
Ejemplo n.º 6
0
def battle_room():
    """
    Create and return Battle Room!!!
    """
    room = Room()
    """ Set up the game and initialize the variables. """
    # Sprite lists
    room.wall_list = arcade.SpriteList()

    # enemy creation
    for i in range(STARTING_IMP_COUNT):
        enemy = arcade.Sprite("images/imp_idle.png")
        room.enemy_list.append(enemy)

    # -- Set up the walls
    # Create bottom and top row of boxes
    # This y loops a list of two, the coordinate 0, and just under the top of window
    for y in (0, SCREEN_HEIGHT - WALL_SPRITE_SIZE):
        # Loop for each box going across
        for x in range(0, SCREEN_WIDTH, WALL_SPRITE_SIZE):
            wall = arcade.Sprite(
                "images/nature_tileset_without_gaps/_rocky/rocky02.png",
                WALL_SPRITE_SCALING)
            wall.left = x
            wall.bottom = y
            wall.tag = "spike"
            room.wall_list.append(wall)

    # Create left and right column of boxes
    for x in (0, SCREEN_WIDTH - WALL_SPRITE_SIZE):
        # Loop for each box going across
        for y in range(WALL_SPRITE_SIZE, SCREEN_HEIGHT - WALL_SPRITE_SIZE,
                       WALL_SPRITE_SIZE):
            # Skip making a block 4 and 5 blocks up on the right side
            if (y != WALL_SPRITE_SIZE * 4
                    and y != WALL_SPRITE_SIZE * 5) or x == 0:
                wall = arcade.Sprite(
                    "images/nature_tileset_without_gaps/_rocky/rocky03.png",
                    WALL_SPRITE_SCALING)
                wall.left = x
                wall.bottom = y
                wall.tag = "spike"
                room.wall_list.append(wall)

    wall = arcade.Sprite(
        "images/nature_tileset_without_gaps/_rocky/rocky03.png",
        WALL_SPRITE_SCALING)
    wall.left = 7 * WALL_SPRITE_SIZE
    wall.bottom = 5 * WALL_SPRITE_SIZE
    room.wall_list.append(wall)

    room.problem = "Find the will to live!"

    if room.is_answered is True:
        room.key.draw()

    # Load the background image for this level.
    room.background = arcade.load_texture(
        "images/bgs/PNG/Full/Horror/horror1.png")

    return room
Ejemplo n.º 7
0
def battle_room():
    """
    Create and return Battle Room!!!
    """
    room = Room()
    room.name = "Battle"
    """ Set up the game and initialize the variables. """
    # Sprite lists
    room.wall_list = arcade.SpriteList()
    room.enemy_list = arcade.SpriteList()

    # -- Set up the walls
    # Create bottom and top row of boxes
    # This y loops a list of two, the coordinate 0, and just under the top of window
    for y in (0, SCREEN_HEIGHT - SPRITE_SIZE):
        # Loop for each box going across
        for x in range(0, SCREEN_WIDTH, SPRITE_SIZE):
            wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky02.png", SPRITE_SCALING)
            wall.left = x
            wall.bottom = y
            wall.tag = "spike"
            room.wall_list.append(wall)

    # Create left and right column of boxes
    for x in (0, SCREEN_WIDTH - WALL_SPRITE_SIZE):
        # Loop for each box going across
        for y in range(SPRITE_SIZE, SCREEN_HEIGHT - SPRITE_SIZE, SPRITE_SIZE):
            # Skip making a block 3 and 5 blocks up on the right side
            if (y != SPRITE_SIZE * 3 and y != SPRITE_SIZE * 5) or x == 0:
                wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky03.png", SPRITE_SCALING)
                wall.left = y
                wall.bottom = x
                wall.tag = "spike"
                room.wall_list.append(wall)

    wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky03.png", SPRITE_SCALING)
    wall.left = 3 * SPRITE_SIZE
    wall.bottom = 2 * SPRITE_SIZE
    room.wall_list.append(wall)
    wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky03.png", SPRITE_SCALING)
    wall.left = 9 * SPRITE_SIZE
    wall.bottom = 9 * SPRITE_SIZE
    room.wall_list.append(wall)
    wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky03.png", SPRITE_SCALING)
    wall.left = 5 * SPRITE_SIZE
    wall.bottom = 4 * SPRITE_SIZE
    room.wall_list.append(wall)
    wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky03.png", SPRITE_SCALING)
    wall.left = 6 * SPRITE_SIZE
    wall.bottom = 6 * SPRITE_SIZE
    room.wall_list.append(wall)

    room.problem = "Attack with [spacebar]!"

    if room.is_answered is True:
        room.key.draw()

    # Load the background image for this level.
    room.background = arcade.load_texture("images/bgs/PNG/Full/Horror/horror1.png")

    return room
Ejemplo n.º 8
0
def cliffs_area():
    """
    Create and return Cliffs Area.
    """
    room = Room()

    """ Set up the game and initialize the variables. """
    # Sprite lists
    room.wall_list = arcade.SpriteList()
    room.item_list = arcade.SpriteList()

    # # collect pies
    # # Set up the items
    # for i in range(10):
    #     # Create the item instance
    #     item = arcade.Sprite("images/16x16/Item__67.png", SPRITE_SCALING * 3)
    #
    #     # Position the item
    #     item.center_x = random.randrange(SCREEN_WIDTH - 150)
    #     item.center_y = random.randrange(SCREEN_HEIGHT - 150)
    #
    #     # Add the item to the lists
    #     room.item_list.append(item)

    # -- Set up the walls
    # Create bottom and top row of boxes
    # This y loops a list of two, the coordinate 0, and just under the top of window
    for y in (0, SCREEN_HEIGHT - SPRITE_SIZE):
        # Loop for each box going across
        for x in range(0, SCREEN_WIDTH, SPRITE_SIZE):
            wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky04.png", SPRITE_SCALING)
            wall.left = x
            wall.bottom = y
            room.wall_list.append(wall)

    # Create left and right column of boxes
    for x in (0, SCREEN_WIDTH - SPRITE_SIZE):
        # Loop for each box going across
        for y in range(SPRITE_SIZE, SCREEN_HEIGHT - SPRITE_SIZE, SPRITE_SIZE):
            # Skip making a block 4 and 5 blocks up on the right side
            if (y != SPRITE_SIZE * 4 and y != SPRITE_SIZE * 5) or x == 0:
                wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky04.png", SPRITE_SCALING)
                wall.left = x
                wall.bottom = y
                wall.tag = "cliff"
                room.wall_list.append(wall)

    wall = arcade.Sprite("images/nature_tileset_without_gaps/_rocky/rocky04.png", SPRITE_SCALING)
    wall.left = 7 * SPRITE_SIZE
    wall.bottom = 5 * SPRITE_SIZE
    room.wall_list.append(wall)

    room.problem = "Find the will to live!"

    if room.is_answered is True:
        room.key = arcade.Sprite("images/16x16/Item__69.png", WALL_SPRITE_SCALING)
        room.key.center_x = random.randrange(SCREEN_WIDTH)
        room.key.center_y = random.randrange(SCREEN_HEIGHT)
        room.key.draw()

    # Load the background image for this level.
    room.background = arcade.load_texture("images/bgs/PNG/Full/Horror/horror2_nomoon.png")

    return room