Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Load a file through a data array instead of an actual file.

Author
Message
BDev338
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location:
Posted: 5th Dec 2010 21:52 Edited at: 5th Dec 2010 23:39
Hey game developers!
This is my first post on your forum, and I recently just started my own little game project.
It's going to be an online 3D game, where you can join a team and the objective is to kill the other team. Very simple, and anything but original .
Anyway, you're going to have to download & install the game client to be able to play the game. When installing the game, the setup will save all the media on the computer, compressed in my own archive format. At startup the game client will decompress the cache, but I would rather avoid actually unpacking the archive, creating the files on the computer.
So I would like to know if it's possible to load game media through byte arrays or something like that.
Let's take the dbLoadBSP function for an instance. This function takes to strings as parameters each representing a file name. Is it possible to load a BSP without having to unpack the file to a "psychical" file first?

Best regards,
Benjamin.

In the world of Computer science the term user, means idiot.
BDev338
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location:
Posted: 7th Dec 2010 16:37
I guess not then?

In the world of Computer science the term user, means idiot.
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 7th Dec 2010 19:07 Edited at: 7th Dec 2010 19:13
Well, for some media, for example images, it should be possible to create a memblock, then save the memblock in any format you want, and when loading back, create image from memblock. This does not work for everything though. I once experimented with saving animated models this way but it didn't work because I could only create a memblock from the first mesh, not the other animation frames, and even for the first frame, I didn't always manage to reload it. I guess you need to be very-very proficient in Dark GDK internal object formats to be able to do something like that.

There are programs that create a virtual file system on disk, so all your files go into one compressed file, and the program can read the compressed archive as if it were a real directory structure. Maybe that's what you need. Here is one such program sold by TGC:

http://www.thegamecreators.com/?m=view_product&id=2256

This application is also mentioned in newsletters 90, 91, 92.

There is a program announcement thread which is probably the same product and it says there is a free version too:

http://forum.thegamecreators.com/?m=forum_view&t=156410&b=5

I read somewhere that using such pograms may require administrator access on the computer, at least for installation, because they have to act between the file system and the application. I don't know if that's true for this program.

Login to post a reply

Server time is: 2024-11-19 16:47:28
Your offset time is: 2024-11-19 16:47:28