How can this be done? I've seen some games have directories in their packs like /sounds or /steps. etc etc.
Pages 1
You are not logged in. Please login or register.
AudioGames.net Forum → Developers room → Pack file directories in bgt?
How can this be done? I've seen some games have directories in their packs like /sounds or /steps. etc etc.
The pack names are just strings. You more or less simulate directories by using that naming scheme.
Hi,
What post 2 said. This way you can pretty much change a game that used no pack system previously to use one if you just add the files to the pack keeping the rellative path, such as "sounds/steps/concrete/land.ogg". As for extracting those packs into a directory structure, I don't have a tool to do this and I don't think you can just open the files, because you have to create the directory structure first, I dont' fhink file.open will create a directory, only a file if opening a nonexistent file in write mode. I might develop something to do this someday, there are probably already tools to do it, you just have to find them. Either way though, making them is pretty easy.
You could just look for the last / or \, and use everything before that as the path to the directory. At that point, you can use directory_exists and directories_create (I don't remember that function's name, actually ) to fill in the gaps.
AudioGames.net Forum → Developers room → Pack file directories in bgt?
Generated in 0.019 seconds (48% PHP - 52% DB) with 11 queries