About Store Forum Documentation Contact



Post Reply 
Question on publishing and file encryption
Author Message
Pixel Perfect Offline
Member

Post: #1
Question on publishing and file encryption
I'm seeking advice on how best to handle some lip sync data files I'm going to be using for lip synced speech.

As Esenthel knows nothing about these files I can't drag and drop them into EE and reference them using UIDs, so I currently have them in my data folder under their own directory and reference them using their path and filename.

Now what happens to those files when I publish the project. From what I understand they will get packaged up and encrypted into a pak file.

Presumably accessing any one of them will decrypt the file as part of that process but how do I now reference those files?

Or am I better advised to keep them external to the data folder and use a relative path from the executable?

Excuse my ignorance on this but I've not actually tried publishing anything yet and the wiki info seems to refer more to version 1.0 then 2.0 as far as I could see although they both might work in a similar way for all I know.
10-11-2013 05:32 PM
Find all posts by this user Quote this message in a reply
para Offline
Member

Post: #2
RE: Question on publishing and file encryption
(10-11-2013 05:32 PM)Pixel Perfect Wrote:  Or am I better advised to keep them external to the data folder and use a relative path from the executable?

For developing/debug purposes I'm going with this approach currently.

Well, I've seen that you can create a new raw file and hit F3 to bring such external files in the editor, but I don't remember seeing any file IO functions with UIDs, .. probably I missed something?
10-11-2013 07:08 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #3
RE: Question on publishing and file encryption
Quote:For developing/debug purposes I'm going with this approach currently.
Thanks Para, I think I'll stick with this too for now.

I'll take a look at the Raw File option you mentioned, but having looked at the various file headers I can see no file I/O functions that take a UID either.
10-11-2013 08:54 PM
Find all posts by this user Quote this message in a reply
Rofar Offline
Member

Post: #4
RE: Question on publishing and file encryption
For all custom data files I create raw file elements and then just write the methods to load and/or save that data. My master file for those elements are stored external from EE folders and then when I update the master file (via other tools, etc), I just reload the raw element to update the game data file.
10-11-2013 09:54 PM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #5
RE: Question on publishing and file encryption
Thanks for your input Rofar, that makes sense. So I've created a raw file and set it to point to one of my files, so far so good. It now has a UID and FileID but how do I access that in code, that is ... load the file as I can see no Load function that take a UID as an argument? If I can just access the file's data I can quite happily write the routine to parse the data.
10-12-2013 12:42 AM
Find all posts by this user Quote this message in a reply
Scarlet Thread Offline
Member

Post: #6
RE: Question on publishing and file encryption
(10-12-2013 12:42 AM)Pixel Perfect Wrote:  Thanks for your input Rofar, that makes sense. So I've created a raw file and set it to point to one of my files, so far so good. It now has a UID and FileID but how do I access that in code, that is ... load the file as I can see no Load function that take a UID as an argument? If I can just access the file's data I can quite happily write the routine to parse the data.

Hi Pixel,

You should be able to load straight from the fileID. Or you can use EncodeFileName(UID); which returns the fileID from the UID.

Should be able to do it with EE's File IO classes. Have a look in the Files tutorial and put either EncodeFileName(UID) or the fileID straight into the function. e.g.

Code:
File f;
f.read(EncodeFileName(fileUID));
//Then just parse the data (Tutorial shows easy way how)
10-12-2013 01:17 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: Question on publishing and file encryption
EncodeFileName(fileUID) - that's the right way smile as file names are just the element ID in text format coded with the 'EncodeFileName' function

And yes, "New Raw File" is the best way for importing unknown file types in their exact original binary representation. Use "Reload Element" option to set its contents from source files.
10-12-2013 01:49 AM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #8
RE: Question on publishing and file encryption
Cheers Ken, that's just what I was looking for and as Rofar pointed out, any change to the external source file and I simply reload the raw file element.

Thanks guys smile

Ah, just saw your post too Grzegorz. Excellent ... there is always a solution in this engine to anything I want to do, the Raw File option gives it a nice flexibility.
(This post was last modified: 10-12-2013 01:58 AM by Pixel Perfect.)
10-12-2013 01:52 AM
Find all posts by this user Quote this message in a reply
Post Reply