Effect files

Started by
2 comments, last by Jiia 18 years, 10 months ago
hi Effect files are increasingly being used by applications, now the question is that can I use binary files (I mean not ascii files such as .FX files) for effects? because using the ascii format enables everyone to change our effect and it is not good. Also is there program that I can take advantage of for compiling and assembling effect files? thanks in advance galaxyroad.com
Visit galaxyroad.com which soon will have english contents too
Advertisement
The DirectX SDK comes with an effect compiler fxc. Look for it in the utilities directory and look for indformation about it in the documentation. If you really want to keep people out of your application data consider using some sort of encryption.
I agree. Although leaving effects just sitting in a folder may seem harmless (only use graphics dudes know them, right [wink]), it's not very desirable to have your shaders stolen and game tampered with (maybe hacks).

Nowadays, many games use a unified resource system. All of the games files are stored in one big archive (exactly like a zip file), so that people can't poke at the game's resources. It seems to work pretty well, but it's a bit of work to implement.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
You can get by with a pretty crude system. Just write a small program that scans a single directory and creates a list of { filename, size, byte offset } nodes. Save this list as the header, then save each file's byte data. You could also convert or compress the files as you store them. In your game, you would have to scan the header list for a filename and seek to it's offset. You also have to convert all API loading methods to FromMemory type methods.

I would recommend supporting both normal file loading and the datafile loading in your engine. It will be a pain having to recompile your datafile every time the content changes during development.

This topic is closed to new replies.

Advertisement