Advertisement

Virtual HDD files?

Started by April 18, 2001 08:41 PM
3 comments, last by SikCiv 23 years, 9 months ago
I have created my own data file for my game which stores bitmaps, sound files etc.. When the game needs one of the files from the data file it extracts it to the harddisk, loads it normally as if it was (and is temporarily) a normal file on the HDD, then deletes it. This is slower than loading a file from the HDD normally as the files are created on the HDD, game needs to load about 8 bitmaps when loading a level. Is there a way to create a file in memory and fake the load functions to think it was a normal file on the HDD? Ive tried memory files but they dont have a filename so you cannot load it with file-loading functions. Can I use Resource files? Is it possible to create a temporary resource file sourced from memory data read from my data file, and delete it when ive finished loading it?

  Downloads:  ZeroOne Realm

I have had this idea in my mind for a while to sort of do what you''re talking about. I had done something similar at one point when the operating system of choice was DOS, I had a file that would have everything in it, sound, graphics, etc. I had created a function that would look at the files, read the data in an appropriate struct and then use it as if it were a real graphic, sound file or anything else. You can probably do something like that and it would be faster than extracting the needed part of the file, loading it and then deleting it. Anyhow, hope this helps...



"And that''s the bottom line cause I said so!"

Cyberdrek
Headhunter Soft
A division of DLC Multimedia

Resist Windows XP''s Invasive Product Activation Technology!
[Cyberdrek | ]
Advertisement
I need them as files because the IJL load jpeg files from the HDD, DDLoadBitmap can load resources that why I was wandering about Resource files.

  Downloads:  ZeroOne Realm

You could write a Windows device driver for a non-existant harddisk.

i.e.
An application might request a file from X:\ which is associated with your device driver. The driver then examines the data collection file, unencrypts it (or whatever) and returns the individual item requested.

However, writing device drivers looked pretty complicated when I last considered it.
I''m pretty sure that IJL can load jpeg images from memory as well. Try examining the documentation, IJL is quite open-ended.

--
mvh Rasmus
-- Rasmus Neckelmann

This topic is closed to new replies.

Advertisement