Posted 15 September 2011 - 07:17 PM
Say that I write a file format used for 3D models, which combines the 3D files with the textures, AO, ...
How would I be able to read that file without have to create temporary files out of that.
5 files into 1 file to write
to read: load them all during runtime while not having to create 5 actual files (so some sort of buffer system)
EDIT: Forgot to mention which language, dumb me.. It's C++
Posted 15 September 2011 - 08:34 PM
I have never had that much experience with file streaming,
and I didn't know that that was possible.
But now that I think of it..
Thank you :)
Posted 16 September 2011 - 10:30 AM
You can do the same thing with ram, just allocate it all into a single static buffer, then manage the internals yourself with your own code.
Posted 16 September 2011 - 02:56 PM
So basically write it all into one file
And then when reading, read it into one buffer, and then (possibly)
Set up multiple pointers pointing to positions in the buffer which represent
beginnings & endings of files within the "master" file.
Or am I mistaken?
Posted 16 September 2011 - 03:39 PM
If you wanted to release a game, its good to do, its tacky (carmageddon was sold with about 10 million separate files in the program hehe) releasing a game with all the media in separate files people can just import into editors so simply, if you pack them all away you can add compression whilst copy protecting your media, visual studio can pack media in with the exe file, also.
[EDIT] actually, if you just wanted to load the whole thing, what reedbeta said would be all you need to do, but if you wanted to say load each level one at a time, you need the extra searching pointers.[EDIT]
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users