Example #1
0
def build_obj_map_level_5():  #level 5

    array = []

    array = [  #starting stairs
        ob.Floor(x=MAP_UNIT_X * 2,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 22,
                 sizey=MAP_UNIT_X * 2),
        ob.Floor(x=MAP_UNIT_X * 16,
                 y=ground - MAP_UNIT_Y * 4,
                 sizex=MAP_UNIT_X * 8,
                 sizey=MAP_UNIT_X * 2),
        ob.Floor(x=MAP_UNIT_X * 20,
                 y=ground - MAP_UNIT_Y * 6,
                 sizex=MAP_UNIT_X * 4,
                 sizey=MAP_UNIT_X * 2),
        #first pit / 1x vertical flame
        ob.Flame_UFO(x=MAP_UNIT_X * 28,
                     y=ground - MAP_UNIT_Y * 14,
                     speed_y=0.32 * MAP_UNIT_Y),
        #Next platform
        ob.Floor(x=MAP_UNIT_X * 34,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 6,
                 sizey=MAP_UNIT_X * 6),
        #second pit / 1x vertical flame
        ob.Flame_UFO(x=MAP_UNIT_X * 44,
                     y=ground - MAP_UNIT_Y * 14,
                     speed_y=0.32 * MAP_UNIT_Y),
        #Next platform
        ob.Floor(x=MAP_UNIT_X * 50,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 4,
                 sizey=MAP_UNIT_X * 2),
        #third pit / 2x vertical flame
        ob.Flame_UFO(x=MAP_UNIT_X * 57,
                     y=ground - MAP_UNIT_Y * 14,
                     speed_y=0.32 * MAP_UNIT_Y),
        ob.Flame_UFO(x=MAP_UNIT_X * 61, y=ground, speed_y=-0.32 * MAP_UNIT_Y),
        #Floor
        ob.Floor(x=MAP_UNIT_X * 66,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 150,
                 sizey=MAP_UNIT_X * 2),
        #horzontal tunnel
        ob.Floor(x=MAP_UNIT_X * 70,
                 y=0,
                 sizex=MAP_UNIT_X * 8,
                 sizey=576 - MAP_UNIT_X * 5),
        ob.Floor(x=MAP_UNIT_X * 78,
                 y=0,
                 sizex=MAP_UNIT_X * 4,
                 sizey=576 - MAP_UNIT_X * 10),
        ob.Floor(x=MAP_UNIT_X * 82,
                 y=0,
                 sizex=MAP_UNIT_X * 6,
                 sizey=576 - MAP_UNIT_X * 5),
        ob.Floor(x=MAP_UNIT_X * 88,
                 y=0,
                 sizex=MAP_UNIT_X * 4,
                 sizey=576 - MAP_UNIT_X * 10),
        ob.Floor(x=MAP_UNIT_X * 92,
                 y=0,
                 sizex=MAP_UNIT_X * 6,
                 sizey=576 - MAP_UNIT_X * 5),
        #flames
        ob.Flame_Move(x=MAP_UNIT_X * 88,
                      y=ground - MAP_UNIT_Y * 4,
                      speed_x=0.2 * MAP_UNIT_X),
        ob.Flame_Move(x=MAP_UNIT_X * 96,
                      y=ground - MAP_UNIT_Y * 4,
                      speed_x=-0.2 * MAP_UNIT_X),
        #blocks
        ob.Block(x=MAP_UNIT_X * 2,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 4,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 6,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 8,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 10,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 12,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 14,
                 y=ground - MAP_UNIT_Y * 4,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 16,
                 y=ground - MAP_UNIT_Y * 4,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 18,
                 y=ground - MAP_UNIT_Y * 6,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 20,
                 y=ground - MAP_UNIT_Y * 6,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 22,
                 y=ground - MAP_UNIT_Y * 6,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 34,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 36,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 38,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 50,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 52,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 2),
        ob.Block(x=MAP_UNIT_X * 66,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_X * 50),
    ]
    return array
