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.

DarkBASIC Professional Discussion / Can I pack graphic sources?

Author
Message
Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 8th Jul 2019 14:44 Edited at: 8th Jul 2019 14:47
Can I pack or make non accessible for users pictures and 3d x files?
Derek Darkly
8
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 14th Jul 2019 01:25
Yes... you can pack them into MEMBLOCKS.. even multiple files into one.

Otherwise, a cheap alternative is to give your assets misleading names;
For example... "Ninja.dbo" could become "746347XXUJJ" and still load the same!

Hope this helps.
Send your parents to noisy sprite demo hell... enter the D-Zone
Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 14th Jul 2019 09:26
)) !!!
I find here much discussions about dbo and cannot find nothing about 2dbo converter?
Derek Darkly
8
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 14th Jul 2019 16:37 Edited at: 14th Jul 2019 16:37
I have never seen DBO converted to anything other than a mesh. However, there may be programmers here who have written conversion or encryption code for game assets. I don't think .DBO is a highly recognized file type, except to developers, so I'd say it's fairly safe to distribute to consumers.

My advice was really more of a workaround. I'm actually not sure how most game sellers handle their assets to keep them from being manipulated by users. Still, I think I'm right about packing files into memblocks.... unless I'm wrong. I never actually used memblocks for that purpose.
Send your parents to noisy sprite demo hell... enter the D-Zone
Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 14th Jul 2019 16:45
Memblocks. Ok. Thanks. I`ll try.
Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 15th Jul 2019 08:59 Edited at: 18th Jul 2019 17:02
Thanks. Solved. Dbo !!! memblocks works only with mesh, not object.






?ddd.src
Derek Darkly
8
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 20th Jul 2019 01:36 Edited at: 20th Jul 2019 01:36
I wouldn't worry much about it really... as one Reddit user said:
"Even if you somehow encrypt them (which has a very real CPU cost when using them in your game) people can just disassemble your code ..."

I mean look at Skyrim... perhaps the most heavily modded game ever. Bethesda isn't suffering for it. LoL
Send your parents to noisy sprite demo hell... enter the D-Zone
Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 20th Jul 2019 09:39
I`d absolutely agree with it. But it`s a good manners rule to make some careless data disguise. And maybe it`s to early now, but I want to make some weighty thing. )) PS: I dont`t ever try to play Skyrim, maybe it`s a good time to make it now. ))
Latch
13
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 22nd Jul 2019 23:40 Edited at: 23rd Jul 2019 00:12
What I did at one point was not convert my files to a memblock, but load the entire file into a memblock. I then used some basic XOR encryption with the key built into my program to save these memblocks as files. The whole program would be distributed with the memblocks as the resources, then they would be decrypted as a copy to the appropriate file type, saved, loaded into the game, and then the decrypted version deleted. A bit disk intensive but a pretty simple method for hiding resources. The XOR encryption works like this:

You have a byte, say 65. Let's say your key is 13. You would xor(65,13) and get 76. 76 is what is stored in the byte position of the file. Now to get your 65 back, you use the same key and 76 : xor(76,13) = 65.

You can get creative with this. You could have a string stored that reads something like "Copyright 2019." You can XOR the ascii value of each character against the byte value of different byte positions in the file. Much more encrypted. Just repeat everything in the same order to decrypt it. If you want to get nuts, use a consistent seed or set of seeds for the random number generator so you get the same series of numbers generated each time it is run. Use these number to xor against your bytes in the file - one random number for each byte.

Also, I don't know if anyone uses these commands anymore, but there were FILEBLOCK and DIRBLOCK commands that were used to read and write files and directories to .pack files included in DarkBASIC. If you wanted to go one more level deep, you could compress your encrypted files into a .pack directory or file.
Enjoy your day.
Raven
14
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 23rd Jul 2019 06:56
The most common way to "Encrypt" Data used for Game Assets is to use an
A) Custom File Format
B) Package into a Custom Compressed File

