Jump to content
The Dark Mod Forums

Game loading delay


duzenko

Recommended Posts

I noticed that when the map loading GUI is shown nothing is being actually loaded for a second or so. It affects quick loads too.

Can we please get rid of the loop since it's useless in TDM.

  • It's really annoying to wait each run when testing code changes.
  • I think everyone will appreciate one less second of loading.

Here's the patch

 

 

Index: framework/Session.cpp
===================================================================
--- framework/Session.cpp    (revision 6635)
+++ framework/Session.cpp    (working copy)
@@ -437,9 +437,9 @@
 
     // introduced in D3XP code. don't think it actually fixes anything, but doesn't hurt either
     // Try and prevent the while loop from being skipped over (long hitch on the main thread?)
-    int stop = Sys_Milliseconds() + 1000;
+    /*int stop = Sys_Milliseconds() + 1000;
     int force = 10;
-    while ( Sys_Milliseconds() < stop || force-- > 0 ) {
+    while ( Sys_Milliseconds() < stop || force-- > 0 )*/ {
         com_frameTime = com_ticNumber * USERCMD_MSEC;
         session->Frame();
         session->UpdateScreen( false );

 


Edited by duzenko
Link to comment
Share on other sites

I noticed that when the map loading GUI is shown nothing is being actually loaded for a second or so. It affects quick loads too.

Could you be more specific?

 

At what point is "nothing is being actually loaded"?

 

Is this when the loading bar is starting?

 

Or during the loading bar working its way from 0 to 100%?

 

Or after the loading bar is at 100%, but before control is handed to the player?

Link to comment
Share on other sites

Serpentine removed "most" of the d3xp code back in January 2012, but left this bit of code in ShowLoadingGui() in place.

 

If he's still reachable, I'd be interested in his reasons for leaving it.

 

The code prior to his edits was:

 

void idSessionLocal::ShowLoadingGui() {
	if ( com_ticNumber == 0 ) {
		return;
	}
	console->Close();

	// introduced in D3XP code. don't think it actually fixes anything, but doesn't hurt either
#if 1
	// Try and prevent the while loop from being skipped over (long hitch on the main thread?)
	int stop = Sys_Milliseconds() + 1000;
	int force = 10;
	while ( Sys_Milliseconds() < stop || force-- > 0 ) {
		com_frameTime = com_ticNumber * USERCMD_MSEC;
		session->Frame();
		session->UpdateScreen( false );
	}
#else
	int stop = com_ticNumber + 1000.0f / USERCMD_MSEC * 1.0f;
	while ( com_ticNumber < stop ) {
		com_frameTime = com_ticNumber * USERCMD_MSEC;
		session->Frame();
		session->UpdateScreen( false );
	}
#endif
}
Link to comment
Share on other sites

Umm...

Sorry, are you saying that since nobody complained then it's ok or what???

I thought that everybody wants loading times as short as possible, not padded with artificial delays - but you sound like I want too much here???

Maybe I should create a poll or something to see if anyone else wants faster map loading :o and how much delay would be "unnoticeable" for average player.

Heck, maybe increase delay to 10 seconds and see if anybody notices.

Edited by duzenko
  • Like 1
Link to comment
Share on other sites

Cool yer jets.

 

We have a 5s wait at the end of map loading so mappers can paint tips on their loading screen should they want to. I don't think this applies to loading savegames, but I doubt it, because most savegame loading happens in less than 5s).

 

My interest in gathering as much info as I can helps me better understand how the delay you want to remove relates to the 5s delay. Nothing more, nothing less. Does it change the delay to 4s, thus affecting tip painting?

 

Had you answered, "This delay occurs at the start of loading" or "this delay happens at the 50% mark", then I'd be less concerned about the above.

 

Since you don't have specific info to clarify this for me, I'll investigate the effect of the patch and be back l8r.

  • Like 1
Link to comment
Share on other sites

 

Sorry, are you saying that since nobody complained then it's ok or what???

 

No, he's asking only for information on questions pointed earlier in post #2.

"I really perceive that vanity about which most men merely prate — the vanity of the human or temporal life. I live continually in a reverie of the future. I have no faith in human perfectibility. I think that human exertion will have no appreciable effect upon humanity. Man is now only more active — not more happy — nor more wise, than he was 6000 years ago. The result will never vary — and to suppose that it will, is to suppose that the foregone man has lived in vain — that the foregone time is but the rudiment of the future — that the myriads who have perished have not been upon equal footing with ourselves — nor are we with our posterity. I cannot agree to lose sight of man the individual, in man the mass."...

- 2 July 1844 letter to James Russell Lowell from Edgar Allan Poe.

badge?user=andarson

Link to comment
Share on other sites

It appears that this is a reasonable change. Testing shows it knocks a second off the loading process, just prior to the loading bar starting its climb from 0->100%. (It doesn't make the loading bar go faster, if that's what folks are thinking.)

 

So it won't affect the 5s delay at the end for displaying tips.

 

From reading the code, it looks like the load screen is painted, and then given 1s to settle down (start any initial animations?) before starting the load process and painting of the loading bar. I'm guessing that's what this extra second was intended to do.

 

But since I don't think we have any load screens that care about that 1s spin-up time (they're static), it looks like it's okay for us to take the 1s out.

 

I'll make a bugtracker issue for it and commit the code change.

 

Thank you!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...