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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 1 reply
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...