relocated image files

changed room generation

Signed-off-by: SpagettiFisch <63868515+SpagettiFisch@users.noreply.github.com>
This commit is contained in:
SpagettiFisch 2024-03-07 13:55:01 +01:00
parent c3c44bbc71
commit 5010609378
14 changed files with 8 additions and 5 deletions

View file

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

13
main.py
View file

@ -14,6 +14,7 @@ def setUp(config):
else:
screen = pygame.display.set_mode(config["res"])
clock = pygame.time.Clock()
pygame.display.set_caption('Between The Pages')
return screen, clock, True, True, "start.png", []
def readConfig():
@ -30,13 +31,15 @@ def genRooms(WIDTH, HEIGHT, type:str, objects:list):
room_objects = []
#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_backgrounds = [f'art/images/background/{type}{i}.png' for i in range(1)]
print(objects)
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', 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),
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),
]
return rooms
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)
for j in range(random.randint(5, 10))
]
#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
def play(screen, clock, running, background, isblack, WIDTH, HEIGHT):
main = [MainCharacter('Herbert', 100, 'oldman.png', 500, 500, 20, 5, 1, 1, 50)]