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.

Newcomers DBPro Corner / Compiling media, doesnt work???

Author
Message
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 13th Mar 2009 14:31
in the prperties tab i have tried to compile my game with an exe and the media pck but when i try to run this exe it cannot find any of the media i also tried many other methods turning encryption and compression on and of and still didnt get it to work unless i put all the media in the same folder in its original format..

i know that i can make the files like i want to i have done it before but why stop now??

please if anyone can help it would be great.. im due to release my game within the next day or two but i dont want anybody having access to my media...
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 13th Mar 2009 15:21 Edited at: 13th Mar 2009 15:22
I don't think that has worked properly for a long time, but just for the sake of it, you should ensure that you are only using relative paths to your media, as that will be what is used after unpacking it.
It is even possible that you must redirect your paths to point to "name of media file"<here is the actual root directory>.

Also, the media will not be very much protected in that way; when your program is executed, it will actually be extracted to a temporary folder which can be accessed as long as the program is running.

lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 13th Mar 2009 15:26
is there any way of pretecting my media propery, and make it compile so that i dont have to use the raw media?..
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 13th Mar 2009 16:35 Edited at: 13th Mar 2009 16:39
Well, you can write your own file formats, or just scramble around with the data of those you are using, "de-scrambling" it, load it, and then straight away scramble it back again. However, that is likely to cause pretty long loading times.
Certain media, like images, meshes and sound can easily be encrypted and decrypted through the use of a memblock. Basically you make your memblock from the source data, apply some algorithms to it to "mess up" the data, and save the results to a file. You then load this file, reverse the algorithm and converts the memblock to the proper image / mesh / whatever.
This would probably be pretty hard to implement now if you have a stressed deadline though, but the basic principle is easy.

I'll write you a short snippet to encrypt and decrypt an image file:


There are of course much smarter ways of encryption than this, but it would probably still work for your general media protection. (It is rather unlikely that somebody would actually spend his time trying to break your media encryption, no matter how simple it is).

Hope that helps; similar approaches can be applied to meshes and sounds etc. If you want to encrypt your music like this, you would have to apply some filters to its source file though, which means that you would have to extract a copy for a while (you can delete the decrypted source file right after loading it in though, but if someone is really up for it, he might snatch it during that time frame ).

Well, hope that gives you some ideas.
And oh yeah, I think there is at least one plugin for encrypting data on a more advanced level around here.

lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 14th Mar 2009 00:09
wow im a little stumped with this, although it looks good and may use it in future but it looks pretty complicated and i am still relatively new..

i just want to do it the normal way really, until i start getting into more rich media. but the way i am trying to do that isnt working and i have to have the raw media in the folder and i want it packaged..
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 14th Mar 2009 00:59
ok i just tried adding all the media into the project to see if it would compile it then but nope still doesnt work...

should i try reinstalling the editor or something...
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 15th Mar 2009 04:02 Edited at: 15th Mar 2009 04:15
i just repaired the installation and it didnt work, the program just comes up black until i press escape and then it says that the image was not found as part of all the media...

EDIT: Please if anybody knows a solution to fixing this, tell me.

I am in immediate need of help, i am already past my deadline and people are asking where is it...
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 15th Mar 2009 05:35 Edited at: 15th Mar 2009 06:32
also does it matter whether the media is attached to the editor and what is the bak file there for...

ok i just got it to work by changing to codesurge..

i suggest everybody change to it, its alot less buggy..
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 15th Mar 2009 12:13
Yes, you must include all media in the default IDE using the media tab for that to have a chance of working.

lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 15th Mar 2009 12:23
i had alreadydone that but it stilldidnt work..

now the difference in file size is 13MB and it now loads the media except for the .fx file...

Login to post a reply

Server time is: 2024-11-25 10:27:01
Your offset time is: 2024-11-25 10:27:01