> Apocalix has a very usefull system of
> resource management, including all in
> a zip file.
> But in the development phase I would
> like to load the resources not from
> the file, but from the disk.
> It's possible to load resources (scripts,
> textures, models, etc) directly from disc?
It's not necessary to load resources from a zip file, in fact there are also functions to load them from files. However the best way to keep compatibility between the two versions is to use this call (as described in the docs):
local zip = Zip("my_datadir\\",false)
When the second argument is 'false' the engine treats the first argument as the directory weher the resources are stored, so you can use the methods of the Zip class just like when the following line is used
local zip = Zip("my_data.zip")
If the path is "", the resources are read from the executable directory.
Since it is not a way very used to load resources, there could be strange behaviors sometimes (for example, BSPs use only the default texture for all the level). If you find any of these problems, please report them to me so I can fix them in the next release. Thank you in advance!
--
Ciao, leo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
Apocalix has a very usefull system of resource management, including all in a zip file.
But in the development phase I would like to load the resources not from the file, but from the disk.
Then, in a final test, I would make the zip file and teste the game with it.
It's possible to load resources (scripts, textures, models, etc) directly from disc?
By: anonymous
> Apocalix has a very usefull system of
> resource management, including all in
> a zip file.
> But in the development phase I would
> like to load the resources not from
> the file, but from the disk.
> It's possible to load resources (scripts,
> textures, models, etc) directly from disc?
It's not necessary to load resources from a zip file, in fact there are also functions to load them from files. However the best way to keep compatibility between the two versions is to use this call (as described in the docs):
local zip = Zip("my_datadir\\",false)
When the second argument is 'false' the engine treats the first argument as the directory weher the resources are stored, so you can use the methods of the Zip class just like when the following line is used
local zip = Zip("my_data.zip")
If the path is "", the resources are read from the executable directory.
Since it is not a way very used to load resources, there could be strange behaviors sometimes (for example, BSPs use only the default texture for all the level). If you find any of these problems, please report them to me so I can fix them in the next release. Thank you in advance!
--
Ciao, leo