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
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
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
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