0

(If this has been asked and answered thoroughly somewhere else, please just provide a link to that. Also, if I'm overlooking a much simpler solution, which is quite plausible, please let me know.)

If there is a bunch of data that you want to include in your program but you don't want to actually type in a bunch of stuff but you also don't want to load from a bunch of files that might get deleted or changed by people tampering with them, is there a way to embed the data in your executable file and then read it in the program?

Here's what I'm looking to do: - Save some various 3D models, textures, and large strings. - Load them into memory when the program starts. - Use them in the game with the guarantee that nobody has tampered with the files in an attempt to cheat in the game or accidentally deleted them for any reason.

If there's any way to do this, I'd love to know. Here are the other solutions I came up with: - Save these files in a server. Load them into memory on the client when the program starts using teh internetz. I don't want to do this because it's slow, unreliable, and a pain to implement. Also, it's possible that some guy with too little time on his hands might just decide to go and spend his day nuking the server a bunch, making this idea even less attractive. - Make a set of functions to load all of the resources from a really big string. Make a separate program that turns these various models, textures, and large strings into special hex strings. Paste these strings all together in the source code and then compile. I don't want to do this because it's a lot of hassle and would likely cause a lot of bugs.

4

0 に答える 0