Reduced loading times in future games...

Started by
13 comments, last by ALiENiD 21 years, 10 months ago
These DDS-files... are they DirectX-only or can they be used in OpenGL? I''m planning to use OpenGL as the primary API. Anyway, I''ll keep the DDS-files in mind...
Advertisement
1. Use an archive/wad/pack file. Open the file once at the start of the program - opening files is expensive - particularly on "secure" operating systems (Windows NT/2000/XP).

2. Where possible, sort the contents of the pack file in order of access, even if your access is seemingly random, there might be an access pattern which is more likely than others.

3. If you have portals, you can load on demand - but try and do some prediction so that likely cells data is loaded ahead of its portal being visible.

4. Consider LOD for the data in the cells - load the low LOD data for all cells neighbouring the current one - so even if the player takes an unexpected path, you can still show them something on screen and be loading the high LOD data while they approach the cell.

5. Compress the data - all of it - for geometry, pre-process the float values or LZ style compression won''t do much for you (the paper on the Java3D compression schemes might give you some ideas though the overall technique is patented). The CPU is always faster than any file access so compression is desirable.

6. If the data can be read from CD, take extra care to sort the pack file well - however some things like movies might do better on a different part of the CD. Look up "Constant Angular Velocity" - due to the physical nature of CDs, the data on them can be accessed at different rates at different parts of the disc. Seeks on CDs are very expensive - don''t do them unless necessary.

7. Use asyncronous file IO. However, beware that a) it doesn''t work on Windows95, only on 98 and above, b) some drivers for old hardware such as CD drives may say they support async mode and then end up stalling on data reads.

8. The fastest way to access a file under Windows is to hijack the virtual memory system. Check out CreateFileMapping(), MapViewOfFile() etc. Its also really nice too because the mapped sections of the file automagically become valid blocks of memory.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Um... *ahem* ...this has all been done.
Thanx for all the replies! I''ll start designing right away =)
quote:Original post by Omaha
Um... *ahem* ...this has all been done.


Indeed, many of it years ago, many of it researched in greater depth by non-game parts of the industry (database apps for example)...

...but not by the original poster :

quote:Instead of coding, I read a lot before, so I know what my future game engine will do and not do befode I start






--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

This topic is closed to new replies.

Advertisement