PACKAGING GAME FILES TO USE WITH IRRLICHT
PACKAGING GAME FILES TO USE WITH IRRLICHT
kes the game slower.
Last edited by Lprd2007 on Tue Jan 05, 2010 2:57 am, edited 1 time in total.
Why it's out of date packaging game files? Did you saw the game textures and meshes, of a commercial game, like The Sims, or Colin Mc Rae, or Max Payne in the original format? The commercial games developers usually save their game files in a file to avoid that the users copy the game files.dlangdev wrote:packaging game files --> soooooo 90's. that passseeeee!
man, i hope you're doing fine now.
Anyway, keeping the files in the original format (GUI images, etc), it's from 90s!!
-
- Posts: 368
- Joined: Tue Aug 21, 2007 1:43 am
- Location: The Middle of Nowhere
-
- Posts: 368
- Joined: Tue Aug 21, 2007 1:43 am
- Location: The Middle of Nowhere
-
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact:
For some actual help, check anywhere online about c++ -> games -> file packing.
file 1 contains (lets say, 8 blocks of data)
File header
1_1
1_2
1_3
1_4
1_5
1_6
1_7
1_8
2_1
2_2
2_3
2_4
2_5
2_6
2_7
2_8
Use normal file reading, and normal file writing. GetFile(fileIndex) will return the data as a type right? so its like, getFIle (2) will return an image, or zip file etc etc. Its pretty much generic file processing, and there are millions of references online about it.
file 1 contains (lets say, 8 blocks of data)
File header
1_1
1_2
1_3
1_4
1_5
1_6
1_7
1_8
2_1
2_2
2_3
2_4
2_5
2_6
2_7
2_8
Use normal file reading, and normal file writing. GetFile(fileIndex) will return the data as a type right? so its like, getFIle (2) will return an image, or zip file etc etc. Its pretty much generic file processing, and there are millions of references online about it.
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Heh, like ".pk3" files; see example 02.Quake3Map.
For SUPAR SEKRIT SECURATEE, you could change the 4 byte magic header in your .zip file, then make a teeny modification to CZipReader::scanLocalHeader() to scan for that header instead of 0x04034b50. Most apps then won't recognise the .zip, even if they correct the extension.
For SUPAR SEKRIT SECURATEE, you could change the 4 byte magic header in your .zip file, then make a teeny modification to CZipReader::scanLocalHeader() to scan for that header instead of 0x04034b50. Most apps then won't recognise the .zip, even if they correct the extension.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Another reason is the faster load times, opening one file and fread-ing at different offsets(stored in the programs ram) is allot faster than opening lots of files using fopen. The difference matters even more on cd`s where the TOC is so far from the data and seeking is slow.
"Irrlicht is obese"
If you want modern rendering techniques learn how to make them or go to the engine next door =p
If you want modern rendering techniques learn how to make them or go to the engine next door =p
Can anyone say UMD? Effing terrible read times Luckily the clever chaps at Sony came up with a TOC cache basically which sped up file reading incredibly so more recent games on PSP use this.
It's also much quicker to just read the whole file (or a large chunk of it if the file is too big to stick in memory) and then process the buffer rather than multiple file reads which are prone to stalls and the like.
It's also much quicker to just read the whole file (or a large chunk of it if the file is too big to stick in memory) and then process the buffer rather than multiple file reads which are prone to stalls and the like.
-
- Posts: 208
- Joined: Sun Apr 02, 2006 9:20 pm
I believe your looking for the addZipFileArchive() command, simply zip your media files up call this command and then load the files as if they were in your current directory.
Obviously it needs to decompress the media from the archive but I haven't seen any noticeable performance degradation.
It is particularly useful where there are sometimes many hundreds if not thousands of small media files wasting disk space and being troublesome to move about.
Obviously it needs to decompress the media from the archive but I haven't seen any noticeable performance degradation.
It is particularly useful where there are sometimes many hundreds if not thousands of small media files wasting disk space and being troublesome to move about.
If that's an issue then you can store the files uncompressed in the zip file.Frank Dodd wrote:Obviously it needs to decompress the media from the archive but I haven't seen any noticeable performance degradation.
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781