SFML community forums
Bindings - other languages => C => Topic started by: mimipim on January 30, 2011, 12:47:46 pm
-
Hi guys.
I'm developing a 2D game. That I need is to load images from exe(wheres the game start) or from any filetypes which can't be edited.
How can I do this?
-
You can have GIMP compile an image into a header file.. Though they tend to get pretty big.
That should work on any OS that SFML supports.
-
Thanks for your reply.
If anyone has another suggestion, let's share it. I want to know all the possibilities.
PS.: Game will be only for windows.
-
People can extract and edit your resources no matter what you do. Resource hacker makes it easy to get bitmaps embedded as resources. You're better off leaving PNG files in a content folder in your exe directory and not worrying about it.
-
Okay but can I use some other formats, to put all images on one or something like this. Because I don't wanna to be visible so easy the images.
-
My engine uses a package system, a file that contains other files, you could do something like that, just copy all the files into one in brute, and add a header so you know what is what ;D
-
If people want your resources they will take them no matter what you do. If you really don't want them messed with then embed them at the end of your exe, encrypted, in a complex custom package format.
-
An executable image is a file that acts like a "virtual disk"; when you open the file, it acts as though it is a disk drive.
It's a variation on file compression, such as ZIP or RAR files. Executable images are very common in the Linux / Macintosh world -- most programs installers are contained in executable images, for example -- but less common in the Windows world.
Cegonsoft (http://www.i3itpeople.com/)
_________________________
Cegonsoft foundation (http://www.i3itpeople.com/)