relocated image files
changed room generation Signed-off-by: SpagettiFisch <63868515+SpagettiFisch@users.noreply.github.com>
|
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
13
main.py
|
|
@ -14,6 +14,7 @@ def setUp(config):
|
||||||
else:
|
else:
|
||||||
screen = pygame.display.set_mode(config["res"])
|
screen = pygame.display.set_mode(config["res"])
|
||||||
clock = pygame.time.Clock()
|
clock = pygame.time.Clock()
|
||||||
|
pygame.display.set_caption('Between The Pages')
|
||||||
return screen, clock, True, True, "start.png", []
|
return screen, clock, True, True, "start.png", []
|
||||||
|
|
||||||
def readConfig():
|
def readConfig():
|
||||||
|
|
@ -30,13 +31,15 @@ def genRooms(WIDTH, HEIGHT, type:str, objects:list):
|
||||||
room_objects = []
|
room_objects = []
|
||||||
#room_objects = [Obstacle('dirt', 'boulder', 'art/images/dirt2.png', False, 32, 32, WIDTH=WIDTH - 64, HEIGHT=HEIGHT - 64)]
|
#room_objects = [Obstacle('dirt', 'boulder', 'art/images/dirt2.png', False, 32, 32, WIDTH=WIDTH - 64, HEIGHT=HEIGHT - 64)]
|
||||||
room_objects.append(Obstacle('river', 'water', 'art/images/river.png', True, random.randint(32, round(WIDTH * 0.75)), 32, WIDTH=96, HEIGHT=round(HEIGHT * 0.66)))
|
room_objects.append(Obstacle('river', 'water', 'art/images/river.png', True, random.randint(32, round(WIDTH * 0.75)), 32, WIDTH=96, HEIGHT=round(HEIGHT * 0.66)))
|
||||||
|
room_backgrounds = [f'art/images/background/{type}{i}.png' for i in range(1)]
|
||||||
|
print(objects)
|
||||||
rooms = [
|
rooms = [
|
||||||
Room(type, 'normal', f'art/images/{type}.png', [objects[0], objects[1], objects[2], [room_objects[random.randint(0, len(room_objects) - 1)] for i in range(0, random.randint(0, 1))]], WIDTH - 64, HEIGHT - 64, [True, True, True, False], 0),
|
Room(type, 'normal', room_backgrounds[random.randint(0, 0)], [objects[0], objects[1], objects[2], [room_objects[random.randint(0, 0)] for i in range(0, random.randint(0, 1))]], WIDTH - 64, HEIGHT - 64, [True, True, True, True], j)
|
||||||
Room(type, 'normal', f'art/images/{type}.png', [objects[0], objects[1], objects[2], [room_objects[random.randint(0, len(room_objects) - 1)] for i in range(0, random.randint(0, 1))]], WIDTH - 64, HEIGHT - 64, [True, True, True, False], 1),
|
for j in range(random.randint(5, 10))
|
||||||
Room(type, 'normal', f'art/images/{type}.png', [objects[0], objects[1], objects[2], [room_objects[random.randint(0, len(room_objects) - 1)] for i in range(0, random.randint(0, 1))]], WIDTH - 64, HEIGHT - 64, [True, True, True, False], 2),
|
]
|
||||||
]
|
#rooms =Room(type, 'normal', room_backgrounds[random.randint(0, 4)], [objects[0], objects[1], objects[2], [room_objects[random.randint(0, len(room_objects) - 1)] for i in range(0, random.randint(0, 1))]], WIDTH - 64, HEIGHT - 64, [True, True, True, True], j)
|
||||||
return rooms
|
|
||||||
|
|
||||||
|
return rooms
|
||||||
|
|
||||||
def play(screen, clock, running, background, isblack, WIDTH, HEIGHT):
|
def play(screen, clock, running, background, isblack, WIDTH, HEIGHT):
|
||||||
main = [MainCharacter('Herbert', 100, 'oldman.png', 500, 500, 20, 5, 1, 1, 50)]
|
main = [MainCharacter('Herbert', 100, 'oldman.png', 500, 500, 20, 5, 1, 1, 50)]
|
||||||
|
|
|
||||||