I'm trying to write a game for MacOS, but I can't find any useful information about how to include the game assets. The game is divided into scenarios, each scenario containing 20 levels.
Each level has one of 6 colour themes, so I need a set of textures for each theme and an additional set which are the same in every level. To keep things simple for now, I decided to let Xcode create an atlas for each of those sets, and have the game use 2 atlases for each level. Originally, each coloured set had the same set of leafnames, but I inferred from the official SpriteKit docs that every texture might need a unique name, so I added a prefix for each set ("b-" for blue, "r-" for red etc). The main problem I have now with the textures is that I don't know whether they should be added to the top-level of the bundle, or in Assets.xcassets. What's the difference between bundled files and assets?
That isn't my main problem though. The data for the levels is in text files structured like this:
If I add them like this, the project won't build because Xcode seems to want to flatten the directory structure, and the duplicate leafnames clash. Is there a way to keep the directory structure with duplicate leafnames, and if so, how would I refer to the files in code?
Each level has one of 6 colour themes, so I need a set of textures for each theme and an additional set which are the same in every level. To keep things simple for now, I decided to let Xcode create an atlas for each of those sets, and have the game use 2 atlases for each level. Originally, each coloured set had the same set of leafnames, but I inferred from the official SpriteKit docs that every texture might need a unique name, so I added a prefix for each set ("b-" for blue, "r-" for red etc). The main problem I have now with the textures is that I don't know whether they should be added to the top-level of the bundle, or in Assets.xcassets. What's the difference between bundled files and assets?
That isn't my main problem though. The data for the levels is in text files structured like this:
Code Block Scenarios |_ Jungle | |_ 01.txt | |_ ... | |_ 20.txt | |_ ... |_ Labyrinth | |_ 01.txt | |_ ... | |_ 20.txt | |_ ...
If I add them like this, the project won't build because Xcode seems to want to flatten the directory structure, and the duplicate leafnames clash. Is there a way to keep the directory structure with duplicate leafnames, and if so, how would I refer to the files in code?