Example #1
0
def build_obj_map_2():
    # jump pits with rising fire balls
    array = []

    array = [
        ob.Block(x=start + 150, y=ground),
        ob.Block(x=start + 200, y=ground),
        ob.Block(x=start + 250, y=ground),
        ob.Block(x=start + 300, y=ground),
        ob.Block(x=start + 300, y=ground),
        ob.Glue(x=start + 350, y=ground - 2 * MAP_UNIT_Y),
        ob.Glue(x=start + 350, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 400, y=ground),
        ob.Block(x=start + 400, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 400, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=start + 450, y=ground),
        ob.Block(x=start + 450, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 450, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=start + 450, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=start + 800, y=ground),
        ob.Block(x=start + 800, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 800, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=start + 800, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=start + 850, y=ground),
        ob.Block(x=start + start + 850, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 850, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=start + 850, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=start + 900, y=ground),
        ob.Block(x=start + 900, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 900, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=start + 900, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=start + 950, y=ground),
        ob.Block(x=start + 950, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 950, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=start + 950, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=start + 1300, y=ground - 10),
        ob.Block(x=start + 1350, y=ground - 10),
        ob.Block(x=start + 1700, y=ground - 10),
        ob.Block(x=start + 1750, y=ground - 10),
        ob.Block(x=start + 1800, y=ground - 10),
        ob.Block(x=start + 1850, y=ground - 10),
        # floor
        ob.Floor(x=0, y=ground, sizex=500 + 40 * MAP_UNIT_X, sizey=20),
        # ob.Floor(x= 800, y=ground, sizex=8*MAP_UNIT_Y, sizey=20),
        # ob.Floor(x= 1300, y=ground, sizex=4*MAP_UNIT_Y, sizey=20),
        ob.Floor(x=start + 1900, y=ground, sizex=1000, sizey=20),
        # pit flame 1
        ob.Flame(x=start + 500, y=ground),
        ob.Flame(x=start + 550, y=ground),
        ob.Flame(x=start + 600, y=ground),
        ob.Flame(x=start + 650, y=ground),
        ob.Flame(x=start + 700, y=ground),
        ob.Flame(x=start + 750, y=ground),
        # pit flame 2
        ob.Flame(x=start + 1000, y=ground),
        ob.Flame(x=start + 1050, y=ground),
        ob.Flame(x=start + 1100, y=ground),
        ob.Flame(x=start + 1150, y=ground),
        ob.Flame(x=start + 1200, y=ground),
        ob.Flame(x=start + 1250, y=ground),
        # pit flame 3
        ob.Flame(x=start + 1400, y=ground),
        ob.Flame(x=start + 1450, y=ground),

        # moving flame
        ob.Flame_UFO(x=start + 625, y=ground - 14 * MAP_UNIT_Y),
        ob.Flame_UFO(x=start + 1125, y=ground - 14 * MAP_UNIT_Y),
        ob.Flame_UFO(x=start + 1525, y=ground - 14 * MAP_UNIT_Y),
        ob.Flame_UFO(x=start + 1625, y=ground, speed_y=-0.32 * MAP_UNIT_Y),
        # low ceiling
        ob.Floor(x=start + 2000, y=ground - 90, sizex=8 * MAP_UNIT_Y,
                 sizey=20),
        # vertical tunnel
        ob.Floor(x=start + 2200, y=0, sizex=20, sizey=400),
        ob.Flame_Move(x=start + 2200, y=ground - 40, speed_y=9),
        ob.Flame_Move(x=start + 2300, y=ground - 2 * MAP_UNIT_Y, speed_y=9),
        ob.Flame_Move(x=start + 2400, y=ground - 2 * MAP_UNIT_Y, speed_y=9)
    ]

    return array
Example #2
0
def build_obj_map():
    array = []

    array = [
        ob.Block(x=start + 4 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 8 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 12 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        # ob.Flame(x=start-500, y=ground -50),
        # ob.Flame(x=start + 600, y=ground, size=100),
        # ob.Flame(x=start + 800, y=ground),
        ob.Block(x=start + 36 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Flame(x=start + 40 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=start + 48 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Flame(x=start + 56 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Flame(x=start + 64 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 10 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 14 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 18 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 22 * MAP_UNIT_X,
                 y=ground,
                 sizex=4 * MAP_UNIT_Y,
                 sizey=100),
        ob.Block(x=start + 0.8 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 3.2 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 22.8 * MAP_UNIT_X,
                 y=ground - 2 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 22.8 * MAP_UNIT_X,
                 y=ground - 2 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 22.8 * MAP_UNIT_X,
                 y=ground - 4 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 22.8 * MAP_UNIT_X,
                 y=ground - 6 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 22.8 * MAP_UNIT_X,
                 y=ground - 8 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 18 * MAP_UNIT_X, y=0, sizex=30),
        ob.Block(x=start + 18 * MAP_UNIT_X, y=2 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 18 * MAP_UNIT_X, y=4 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 18 * MAP_UNIT_X, y=6 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 12 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 12 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        # ob.Flame(x=start + 500, y=ground - 2*MAP_UNIT_Y),
        # ob.Flame(x=start + 600, y=ground, size=100),
        # ob.Flame(x=start + 800, y=ground),
        ob.Block(x=start + 36 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Flame(x=start + 44 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=start + 52 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Flame(x=start + 31.2 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Flame(x=start + 28 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 14 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 18 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 22 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 26 * MAP_UNIT_X,
                 y=ground,
                 sizex=4 * MAP_UNIT_Y,
                 sizey=100),
        ob.Block(x=start + 0.8 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 3.2 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 12 * MAP_UNIT_X,
                 y=ground - 2 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 12 * MAP_UNIT_X,
                 y=ground - 2 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 12 * MAP_UNIT_X,
                 y=ground - 4 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 12 * MAP_UNIT_X,
                 y=ground - 6 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 12 * MAP_UNIT_X,
                 y=ground - 8 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 6 * MAP_UNIT_X, y=0, sizex=30),
        ob.Block(x=start + 6 * MAP_UNIT_X, y=2 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 6 * MAP_UNIT_X, y=4 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 6 * MAP_UNIT_X, y=6 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 12 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 16 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        # ob.Flame(x=start + 500, y=ground - 2*MAP_UNIT_Y),
        # ob.Flame(x=start + 600, y=ground, size=100),
        # ob.Flame(x=start + 800, y=ground),
        ob.Block(x=start + 40 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Flame(x=start + 44 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=start + 52 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Flame(x=start + 60 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Flame(x=start + 68 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 94 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 98 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 102 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 106 * MAP_UNIT_X,
                 y=ground,
                 sizex=4 * MAP_UNIT_Y,
                 sizey=100),
        ob.Block(x=start + 84.4 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 108.4 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 72 * MAP_UNIT_X,
                 y=ground - 2 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 72 * MAP_UNIT_X,
                 y=ground - 2 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 72 * MAP_UNIT_X,
                 y=ground - 4 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 72 * MAP_UNIT_X,
                 y=ground - 6 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 72 * MAP_UNIT_X,
                 y=ground - 8 * MAP_UNIT_Y,
                 sizex=30),
        ob.Block(x=start + 70 * MAP_UNIT_X, y=0, sizex=30),
        ob.Block(x=start + 70 * MAP_UNIT_X, y=2 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 70 * MAP_UNIT_X, y=4 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 70 * MAP_UNIT_X, y=6 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 52 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 56 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        # ob.Flame(x=start + 500, y=ground - 2*MAP_UNIT_Y),
        # ob.Flame(x=start + 600, y=ground, size=100),
        # ob.Flame(x=start + 800, y=ground),
        ob.Block(x=start + 52, y=ground - 2 * MAP_UNIT_Y),
        ob.Flame(x=start + 44, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=start + 52, y=ground - 220),
        ob.Flame(x=start + 1780, y=ground - 2 * MAP_UNIT_Y),
        ob.Flame(x=start + 1700, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 1350, y=ground - 130),
        ob.Block(x=start + 1650, y=ground - 120),
        ob.Block(x=start + 850, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 950, y=ground, sizex=4 * MAP_UNIT_Y, sizey=100),
        ob.Block(x=start + 920, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 980, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=start + 1300, y=ground - 2 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 1300, y=ground - 2 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 1300, y=ground - 4 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 1300, y=ground - 6 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 1300, y=ground - 8 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 1150, y=0, sizex=30),
        ob.Block(x=start + 1150, y=2 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 1150, y=4 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 1150, y=6 * MAP_UNIT_Y, sizex=30),
        ob.Block(x=start + 850,
                 y=ground - 8 * MAP_UNIT_Y,
                 sizex=8 * MAP_UNIT_Y,
                 sizey=20),
        ob.Floor(x=100, y=ground, sizex=4000, sizey=20),
        ob.Floor(x=100, y=-20, sizex=4000, sizey=20),
        ob.Glue(x=start - 2 * MAP_UNIT_Y, y=ground - 2 * MAP_UNIT_Y),
        ob.Glue(x=start - 450, y=ground - 2 * MAP_UNIT_Y),
        ob.Glue(x=start - 100, y=ground - 4 * MAP_UNIT_Y),
        ob.Glue(x=start - 100, y=ground - 6 * MAP_UNIT_Y)
    ]

    return array