EFileTahi-A Posted January 17, 2006 Posted January 17, 2006 Ok, how can I create a data pack. You know, creating a file to hold all types of files (graphics, sounds, text files etc...) like Quake's .pak files. Any, yet, small information on this subject will be much apreciated. Thank you. Quote
Administrators PlausiblyDamp Posted January 17, 2006 Administrators Posted January 17, 2006 Often a .pak file or .wad or whatever is just a way to store related files together. If you have no particular format requirement then you may as well just use a zip file or similar. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
EFileTahi-A Posted January 17, 2006 Author Posted January 17, 2006 But then I will have to unpack it first to get those files (right?). I was thinking of something like grouping the files only, with no compression. And this grouping process must be done with C# language. I mean, creating my own file format for grouping files. I don't know if I'm being explicit or not. Please do let me know about it. Quote
Administrators PlausiblyDamp Posted January 17, 2006 Administrators Posted January 17, 2006 (edited) You could always use a zip file without compression if speed is an issue, also using something like #zipLib will allow you to read data direct from the zip file. Edited March 10, 2007 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Nate Bross Posted January 17, 2006 Posted January 17, 2006 Are you trying to group all of your files together to prevent end users from editing them? If what you would need to do is create a custom binary resource file. This link is to Visual Basic 6.0 samples, but it shouldn't be too dificult to transfer the code to .NET, as it seems that you are after the logic of doing this instead of the source code. http://gpwiki.org/index.php/VB:Tutorials:Custom_Resource_Files Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
EFileTahi-A Posted January 18, 2006 Author Posted January 18, 2006 Are you trying to group all of your files together to prevent end users from editing them? If what you would need to do is create a custom binary resource file. This link is to Visual Basic 6.0 samples, but it shouldn't be too dificult to transfer the code to .NET, as it seems that you are after the logic of doing this instead of the source code. Thank you. I will look into this, although I would prefer to have a C# example... Quote
Administrators PlausiblyDamp Posted January 18, 2006 Administrators Posted January 18, 2006 Using a simple format like a zip file will allow you to replace / edit assets easily. A custom binary file will require the entire .pak (or whatever you call it) to be rebuilt and repacked everytime something changes. If users modifying the files is an issue you could always encrypt the assests or simply password the zip itself. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
EFileTahi-A Posted January 18, 2006 Author Posted January 18, 2006 I see what you mean. Although the main purpose of the pack file thing is only for storage, not to constantly changing its contents, it's like when .NET compiles the hole project into a single executable file to be setup elsewhere, although in this way I don't want it to be executable but to store data only. Yet, I'm not worried about how easy it's contents can be unpacked by thirds. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.