How do you attach files to the end of a .exe?
In all the professional games, most of the time the developers attach there textures and bmp files and voc files to the end of there .exe ... This would stop alot of people editing files that you don''t want people to be editing.
How do you do this...???
~Spike
You can contact me at
Luke1Howard@hotmail.com
~SpikeYou can contact me at luke_howard@dingoblue.net.au
Hiya,
That''s quite easy...
Originally, for old DOS programs, you would just append the data to the end of the file. You need to know where in the file this data starts, so maybe make the last DWORD of the .exe file contain the offset of this data. If you are using a lot of images/texture or whatever, then you''re going to require some form of file system (someone put an article here about resource files, that might help you here)
I recommend you write a program to append this data to the end of the .exe, and write some code to retrieve this data which can be included in whatever program you want.
I would recommend you be pretty careful with this, in fact, it might be better just to use another file (like I say: see the resource files article posted here recently)
Of course, Windows 95 programs include resources in the exe header (or something like that) but this can be edited by anyone (you could encrypt the data, but I wouldn''t bother!)
George.
That''s quite easy...
Originally, for old DOS programs, you would just append the data to the end of the file. You need to know where in the file this data starts, so maybe make the last DWORD of the .exe file contain the offset of this data. If you are using a lot of images/texture or whatever, then you''re going to require some form of file system (someone put an article here about resource files, that might help you here)
I recommend you write a program to append this data to the end of the .exe, and write some code to retrieve this data which can be included in whatever program you want.
I would recommend you be pretty careful with this, in fact, it might be better just to use another file (like I say: see the resource files article posted here recently)
Of course, Windows 95 programs include resources in the exe header (or something like that) but this can be edited by anyone (you could encrypt the data, but I wouldn''t bother!)
George.
George. F"Who says computer games affect kids, imagine if PacMan affected us as kids, we'd all sit around in a darkened room munching pills and listening to repetitive music....uh oh!"
Well nowadays most games use resourcefiles for sound/graphics/map data.
Take a look at the article about resourcefiles posted some weeks ago at this site.
Take a look at the article about resourcefiles posted some weeks ago at this site.
Death is lifes way saying your fired.
Thanks guys,
I did read alot of that article, and am going to start using that knoledge in my games.
Just outa curiosity, when you do attach files to the end of a .exe, do you then have to know how big the file was before attaching those files, so when program execution reaches that point, you can rewind a pointer that points to the poistion in the .exe...???
It would be nice to know how to do it, but I guess It is something that is not crucial...
Thanks again...
~Spike
You can contact me at
Luke1Howard@hotmail.com
I did read alot of that article, and am going to start using that knoledge in my games.
Just outa curiosity, when you do attach files to the end of a .exe, do you then have to know how big the file was before attaching those files, so when program execution reaches that point, you can rewind a pointer that points to the poistion in the .exe...???
It would be nice to know how to do it, but I guess It is something that is not crucial...
Thanks again...
~Spike
You can contact me at
Luke1Howard@hotmail.com
~SpikeYou can contact me at luke_howard@dingoblue.net.au
February 10, 2000 01:50 AM
Why even go through the trouble of attaching them on the end of
your executable? This was used for small-sized games like old
DOS games. In the end, there was just one file, your executable
and no other files were required.
Just stick them into a separate .dat file or something like that.
It makes no difference. People are gonna to rip apart your data
files with hex editors anyway if they really want to get at your
graphics and sound.
your executable? This was used for small-sized games like old
DOS games. In the end, there was just one file, your executable
and no other files were required.
Just stick them into a separate .dat file or something like that.
It makes no difference. People are gonna to rip apart your data
files with hex editors anyway if they really want to get at your
graphics and sound.
Another way to look at it is why try protecting the graphics/sounds ect at all? I mean putting them all in one file is usefull for space reasons and organization,but i dont see where it is a big issue if the user changes your graphics,or sounds. He''ll use what he has changed or reinstall the program. Look at starcraft or quake or heroes of might and magic 3 theres all stuff a person can changed. So i say dont worry about it. I use resource type files to prevent from having a bunch of directorys and a bunch of files that take up more room than one file.
Lets get something straight here, I did not want to know how to do it to implement it into my own code, but rather to see how it all worked in with itself. It was just sheer curiousity, thats all...
Thanks anyway...
~Spike
You can contact me at
Luke1Howard@hotmail.com
Thanks anyway...
~Spike
You can contact me at
Luke1Howard@hotmail.com
~SpikeYou can contact me at luke_howard@dingoblue.net.au
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement