Please support our sponsor:
DirectX4VB.Com - All You Need For Multimedia Visual Basic Programming

Main Site Links Resources Tutorials
News VB Gaming Code Downloads DirectX 7
Contact Webmaster VB Programming Product Reviews DirectX 8
  General Multimedia Articles DirectX 9
      Miscellaneous

 

General: Hiding Files
By: Jack Hoxley
Written: June 2000


There is one thing that is garaunteed to REALLY annoy any games programmer - theft. If you've worked on a game for months and then someone steals the artwork or sounds from you and worse, goes on to use them himself/herself. There is very little you can do about this without delving into really deep encryption or compression (or both). No matter how hard you try, someone somewhere will probably get passed it sooner or later (If they try very hard). However, there are several simple things that you can do to minimise the risk:

  1. Make all files that are loaded by your application have a ".Dat" extension. This way when a user double clicks on the file it wont load up in the default program (ready for editing/stealing). If you also change the extension in your code, DirectX will not know the difference - it looks at the data inside the file, not the extension
  2. Watermark your files. This can be done with sounds, music and graphics. Basically it involves hiding copyright data within the actual picture itself - therefore if they steal the picture straight off you can check if it was yours in the first place. This is dependant on which program you are using; look through the help files for more details.
  3. Encrypt. If you dont have the skills to write your own encryption algorithm, you can often find a freeware tool on the internet. Unless it's extremely important, you will not need an incredibly secure enryption method.
  4. Archive your files. You can stick all your files into one big one - which is custom to your program; therefore no one else can read the data. You'll need to unpack a copy of all the files when your program starts, then delete all the temporary files before you finish.
  5. Add a tag. Open up the file in Notepad/Wordpad - It'll probably be complete garbage to most people, but if you add a unique key to the front then it'll corrupt the file. Then; when you load the file, use vb's Binary file access to read the whole file EXCEPT the key and save it to a temporary file - because you know what's wrong with it, you can fix it. For example, put <MYFILE:MyProject©Me> Then remove it again....
  6. Date Checking. Check what date the file was created on or last modified. This way you can detect whether or not the file has been messed around with; this doesn't stop people stealing but it does stop them trying to change your game.
  7. Copyright all your material. This should be a standard process, but some people forget it. Be careful though, if you do it wrong/copyright stuff that's already copyrighted you can get into all sorts of legal confusion...

Or; you can go to the drastic extreme and Sue the person who stole your work. If you hold valid copyright of the material you may well be able to hurt them alot. But that'll propbably be out of the picture for small-time developers.

As you can see it is quite difficult to protect your work, but you may well find that it is worth it. Oh, and there is nothing stopping you from using all 7 of the above tips together......

DirectX 4 VB © 2000 Jack Hoxley. All rights reserved.
Reproduction of this site and it's contents, in whole or in part, is prohibited,
except where explicitly stated otherwise.
Design by Mateo
Contact Webmaster
This site is hosted by Exhedra Solutions, Inc., the parent company of RentACoder.com and PlanetSourceCode.com