Archived

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

funvill

Preload everything

Recommended Posts

Hello I was wondering what’s a better idea when loading game data such as textures, sound effects and music? a) Load everything at the start, running everything from memory 40mb of textures 36mb of sound effects 20mb of music files Of courses as my game grows I will need to load more and more in to my memory increasing the loading time. b) Load just the stuff that I use a lot and the rest loading off the disk when i need it. Most of the textures, 20% of the sound effects one music file. this would save me some memory and loading time at the start but i would have to seek the disk a lot witch would slow down the program a lot

Share this post


Link to post
Share on other sites
You could be loading the information continuously in the background; as the user gets near an area, load the information in small chunks so the user doesn''t notice, and make it seem like a huge 3D world. =)

Share this post


Link to post
Share on other sites
I think it depends a lot on how your game is structured. Don´t bother going for a sophisiticated on-the-fly solution when you have clearly defined levels or floors.
Also, you can mask load times by displaying either scores, objectives or bits and pieces of story.

If you really want a continuous game world I would still consider using some sort of segregation between the areas (or at least game areas where there is less necessary interaction than usual) which you use as load points. If there isn´t much to do then the player won´t notice the slowdowns as much.
There have been a few games which have done this more or less successfully, although as far as I recall there used to be performance issues in most cases, at least on lower end computers.
The usual method is to divide your game world into (fairly small) segments of which you always load 5 (assuming a planar game space). If the player moves into an adjacent segment the data for this segment is already loaded - and you have some time to load the necessary other three in the background.

Share this post


Link to post
Share on other sites
there''s always a more efficient way..

continous loading is probably the way to go. all that would need to be loaded at startup is a map of coordinates corresponding to properties of the map. when the player comes within a certain distance of those coordinates the properties are loaded automatically...models & textures, music, fx, terrain, etc.

of course, it really all depends on how large your map is. if you''re working over a large area, like i am, then continous loading is ideal. but if it''s a smaller, more enclosed space, then you might want to load it all once.

Share this post


Link to post
Share on other sites
There are compromise methods. For example, you could load in all your data at the beginning, but only uncompress it when you need it.

A lot of it depends on what you''re accessing from, I think - any loading system ought to take that into account. Stuff being loaded from the ''net should probably be preloaded, while stuff from CD would more likely load faster when in the middle of the game.

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
ry. .ibu cy. .abu ry. dy. "sy. .ubu py. .ebu ry. py. .ibu gy." fy. .ibu ny. .ebu

Share this post


Link to post
Share on other sites
I''m tired so i don''t know if it was said yet... but there''s the Grand Thelf Auto way. Load things in the backgound when you approach areas. Dungeon seige did this too. It felt like one continuos level. I''m unsure as to how but it''s something to look into. Again it all depends on what the game needs,

Share this post


Link to post
Share on other sites
You should take a look at Soul Reaver (PC, Playstation, Dreamcast) and Soul Reaver 2 (PC, Playstation 2). Both games have no load screen between the areas, and using background asynchronous loading.

Share this post


Link to post
Share on other sites
I think preloading works more like a pipeline, you need to guess from the play style to preload as much up to the point the players'' RAM allows. Since RAM is precious when the game grows in size, load on-the-fly is needed to better manage the memory usage.

So I think the extent of pre-loading depends on the pattern of how your game''s gonna eat up memories.

Share this post


Link to post
Share on other sites