Hi all,
I'm looking to see what the general approach is to releasing a game with it's scripts, materials and assets. Ideally I would like to have all of the shader/material text files as binaries (presumably using the HLMS & microcode cache? viewtopic.php?f=4&t=61004 & viewtopic.php?f=11&t=62487).
Is there a standard approach for creating binaries for materials/shaders? Or are the raw text files always packaged?
Could I play my game and then package the hlmsDiskCacheX.bin & microcodeCodeCache.cache files? Or are these files host/execution specific?
Would something like the Script Cache Plugin generate binaries that can be safely deployed? https://wiki.ogre3d.org/Script+Cache+Plugin
Also, if I wanted to package up the other game assets (textures, models, etc.) then I presume a multi-file archive format is the standard approach?
Thanks,
Frank
Packaging materials and assets
-
- Kobold
- Posts: 33
- Joined: Mon May 05, 2014 5:36 pm
- x 3
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: Packaging materials and assets
Hi!
The caches merely optimize load times to avoid hitches.
How you actually want to proceed is up to you.
I'm afraid the Hlms files will have to be bundled as text; however it can be obfuscated via the Resource system.Frankincense wrote: ↑Wed Oct 27, 2021 10:02 pm Ideally I would like to have all of the shader/material text files as binaries (presumably using the HLMS & microcode cache?
The caches merely optimize load times to avoid hitches.
See Ogre 2.1 FAQ:Frankincense wrote: ↑Wed Oct 27, 2021 10:02 pm Could I play my game and then package the hlmsDiskCacheX.bin & microcodeCodeCache.cache files? Or are these files host/execution specific?
The HlmsDiskCache can be bundled to all of your clients, it's not host-specific. And with the HlmsDiskCache you can generate a new microcode cache on the local client.Direct3D11's shader cache can be used anywhere, including other systems.
OpenGL's shader cache can only be used in the computer it was generated with, and may be invalidated if the user updates his drivers or changes GPU.
The ResourceGroupManager system hasn't changed since Ogre 1.x; thus the same documentation applies to most of it. If you want to package stuff you do it as Zips rather than files. If Zips is too standard for you (i.e. anyone can open a zip file), you can take a look at ZipArchive and implement your own that performs your own obfuscation (i.e. that's what Torchlight & Shadows Heretic Kingdom did).Frankincense wrote: ↑Wed Oct 27, 2021 10:02 pm Also, if I wanted to package up the other game assets (textures, models, etc.) then I presume a multi-file archive format is the standard approach?
How you actually want to proceed is up to you.
-
- Kobold
- Posts: 33
- Joined: Mon May 05, 2014 5:36 pm
- x 3
Re: Packaging materials and assets
Excellent, thanks for your help - I will look into how to apply some sort of obfuscated zip files and see how that goes