Archived

This topic is now archived and is closed to further replies.

hiding .x files

This topic is 5825 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

so we''re using .x files to store our model and animation data. We have no problems with that part, but we''re weary of people ripping off our models right away. What''s a good way to hide or encrypt the files so that poeple can''t steal our models right away? SkullOne - Hero Interactive http://www.hero-interactive.com

Share this post


Link to post
Share on other sites
X files should probably only be used for a game that wants to be edited/ripped off. Like Half-Life. They don''t care as long as you don''t violate copyrights.

If you don''t want people to get modals at all, you will probably need to build a custom file format.

-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.

Share this post


Link to post
Share on other sites
Can''t you load a .x file from memory? Why not store them in some sort of .pak-like file, and then read the model into memory, and load it into DX from there? I just quickly glanced over the DX file functions, and it looks like you can do pretty much anything with them.


-Brannon

Share this post


Link to post
Share on other sites
yeah that''s how i want to do it. what''s a .pak file?
what are some usual good way to pak data together for use later?

I''m even considering storing them on a webserver and having the program get it over an http connection

SkullOne - Hero Interactive
http://www.hero-interactive.com

Share this post


Link to post
Share on other sites
quote:
Original post by zoomcrypt
I''m even considering storing them on a webserver and having the program get it over an http connection



I don''t think it''s a good idea because if the user cant connect to the internet for any reason, he will not be able to play the game. Maybe you could write some sort of program to encrypt your .x file. During runtime, all you have to do is decrypt the file, then you will load the data normally.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The easiest solution is to use zlib to compress the files, there are also any number of ways you can scramble the data, but remember don''t inconveniance yourself more than your foes.

Share this post


Link to post
Share on other sites
Save the x file as text, and use somthing like MD5 or blowfish to encrypt it. Just decrypt it at run-time and use the file to your hearts desire. I wouldn''t do the internet connection idea though. While it is innovative, picture people with a 56k connection trying to download game content. It would take 3 hours just to get the files for one level or area. It might be a good idea maybe 5 years from now when high bandwidth connections will have all but replaced modems, but for now you don''t have too much choice. Why would you want to restrict access to the files anyway? Look at games like Half-life and all of Id''s games. Being open contect hasn''t hurt their popularity at all. In fact its made the games much more popular and people await those companies next releases more eagerly.

Share this post


Link to post
Share on other sites
As far as I can tell, there isn''t much to an .X file, so write a simple app to covert it to a proprietory format. (you could encrypt it if you wanted to be really clever). A lot of games have big PAK files of whatever, storing sound, gfx and models.

http://www.geocities.com/streampark - WayOut Engine v00.2
''That''s it man, game over man, game over'' - Aliens
brb

Share this post


Link to post
Share on other sites
.pak files are what the Quake series uses (and games based off the quake engines). It''s basically just a single file containing a bunch of files and a directory to find the files in the "one big file". You could make a file format, and a "compiler" that would compile your resources into the data file and create the directory pretty easily. Then in your code, you get the offset and size of the file from the directory, and use that to load the file into memory (and then load it into directx using the .x file APIs). This can work for sound/music/textures/levels/models/etc.


-Brannon

Share this post


Link to post
Share on other sites

Are you trying to stop them
1. changing the .x files with their own
2. protecting the .x files from being used


1. if your just trying to stop ordinary users then
pak method will mostly work....add an MD5/SHA1 hash
to the end of each file in the pak..to make it a bit more
difficult.

2. You could also encrypt each file with a private key,
and change your loader code to decrypt each file with a public
key.

They would then have to disassemble your code to get your models as they load into the application.

Cheers
Jaltz


Share this post


Link to post
Share on other sites
There are a number of ways to ensure protection. First, use binary storage format. Second, use bzip format (check the docs). Don''t forget you can create your own templates in .X, so just convert from the current mesh templates into your own. Use a custom loader to load the new data.

Jim

Share this post


Link to post
Share on other sites