I don't know how many here are familiar with Allegro, but it has a nifty feature: It has built-in support for datafiles so users can store graphics, fonts, sounds, etc. in a single data file so files aren't thrown everywhere. I really like Irrilcht but the only data files that Irrlicht supports as far as I can see are level data (.irr files). What I'm looking for is the ability to store media in a single file, then load the datafile, then create a scene based on the graphics data in that file.
Does Irrlicht support datafiles like that?
(EDIT: I'd like to create a 2D scene before a 3D scene, so the data file should contain only graphics and/or sound data, no meshes yet...)
Datafiles with Irrlicht
yes, irrlicht can load ZIP files.
My company: https://kloena.com
My profile: https://zhieng.com
My co-working space: https://deskspace.info
My game engine: https://kemena3d.com
My profile: https://zhieng.com
My co-working space: https://deskspace.info
My game engine: https://kemena3d.com
...How?
I saw in the demo that comes with Irrlicht a few minutes after I posted that it can use zip files with the method addZipFileArchive. But I'm a bit confused as to how it's used. The file has two jpeg's, but neither are referenced in the demo program. Note that I'm not talking about loading a 3D map from a zip file, but loading an image that I can use in a 2D-ish program right now.
you just add the zip file using addZipFileArchive() and then you can load the files in the archive like they we on the disk.
So for example you have a zip file "my.zip" with the file "texture..jpg" you would load the texture like that:
So for example you have a zip file "my.zip" with the file "texture..jpg" you would load the texture like that:
Code: Select all
FileSystem->addZipFileArchive( "my.zip" );
ITexture* tex = VideoDriver->getTexture( "texture.jpg" );
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.