Skip to content

Commit

Permalink
New map : map 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Donot committed Nov 28, 2023
1 parent 60b00ba commit 0a26aae
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
Binary file added images/map_thumbnail/map4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from gameManager import *
from game import *

GameManager()
54 changes: 54 additions & 0 deletions map.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def generate_map(id):
return map2()
elif id == 3:
return map3()
elif id == 4:
return map4()
else:
return no_map()

Expand Down Expand Up @@ -97,4 +99,56 @@ def map3():
blocks.append(Block(SCREEN_WIDTH - (SCREEN_WIDTH/16 - SCREEN_WIDTH/80) - SCREEN_WIDTH/20, SCREEN_HEIGHT/10, SCREEN_WIDTH/20, SCREEN_HEIGHT/30, Color.YELLOW.value, type="win"))


return blocks


def map4():
blocks=[]

blocks.append(Block(SCREEN_WIDTH/16 - SCREEN_WIDTH/80, SCREEN_HEIGHT-SCREEN_HEIGHT/15, SCREEN_WIDTH/20, SCREEN_HEIGHT/30, Color.LIGHT_GREY.value, type="spawn")) #spawn point
blocks.append(Block(0, SCREEN_HEIGHT-SCREEN_HEIGHT/30, SCREEN_WIDTH, SCREEN_HEIGHT/30, Color.RED.value, type="lava")) #ground
blocks.append(Block(SCREEN_WIDTH - SCREEN_WIDTH/10, SCREEN_HEIGHT*2/15, SCREEN_WIDTH/10, SCREEN_HEIGHT*13/15,Color.RED.value, type="lava"))

#verticals
blocks.append(Block(SCREEN_WIDTH/4, SCREEN_HEIGHT/8, SCREEN_WIDTH/40, SCREEN_HEIGHT*7/8 - SCREEN_HEIGHT/30,Color.BLUE.value))
blocks.append(Block(SCREEN_WIDTH/2, 0, SCREEN_WIDTH/40, SCREEN_HEIGHT*7/8 - SCREEN_HEIGHT/30,Color.BLUE.value))

#jump 1st part
blocks.append(Block(SCREEN_WIDTH/4 - SCREEN_WIDTH * 3/32, SCREEN_HEIGHT*3/4 + SCREEN_HEIGHT/30, SCREEN_WIDTH/16, SCREEN_HEIGHT/30, Color.BURGUNDY.value, type="jump"))
blocks.append(Block(PLAYER_WIDTH*2, SCREEN_HEIGHT*3/8 + SCREEN_HEIGHT/20 + SCREEN_HEIGHT/30, SCREEN_WIDTH/16, SCREEN_HEIGHT/30, Color.BURGUNDY.value, type="jump"))

#lava in air
length_between_vertical = SCREEN_WIDTH/4 - SCREEN_WIDTH/40
#1st floor
blocks.append(Block(SCREEN_WIDTH/4 + SCREEN_WIDTH/40, SCREEN_HEIGHT/4, length_between_vertical/4, SCREEN_HEIGHT/30,Color.RED.value, type="lava"))
blocks.append(Block(SCREEN_WIDTH/4 + SCREEN_WIDTH/40 + length_between_vertical/2, SCREEN_HEIGHT/4, length_between_vertical/2, SCREEN_HEIGHT/30,Color.RED.value, type="lava"))
#interfloor
blocks.append(Block(SCREEN_WIDTH/4 + SCREEN_WIDTH/40 + length_between_vertical/4, SCREEN_HEIGHT*3/8, length_between_vertical/4, SCREEN_HEIGHT/30,Color.BLUE.value))
#2nd floor
blocks.append(Block(SCREEN_WIDTH/4 + SCREEN_WIDTH/40, SCREEN_HEIGHT/2, length_between_vertical*3/5, SCREEN_HEIGHT/30,Color.RED.value, type="lava"))
blocks.append(Block(SCREEN_WIDTH/4 + SCREEN_WIDTH/40 + length_between_vertical*4/5, SCREEN_HEIGHT/2, length_between_vertical/5, SCREEN_HEIGHT/30,Color.RED.value, type="lava"))
#interfloor
blocks.append(Block(SCREEN_WIDTH/4 + SCREEN_WIDTH/40 + length_between_vertical*3/5, SCREEN_HEIGHT*5/8, length_between_vertical/5, SCREEN_HEIGHT/30,Color.BLUE.value))
#3rd floor
blocks.append(Block(SCREEN_WIDTH/4 + SCREEN_WIDTH/40, SCREEN_HEIGHT*3/4, length_between_vertical*1/6, SCREEN_HEIGHT/30,Color.RED.value, type="lava"))
blocks.append(Block(SCREEN_WIDTH/4 + SCREEN_WIDTH/40 + length_between_vertical*2/6, SCREEN_HEIGHT*3/4, length_between_vertical*4/6, SCREEN_HEIGHT/30,Color.RED.value, type="lava"))
#interfloor
blocks.append(Block(SCREEN_WIDTH/4 + SCREEN_WIDTH/40 + length_between_vertical*1/6, SCREEN_HEIGHT*7/8, length_between_vertical/6, SCREEN_HEIGHT/30,Color.BLUE.value))

blocks.append(Block(SCREEN_WIDTH/4 + SCREEN_WIDTH/40 + length_between_vertical*3/5, SCREEN_HEIGHT*28/30, length_between_vertical/5, SCREEN_HEIGHT/60,Color.BLUE.value))

blocks.append(Block(SCREEN_WIDTH/4 + SCREEN_WIDTH/40 + length_between_vertical, SCREEN_HEIGHT*57/60, length_between_vertical/5, SCREEN_HEIGHT/60,Color.BLUE.value))

blocks.append(Block(SCREEN_WIDTH*3/4, SCREEN_HEIGHT*57/60, length_between_vertical/5, SCREEN_HEIGHT/60,Color.BLUE.value))

blocks.append(Block(SCREEN_WIDTH*9/10 - length_between_vertical/10, SCREEN_HEIGHT*47/60, length_between_vertical/10, SCREEN_HEIGHT/60,Color.BURGUNDY.value, type="jump"))

blocks.append(Block(SCREEN_WIDTH*5/8 - length_between_vertical/10, SCREEN_HEIGHT*5/8, length_between_vertical/10, SCREEN_HEIGHT/60,Color.BURGUNDY.value, type="jump"))

blocks.append(Block(SCREEN_WIDTH*9/10- length_between_vertical/10, SCREEN_HEIGHT*3/8, length_between_vertical/10, SCREEN_HEIGHT/60,Color.BURGUNDY.value, type="jump"))



blocks.append(Block(SCREEN_WIDTH - (SCREEN_WIDTH/16 - SCREEN_WIDTH/80) - SCREEN_WIDTH/20, SCREEN_HEIGHT/10, SCREEN_WIDTH/20, SCREEN_HEIGHT/30, Color.YELLOW.value, type="win"))

return blocks

0 comments on commit 0a26aae

Please sign in to comment.