Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Any way to hide media?

Author
Message
ronin
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location:
Posted: 18th Apr 2007 17:51
Hi,
I have been reading good stuff here and there about the DarkGSDK or DarkGDK and I have seen that its pretty good for those that want the power of dbp mixed with thw c++ advantages.

Now there is a subject that I havent seen much explained anywhere... what about the media? I know that dbp has the ability to somehow encapsulate and/or encrypt the media within the final exe, but since dgsdk works with and external environment it seems impossible, or at leat no able to do that the same way dbp does within the ide. I have seen a couple of threads refering to this subject here but still no proper solution for that problem, I mean if one is going to sell something to the big public then ppl will get the whole media being able to at least see everything not to meantion the possibility to steal grab etc anything...

So anyone know if there is a way to protect the media that goes with the exe generated? Thanks in advance
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 18th Apr 2007 19:04
The DBPro encapsulation is some kind of useless, since it just extracts the files into the user's temp folder.

DGDK on its side doesn't provide a specific solution for this (at least as straight as DBPro has), but you can count on the powerful C++ I/O commands to store any media or create your own file format.

Of course, all the DBPro packing and file commands are available, so you can use some sort of standard packing solution, there must be some code snippet around.
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 18th Apr 2007 20:57
Adding to that, if you hold media in memory from a standard flat file system such as tar files and use sny third party class library to access this data (google, or search CodeGuru), you can feed Memblock data into your application and generate images, meshes and such from them using the normal Memblock functions.

Paul.


Abundance = Choice = Freedom - Scarcity = Dependancy = Control, Truth!
ronin
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location:
Posted: 19th Apr 2007 00:03
Thanx for the quick reply

Well I have this thing in mind, if I want to build the main level from lets say a unique X file that has many textures aplied to it, then handling them individually creating every and each of them using memblocks would be a pain, or at least I think so... cant think of a more mechanic way of doing that, maybe you have thought of another more automatic way?

By the way what are those packing commands from dbp? I know file i/o commands which of course in that case would be present in the standard c language as well as c++ but never heard of those packings commands you mentioned.

Besides I have thought that maybe there is a way of doing anything like in the environment itself, like the way you add an ico/bmp/etc file to your standard win32 application project or so
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 20th Apr 2007 11:43
To read byte-by-byte using C++ file commands and storing them carefully in memblocks maybe a pain, but it ensures that your media is some kind of protected (since the file format is as you like), or at least some one will have to pass that pain to read them too.

The commands I refer to are the file ones:

dbWriteDirBlock
This command will write an entire directory to a pack file.

dbReadDirBlock
This command extracts an entire directory from a pack file.

dbWriteFileBlock
This command will write a file to a pack file.

dbReadFileBlock
This command will extract an entire file from a pack file.

And the other file commands.

Resources as media can be included into the VS projects, such as the icon for the application, but I don't know how to use these resources with DGDK
Maybe someone around knows how-to.
ronin
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location:
Posted: 20th Apr 2007 16:06
Yeah I see what you mean, by using the c++ its possible to encapsulate encrypt the files as much as you like in a brand new file format, but doing this I think it couldnt be then stored in memblocks, I mean yes its fairly possible to do that but in the case Im thinking it wont work since the model could have more than one texture applied to it even more than one per limb so making the images from the memblocks wont allow to load the X file correctly textured. The only way I could think of would be to separatelly extract the images in like a temp directory (like dbp does) and then loading eveything, then again will take time and... it will be necesary to know what images are needed by each X file.

By the way thanx for telling about the packing commands, I have never used them and they are even well documented

About including resources in the VS Im at the same point, I read an old thread that said something like that, that maybe it was possible somehow to achieve this but no appropiate method was posted in the end, I have the hope that maybe someone already got this to work.
Charles
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: Phoenix, AZ USA
Posted: 5th May 2007 09:09
All you need to do is to create a dll that can create some kind of archive using some kind of proprietary format and make your own pak file. That way, you can use your own encryption technique.

You can then extracr your files and load them into your game. When finished loading your resources, you can delete the extracted files as to protect your resources.
ronin
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location:
Posted: 7th May 2007 21:17
Thanks and yes I see your point but... doing this would mean extracting from tha kind of pak file only the media required at a time so that means I need to ie read the x file itself to know what textures are required to load and so extract them, right? I wonder if that would take too much time to perform all that...
JDforce
20
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 7th May 2007 21:50
I use molebox pro. Works great, and it can even register activex and unregister it upon exit. It packs dlls, data files, media, whatever and I have fully tested it with dbpro, gdk, and delphi apps.

May the 3d force B with U
Charles
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: Phoenix, AZ USA
Posted: 8th May 2007 00:29
Quote: "Thanks and yes I see your point but... "


Once you create your archiver DLL, you can add the ability to have it extract a whole directory of files (dir\*.*). You will need to erase the files from the temp directoty right after loading them. Another method would be to use the DAO database engine to track what textures go to which x file.
ronin
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location:
Posted: 23rd May 2007 18:46
Hi, thanks a lot for the replies, and sorry for the delay, I just got some issues with the isp, so I have been like 2 or so weeks of disconnection.

And getting back to the subject, JDForce, I have just checked the software you mentioned, molebox, and it looks great , I mean I havent downloaded the trial yet (lack of hd space...) but seeing the feature list looks like very simple and powerful, I will give it a try, I have also seen that the standard version is more or less what I was talking about so I think I will go with it if all runs as they say, I still cant believe its so automatic .

Charles, I have also considered your solution, in fact in all the disconnected days I got, I tried something like that, not by directories but file by file (i reuse some textures so I have them mixed in a folder), my plain c++ project was running great , perfect extraction with decryption w/o any data loss, but trying to extract/decrypt bigger files took much time, there is a for loop that run through the whole file twice... Im sure this could be done in a faster more accurate way but oh well... I still would need to know the textures needed for every x file... guess this is where your DAO idea comes in, my knowledge around that is very poor tho so I'll have a look into all that and then see what goes better .

Login to post a reply

Server time is: 2024-11-19 13:44:08
Your offset time is: 2024-11-19 13:44:08