I mean the easiest approach is to use Standard Formats., but merely have an Encryption (on Data Block) Pass.
So for example Overwatch (or any Blizzard Game) use a VERY well documented format., but each update they use a new Encryption Key... so all of the Data Headers are always Readable., but the actual Data is using said new Encryption Key as a base.
This tends to take a week or two for those of us who help maintain the Overwatch Tools, to Data Mine for Encryption Key and release it as part of an Update to allow the latest Patch Data to work with the Tools.

And as we have to resolve both the .Package (Cache CRC) Encryption AND the new Encryption for any New Files within said Packages., while keeping old keys for Files from previous Updates; over time obviously this can become quite effective without constant on-going work from Tool Developers.
As noted Overwatch we keep on-top of quite well., but if someone was to start from scratch for it today; you're looking at a Main Package Key that changes every 14 Days., then about 40 Keys for all the different assets; some of which we've still not figured out which specifically go to which assets., because not all files were updated in the same package and thus a secondary list always has to be kept to keep track with a lot of trial-and-error to resolve decryption issues that some tend to be missed as there are THOUSANDs of Files.

It somewhat depends how much effort you want to put in really.
An "Out of the Box" Solution can be quickly defeated., while more creative solutions can be difficult to maintain.
It's all about how much effort you want to put into such an approach and how much effort is really needed... I'd argue most games are NEVER going to be popular enough to put in much effort (if any) to protect said assets.

Just know ANY approach can and will be defeated by anyone who puts their mind to it.
Much like Anti-Piracy Measures; there's no such things as a "Perfect" Solution... you're just aiming for frustrating and time consuming enough that people give up on trying.
Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 23rd Jul 2019 14:24
!!!Thanks.
Dimis
8
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 23rd Jul 2019 20:43
Most simple solution is to change your project from "exe" to "media", from the application properties, and add your media in the final exe, if you just don't want to make them directly accessible to users. You end up with a large exe file. Well if it is too large it could be a small (or big) problem, so it is not always a perfect solution, but if you want something simple, you can try it.
On that subject, i am also looking for a solution, i have a large number of media files, so having my media included in the exe is good enough for a demo, but not for a full, release, so i was thinking about Smart Packer Pro. Does anyone have any experience with it, is it worth it's money?

About a dbo converter, well if you load your models in a DBpro project, you can use the "save object" command to convert them to dbo, that's all. If your models fail to load in DBpro, there was a program called fragmotion,it could convert 3d files to dbo. i don't know if it is still updated.
Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 24th Jul 2019 12:23
Thanks. I always like small exe files, but in the end is there any difference. I think it`s a good and acceptable method. There are number free analogs of smart packer.
Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 25th Jul 2019 13:40
Are you make some serious project? dbp?
Dimis
8
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 26th Jul 2019 17:09
With a large exe, there is a difference, the processor will need more time to load it, but then again it depends on the processor and the final size of the exe, i guess. Still not a bad solution though, if you don't want to start working on your own encryption methods. If you want to try that solution, a good practice is to reduce the size of your media files, use compressed dds files when possible, and try to convert 3d x files to dbo objects, dbo files have smaller size. What type of game are you making? Can you estimate roughly how many MB your media files will be?

I am making a dbp project for several years now, a fighting game, i have hundreds of media files, that i don't want to make them easily accessible to users. But again i know that it is not impossible to completely prevent that. People have found ways to mod the pc versions of games like mortal kombat and street fighter, so i am not going to freak out about my game.

Alex2016z
User Offline
Joined: 4th May 2019
Location:
Posted: 27th Jul 2019 09:13 Edited at: 27th Jul 2019 09:13
I always wonder why there are no one commercial game that maked with so much useful dbp tool. I want to make jagged alliance like strategy with walking mechs. I thinks to use much polys untextured, so I`ll have smooth animation, flying pieces, sounds. Cool... My previous idea was to make endless patreon point`n`click adventure in stainless rat style.
Oliviageorge098
User Offline
Joined: 2nd Sep 2019
Location:
Posted: 2nd Sep 2019 12:08
Strongly agree with Dimis.

Login to post a reply

Server time is: 2020-01-23 02:29:17
Your offset time is: 2020-01-23 02:29:17