amykatname / newhorizons

Port of the Penguin game to HaxeFlixel
https://discord.gg/2wGgTJcPt9
3 stars 5 forks source link

Room asset loading #15

Closed marvhus closed 3 days ago

marvhus commented 3 days ago

I have created a simple way of loading a group of assets. To do so I have created RoomAssetsLoader, which takes in JSON files, and creates the specified assets.

Examples of the asset JSON files are in assets/images/rooms/town/.

This makes it easy to specify assets without a lot of boilerplate, and it makes it possible to modify the room layout, etc, without even needing to change any of the code.

Here is what Town looks like after this change: image