Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted

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.

Posted

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

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Posted
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...

  • Administrators
Posted

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.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...