Archived

This topic is now archived and is closed to further replies.

bobatefrei

Fast data loading and Shenmue

Recommended Posts

Yesterday, I''ve play to Shenmue on Dreamcast. I was impressed by the number of details, textures and the speed of the loading (Dreamcast have only a 8x cdrom). Actually, I''m writing an aeroplane game and I need to load a lot of data (heightmap, colormap, textures, object, mp3, wav sound...): approximately 16mo for each level. What is the best way to speed up loading time? What is the fastest image format? How do I have to use archive (zip? rar? ace?) ?

Share this post


Link to post
Share on other sites
best way to speedup loading times.

load less data
eg take an 16mb uncompressed image.

whats faster compressing it to 4mb or loading the uncompressed 16mb straight off the disk?
it depends on if the cpu can uncompress the image in the time it takes the HD to load a 12mb image than using compression will be quicker else storing the image uncompressed would be quicker.
as u can see this is very dependant on what CPU/HD the person has, so theres really no hard and fast answer.

to upload textures to gl quickly use the packed pixels extension
with heightmaps are u storing the heights as floats if so use a format that uses less memory eg shorts or unsigned bytes

Share this post


Link to post
Share on other sites
Work on your own filetype. Basically all you need to do is load in the image data, and save all of
it that you need during run-time into a file, that way when you''re ready to load, you''re only loading
the essentials that you absolutely need.

------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials

Share this post


Link to post
Share on other sites
Work on your own filetype. Basically all you need to do is load in the image data, and save all of
it that you need during run-time into a file, that way when you''re ready to load, you''re only loading
the essentials that you absolutely need.

------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials

Share this post


Link to post
Share on other sites
Thank for your answer...

My heightmap use unsigned byte data.

Actually, I use TGA texture, so I must swap the rgb bytes. I think I may write my own image format...

My game is designed for Duron 700 Mhz and must run from cdrom, so I think I will use this technique:

Pack every data of one level in a compressed archive, textures in JPEG. I will load the entire archive in memory and decompress everything in RAM.

Good?

I don''t have time to create my own archive format. Is there nice free libs who could help me?

Share this post


Link to post
Share on other sites
theres an old example on my site not to sure what it does but.
using packed pixels u supply the image data in a ''packed'' format eg
UNSIGNED_SHORT_4_4_4_4_EXT so u use one ushort for the whole RGBA pixel instead of what youre doing now which is perhaps 4 ubytes.
check out the extension from www.opengl.org for further info

Share this post


Link to post
Share on other sites