There's already a system for putting resources into EXEs and DLLs, and
you can access them easily from code. As long as you don't mind your
resources paging in ala a memory mapped file, its good to go.
The data as I recall is also read-only (not sure?), so if you do any
pointer patching or whatnot, that might not work. Of course if you are
just going to unpack to another section of memory, that's moot.
-Dan
Jon Watte wrote:
> When downloading a program from the interwebs, I typically get a
> self-extracting EXE. It creates a number of CAB files and a setup.exe on
> my hard disk. It, in turn, will extract the cabs or msis into the
> install location. This means that I need three times the storage space
> on my hard disk, which for a laptop and modern 4G+ games sometimes is a
> problem (and will be more so once flash drives become commonplace!)
>
> Is there any real reason why you can't bundle all your game assets into
> the .EXE file in the first place? Thus, when downloading, you don't even
> necessarily need an installer (although the Windows model of an
> installer right now pretty much requires at least 2x the storage space).
> After the PE executable data, if I create my own section/sections, could
> I store more than 2 GB or 4 GB of data? Will the OS be unhappy because I
> have such a large image? (I would assume not, given that the
> self-extractors seem to work fine)
>
> If this is feasible, why does nobody do this?
>
> Cheers,
>
> / h+
>
>
|