Example #2
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 #3
0
def build_obj_map_level_2():  #level 2

    array = []

    array = [
        ob.Floor(x=MAP_UNIT_X * 2,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 32),
        ob.Floor(x=MAP_UNIT_X * 24,
                 y=ground - MAP_UNIT_Y * 4,
                 sizex=MAP_UNIT_X * 2),
        ob.Floor(x=MAP_UNIT_X * 26,
                 y=ground - MAP_UNIT_Y * 6,
                 sizex=MAP_UNIT_X * 4,
                 sizey=MAP_UNIT_Y * 4),
        ob.Floor(x=MAP_UNIT_X * 28,
                 y=ground - MAP_UNIT_Y * 8,
                 sizex=MAP_UNIT_X * 6,
                 sizey=MAP_UNIT_Y * 6),
        ob.Block_Move(x=MAP_UNIT_X * 48, y=ground - MAP_UNIT_Y * 8),
        ob.Block_Move(x=MAP_UNIT_X * 52, y=ground - MAP_UNIT_Y * 12),
        ob.Floor(x=MAP_UNIT_X * 56,
                 y=ground - MAP_UNIT_Y * 16,
                 sizex=MAP_UNIT_X * 12,
                 sizey=MAP_UNIT_Y * 16),
        ob.Floor(x=MAP_UNIT_X * 72,
                 y=ground - MAP_UNIT_Y * 26,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_Y * 20),
        ob.Floor(x=MAP_UNIT_X * 68,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 12,
                 sizey=MAP_UNIT_Y * 16),
        ob.Floor(x=MAP_UNIT_X * 78,
                 y=ground - MAP_UNIT_Y * 16,
                 sizex=MAP_UNIT_X * 12,
                 sizey=MAP_UNIT_Y * 16),
        ob.Block_Fall(x=MAP_UNIT_X * 90, y=ground - MAP_UNIT_Y * 16),
        ob.Block_Fall(x=MAP_UNIT_X * 92, y=ground - MAP_UNIT_Y * 16),
        ob.Floor(x=MAP_UNIT_X * 94,
                 y=ground - MAP_UNIT_Y * 24,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_Y * 10),
        ob.Floor(x=MAP_UNIT_X * 100,
                 y=ground - MAP_UNIT_Y * 6,
                 sizex=MAP_UNIT_X * 20,
                 sizey=MAP_UNIT_Y * 16),
        ob.Block_Move(x=MAP_UNIT_X * 124, y=ground - MAP_UNIT_Y * 12),
        ob.Block_Move(x=MAP_UNIT_X * 130, y=ground - MAP_UNIT_Y * 16),
        ob.Block_Move(x=MAP_UNIT_X * 124, y=ground - MAP_UNIT_Y * 18),
        ob.Floor(x=MAP_UNIT_X * 126,
                 y=ground - MAP_UNIT_Y * 6,
                 sizex=MAP_UNIT_X * 20,
                 sizey=MAP_UNIT_Y * 12),

        #graphic objects
        ob.Block(x=MAP_UNIT_X * 2, y=ground - MAP_UNIT_Y * 2),
        ob.Block(x=MAP_UNIT_X * 4, y=ground - MAP_UNIT_Y * 2),
        ob.Block(x=MAP_UNIT_X * 6, y=ground - MAP_UNIT_Y * 2),
        ob.Block(x=MAP_UNIT_X * 8, y=ground - MAP_UNIT_Y * 2),
        ob.Block(x=MAP_UNIT_X * 10, y=ground - MAP_UNIT_Y * 2),
        ob.Block(x=MAP_UNIT_X * 12, y=ground - MAP_UNIT_Y * 2),
        ob.Block(x=MAP_UNIT_X * 14, y=ground - MAP_UNIT_Y * 2),
        ob.Block(x=MAP_UNIT_X * 16, y=ground - MAP_UNIT_Y * 2),
        ob.Coin(x=16 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=MAP_UNIT_X * 18, y=ground - MAP_UNIT_Y * 2),
        ob.Block(x=MAP_UNIT_X * 20, y=ground - MAP_UNIT_Y * 2),
        ob.Block(x=MAP_UNIT_X * 22, y=ground - MAP_UNIT_Y * 2),
        ob.Block(x=MAP_UNIT_X * 30, y=ground - MAP_UNIT_Y * 8),
        ob.Block(x=MAP_UNIT_X * 32, y=ground - MAP_UNIT_Y * 8),
        ob.Block_Corner(x=MAP_UNIT_X * 24, y=ground - MAP_UNIT_Y * 4),
        ob.Block_Corner(x=MAP_UNIT_X * 26, y=ground - MAP_UNIT_Y * 6),
        ob.Block_Corner(x=MAP_UNIT_X * 28, y=ground - MAP_UNIT_Y * 8),
        ob.Block_Corner2(x=MAP_UNIT_X * 24, y=ground - MAP_UNIT_Y * 2),
        ob.Block_Corner2(x=MAP_UNIT_X * 26, y=ground - MAP_UNIT_Y * 4),
        ob.Block_Corner2(x=MAP_UNIT_X * 28, y=ground - MAP_UNIT_Y * 6),
        ob.Block_Corner(x=MAP_UNIT_X * 56, y=ground - MAP_UNIT_Y * 16),
        ob.Block_Corner2(x=MAP_UNIT_X * 56, y=ground - MAP_UNIT_Y * 14),
        ob.Block_Corner3(x=MAP_UNIT_X * 32, y=ground - MAP_UNIT_Y * 8),
        ob.Block_Corner4(x=MAP_UNIT_X * 32, y=ground - MAP_UNIT_Y * 6),
        ob.Block(x=MAP_UNIT_X * 58, y=ground - MAP_UNIT_Y * 16),
        ob.Block(x=MAP_UNIT_X * 60, y=ground - MAP_UNIT_Y * 16),
        ob.Block(x=MAP_UNIT_X * 62, y=ground - MAP_UNIT_Y * 16),
        ob.Block(x=MAP_UNIT_X * 64, y=ground - MAP_UNIT_Y * 16),
        ob.Block_Corner3(x=MAP_UNIT_X * 66, y=ground - MAP_UNIT_Y * 16),
        ob.Block_Corner4(x=MAP_UNIT_X * 66, y=ground - MAP_UNIT_Y * 14),
        ob.Block(x=MAP_UNIT_X * 68, y=ground - MAP_UNIT_Y * 2),
        ob.Block(x=MAP_UNIT_X * 70, y=ground - MAP_UNIT_Y * 2),
        ob.Block(x=MAP_UNIT_X * 72, y=ground - MAP_UNIT_Y * 2),
        ob.Block(x=MAP_UNIT_X * 74, y=ground - MAP_UNIT_Y * 2),
        ob.Coin(x=74 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=MAP_UNIT_X * 76, y=ground - MAP_UNIT_Y * 2),
        ob.Block_Corner(x=MAP_UNIT_X * 78, y=ground - MAP_UNIT_Y * 16),
        ob.Block_Corner2(x=MAP_UNIT_X * 78, y=ground - MAP_UNIT_Y * 14),
        ob.Block(x=MAP_UNIT_X * 80, y=ground - MAP_UNIT_Y * 16),
        ob.Block(x=MAP_UNIT_X * 82, y=ground - MAP_UNIT_Y * 16),
        ob.Block(x=MAP_UNIT_X * 84, y=ground - MAP_UNIT_Y * 16),
        ob.Block(x=MAP_UNIT_X * 86, y=ground - MAP_UNIT_Y * 16),
        ob.Block_Corner3(x=MAP_UNIT_X * 88, y=ground - MAP_UNIT_Y * 16),
        ob.Block_Corner4(x=MAP_UNIT_X * 88, y=ground - MAP_UNIT_Y * 14),
        ob.Coin(x=88 * MAP_UNIT_X, y=ground - 18 * MAP_UNIT_Y),
        ob.Block_Corner(x=MAP_UNIT_X * 100, y=ground - MAP_UNIT_Y * 6),
        ob.Block_Corner2(x=MAP_UNIT_X * 100, y=ground - MAP_UNIT_Y * 4),
        ob.Block(x=MAP_UNIT_X * 102, y=ground - MAP_UNIT_Y * 6),
        ob.Block(x=MAP_UNIT_X * 104, y=ground - MAP_UNIT_Y * 6),
        ob.Block(x=MAP_UNIT_X * 106, y=ground - MAP_UNIT_Y * 6),
        ob.Block(x=MAP_UNIT_X * 108, y=ground - MAP_UNIT_Y * 6),
        ob.Block(x=MAP_UNIT_X * 110, y=ground - MAP_UNIT_Y * 6),
        ob.Block(x=MAP_UNIT_X * 112, y=ground - MAP_UNIT_Y * 6),
        ob.Block(x=MAP_UNIT_X * 114, y=ground - MAP_UNIT_Y * 6),
        ob.Block(x=MAP_UNIT_X * 116, y=ground - MAP_UNIT_Y * 6),
        ob.Block_Corner3(x=MAP_UNIT_X * 118, y=ground - MAP_UNIT_Y * 6),
        ob.Block_Corner4(x=MAP_UNIT_X * 118, y=ground - MAP_UNIT_Y * 4),
        ob.Block_Point(x=MAP_UNIT_X * 72, y=ground - MAP_UNIT_Y * 6),
        ob.Coin(x=72 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block_Point(x=MAP_UNIT_X * 94, y=ground - MAP_UNIT_Y * 14),
    ]

    return array
Example #4
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
Example #5
0
def build_obj_map_tutorial():
    array = []

    array = [
        ob.UFO_Steal(x=10 * MAP_UNIT_X,
                     y=ground - 16 * MAP_UNIT_Y,
                     sizex=MAP_UNIT_X * 8,
                     sizey=MAP_UNIT_Y * 8),
        ob.Text_Graphic_1(x=6 * MAP_UNIT_X,
                          y=ground - 16 * MAP_UNIT_Y,
                          sizex=MAP_UNIT_X * 4,
                          sizey=MAP_UNIT_Y * 4),
        ob.Text_Graphic_2(x=2 * MAP_UNIT_X,
                          y=ground - 8 * MAP_UNIT_Y,
                          sizex=MAP_UNIT_X * 4,
                          sizey=MAP_UNIT_Y * 4),
        ob.Text_Graphic_3(x=30 * MAP_UNIT_X,
                          y=ground - 16 * MAP_UNIT_Y,
                          sizex=MAP_UNIT_X * 4,
                          sizey=MAP_UNIT_Y * 4),
        ob.Coin(x=6 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=2 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=4 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=6 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=8 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=10 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=12 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=14 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=16 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=18 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=20 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=22 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=24 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=26 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=28 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=30 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=32 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=34 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=36 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=38 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Coin(x=38 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=40 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=42 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        # stairs
        ob.Block(x=44 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=46 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=46 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        # flat floor
        ob.Block(x=48 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=48 * MAP_UNIT_X, y=ground - 2 * MAP_UNIT_Y),
        ob.Block(x=50 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=50 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=52 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=52 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=54 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=54 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=56 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=56 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=58 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=58 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Coin(x=58 * MAP_UNIT_X, y=ground - 8 * MAP_UNIT_Y),
        # pitfall
        #ob.Block(x=62 * MAP_UNIT_X, y=14 * MAP_UNIT_Y, sizey=4 * MAP_UNIT_Y),
        #ob.Block(x=62 * MAP_UNIT_X, y=10 * MAP_UNIT_Y, sizey=4 * MAP_UNIT_Y),
        #ob.Block(x=62 * MAP_UNIT_X, y=6 * MAP_UNIT_Y, sizey=4 * MAP_UNIT_Y),
        #ob.Block(x=62 * MAP_UNIT_X, y=4, sizey=4 * MAP_UNIT_Y),
        ob.Block(x=66 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=66 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=68 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=68 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=70 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=70 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        # flat floor v2
        ob.Block(x=72 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=72 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=74 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=74 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=76 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=76 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=78 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=78 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=80 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=80 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=82 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=82 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=84 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=84 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        # Moving block gap
        ob.Block_Move(x=94 * MAP_UNIT_X, y=ground - 8 * MAP_UNIT_Y),
        ob.Block(x=100 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=100 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=102 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=104 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        # flat floor v3
        ob.Block(x=106 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=106 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=108 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=108 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=110 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=110 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=112 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=112 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=114 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=114 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=116 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=116 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        # falling block section
        ob.Block_Fall(x=118 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block_Fall(x=120 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block_Fall(x=122 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block_Fall(x=124 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Coin(x=124 * MAP_UNIT_X, y=ground - 8 * MAP_UNIT_Y),
        ob.Block_Fall(x=126 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block_Fall(x=128 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        # flat floor v4
        ob.Block(x=130 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=130 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=132 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=132 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=134 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=134 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=136 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=136 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=138 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=138 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=140 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=140 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=142 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=142 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=144 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=144 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),
        ob.Block(x=146 * MAP_UNIT_X, y=ground - 4 * MAP_UNIT_Y),
        ob.Block(x=146 * MAP_UNIT_X, y=ground - 6 * MAP_UNIT_Y),

        # level floors
        ob.Floor(x=0,
                 y=ground,
                 sizex=86 * MAP_UNIT_X,
                 sizey=int(0.8 * MAP_UNIT_Y)),
        ob.Floor(x=104 * MAP_UNIT_X,
                 y=ground,
                 sizex=14 * MAP_UNIT_X,
                 sizey=int(0.8 * MAP_UNIT_Y)),
        ob.Floor(x=130 * MAP_UNIT_X,
                 y=ground,
                 sizex=80 * MAP_UNIT_X,
                 sizey=int(0.8 * MAP_UNIT_Y)),
        ob.Floor(x=MAP_UNIT_X * 44,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 116,
                 sizey=MAP_UNIT_Y * 2),
        ob.Floor(x=MAP_UNIT_X * 46,
                 y=ground - MAP_UNIT_Y * 4,
                 sizex=MAP_UNIT_X * 14,
                 sizey=MAP_UNIT_Y * 4),
        ob.Floor(x=MAP_UNIT_X * 32,
                 y=ground - MAP_UNIT_Y * 2,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_Y * 2),
        ob.Floor(x=MAP_UNIT_X * 66,
                 y=ground - MAP_UNIT_Y * 4,
                 sizex=MAP_UNIT_X * 20,
                 sizey=MAP_UNIT_Y * 4),
        ob.Floor(x=MAP_UNIT_X * 62,
                 y=ground - MAP_UNIT_Y * 26,
                 sizex=MAP_UNIT_X * 2,
                 sizey=MAP_UNIT_Y * 22),
        ob.Floor(x=MAP_UNIT_X * 100,
                 y=ground - MAP_UNIT_Y * 4,
                 sizex=MAP_UNIT_X * 18,
                 sizey=MAP_UNIT_Y * 14),
        ob.Floor(x=MAP_UNIT_X * 130,
                 y=ground - MAP_UNIT_Y * 4,
                 sizex=MAP_UNIT_X * 18,
                 sizey=MAP_UNIT_Y * 14),
    ]

    return array