ignacioxd / ragin-mages

JavaScript MOBA game built with Phaser 3
https://raginmages.net
59 stars 21 forks source link

Can you tell me how you generated assets.json #145

Closed Tyrone2333 closed 5 years ago

Tyrone2333 commented 5 years ago

Your game is great! I am also writing a game, using texturePacker to generate atlas, and using Tiled to generate game maps. For a large number of files, I can't manually write json configuration files. How do you manage game resources? Can you tell me some other useful tools?

ignacioxd commented 5 years ago

Glad you like our game!

We generated our assets.json manually, but I understand this does not scale well with a larger number of assets. We also used Tiled and TexturePacker in this game.

One approach you can take is organizing your assets into a folder structure that follows a naming convention, so that your folder names could serve as asset keys. Once you have that in place, you could write a simple script that traverses this folder structure recursively and outputs the assets.json file (or a similar file that suits your needs) based on the folder structure.

Hope this helps! Would love to take a look at your game if it's available.

Tyrone2333 commented 5 years ago

Thank you for your help, I will try to find new tools, if not, write a script,and the game is not being finished so fast.