Once could imagine getting some map loading speed by getting the map data and 
other resources into the disk cache so that when an actual map-load happens, 
the amount of disk i/o needed is reduced.
So, you wouldn’t tell the engine to do anything with the bsp file to preload 
it.. rather, you’d open the map file and just read all the bytes out of it, 
throwing them away. Then, when the engine later tries to load that map,
chances are that the file operations would be much faster.

This would only reduce the part of the load time which is related to reading 
data from disk, not that part which involves CPU processing of the data loaded. 
But it would probably make your map load time closer to the time you see when 
the map has been loaded before.


From: hlcoders-boun...@list.valvesoftware.com 
[mailto:hlcoders-boun...@list.valvesoftware.com] On Behalf Of Tom Schumann
Sent: Tuesday, January 15, 2013 1:55 AM
To: Mart-Jan Reeuwijk; Discussion of Half-Life Programming
Subject: Re: [hlcoders] Pre-Loading Maps

I thought that the map was kept in memory after in was loaded by design (I 
don't know for sure though).
I remember it being brought up at some stage - someone wanted that behaviour 
removed so they wouldn't have to restart the game every time they recompiled a 
map.

I'm not sure about preloading materials but I saw this in the Alien Swarm 
source: CBaseEntity::PrecacheModel("sprites/gunsmoke.vmt");
So I suppose the PrecacheModel function should work for materials too.
On 15 January 2013 01:26, Mart-Jan Reeuwijk 
<mreeu...@yahoo.com<mailto:mreeu...@yahoo.com>> wrote:

Prolly some OS caching after access.
________________________________
From: "tja...@comcast.net<mailto:tja...@comcast.net>" 
<tja...@comcast.net<mailto:tja...@comcast.net>>

To: Discussion of Half-Life Programming 
<hlcoders@list.valvesoftware.com<mailto:hlcoders@list.valvesoftware.com>>
Sent: Monday, 14 January 2013, 14:47

Subject: Re: [hlcoders] Pre-Loading Maps

That's a shame. I did look through zone cpp/h but it might be over my head, 
when it comes to memory allocation.
Also, from what I've heard -heapsize command line doesn't matter anymore with 
orange box. So I'm not sure if that file is still relevant.

Is there any cheap tricks to help performance? I'm bouncing between maps, and 
users are getting frustrated with load times.

I do have a benchmark time that shows how long a map takes to load (grab 
curtime from preload and compare with curtime in postload. not sure how 
accurate) and I noticed if the map has been loaded before it takes half the 
amount of time to load.
So something is staying in the memory.
________________________________
From: "Jonatan Matějka" <jonatan1...@gmail.com<mailto:jonatan1...@gmail.com>>
To: "Discussion of Half-Life Programming" 
<hlcoders@list.valvesoftware.com<mailto:hlcoders@list.valvesoftware.com>>
Sent: Monday, January 14, 2013 8:19:43 AM
Subject: Re: [hlcoders] Pre-Loading Maps

Hi,
if there were not significant changes in engine after HL2 alpha leak, there is 
no way to load nextmap before mapchange. You can precache it, but it will be 
trashed on mapchange anyway. If you own leaked source, take a look at 
zone.cpp/h where you can take a look for yourself.
2013/1/14 Trevor Janok <tja...@comcast.net<mailto:tja...@comcast.net>>
Hello HLCoders.

I have no idea how Source loads/renders the BSP levels. Since I assume most (if 
not all)  of this is done in the engine which we don’t have access to.
But is there anyway to load a BSP into “memory” so the client can switch maps 
faster?

I mean, if you’re running on decent hardware Source maps load fast. But it 
would be nice to start “preloading” maps when players near completion of the 
current level.
The gameplay of my mod would help greatly from this, as maps are broken up into 
multiple levels running on a master server.

I guess I can’t really assume what it’s “preloading” as I’m not sure of what 
Source is doing when it’s switch to a different map.

Anybody have any insight? Thanks.

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders

Reply via email to