Jump to content
The Dark Mod Forums

Progress Bar for Loading Screen


Springheel

Recommended Posts

I'm working on the loading screen and I'd like to do something other than the typical progress bar.

 

What I'd like to do is have a series of images that are revealed in sequence as the loading progresses. Essentially a series of if/then instructions. I'm not sure how to work in the "gui::map_loading" variable, however.

 

Is it possible to do something like the following?

 

if ("gui::map_loading" = 0.1) {
		transition "BlackFade::backcolor" "0 0 0 1" "0 0 0 0" "400";
				}

if ("gui::map_loading" = 0.5)	 {
		set "TextLoading::text" "LO";
	}

 

etc?

 

And what is the numerical range of "gui::map_loading"? Is it 0-1?

Link to comment
Share on other sites

Checking for exact equality in this case may not work how you expect it to, because the code is quite likely to skip over the value; one frame might be 0.09 and the next frame could be, say, 0.14. Skips right over 0.1. Instead, you could use a series of if/else statements with less-than comparisons, like this:

 

if ("gui::map_loading" < 0.25) {
//...
} else if ("gui::map_loading" < 0.5) {
//...
} else if ("gui::map_loading" < 0.75) {
//...
} else {
//...
}

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

I'm typing this out at work so I can't test it, but am I right in assuming that the if condition is updated every time the "gui::map_loading" value changes? In other words, if I include one statement like:

 

if ("gui::map_loading" < 0.5) { dance }

 

else if ("gui::map_loading" > 0.5) { sing }

 

the gui would dance until the map_loading value hits 0.51, at which point it would start to sing?

Link to comment
Share on other sites

Cool, I've got it working. Just have to finish the rest of the graphics and I'll be able to upload it tomorrow.

Link to comment
Share on other sites

Ok, I uploaded a loading screen for the release map. It could use a little tweaking here and there, but let me know what you think.

 

One thing I'd like to add is a 'drip' sound, but I don't know if it's possible to add sounds to a loading gui. I tried the following:

if ("gui::map_loading" == 0.25) {  set "cmd" "play sound/meta/menu/mnu_select";}


 else if ("gui::map_loading" == 0.35) {  set "cmd" "play sound/meta/menu/mnu_select";}

 

but got no result.

 

The other somewhat annoying thing is that the loading bar finishes LONG before the map is actually ready to start, at least on my system. Not sure what to do about that, unless the value of loading_gui actually does go higher than 1.

 

Oh, there will eventually be flavour text along the bottom.

Link to comment
Share on other sites

Looks great! When I first realized what the "loading bar" was, it kind of freaked me out. I'm sure that was the intent. :)

 

There was a long pause after the loading bar finished on my machine too. It took about as long after the bar finished as before (about 2 mintues each way). Don't know if there's any way around that.

 

Your drip sound script, maybe you need to use the < comparison (not ==) like Crispy said.

Link to comment
Share on other sites

Your drip sound script, maybe you need to use the < comparison (not ==) like Crispy said.

 

I'm not sure how to make it sync up with the drips that way, however.

Link to comment
Share on other sites

I'm not sure how to make it sync up with the drips that way, however.

 

Can you use something like "and" or "&&"?

 

Them make it

 

if ("gui::map_loading" > 0.25 && "gui::map_loadin" < 0.26) {  ... }

 

However, this has the same effect, if the map_loading var skips from 0.23 to 0.27, the sound is never played.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Looks like sound is not permitted while a map is loading. I added a timer to the saintlucia gui, and verified that it worked by having the timer change the visiability of a background (just as a test). But when I had the timer try to make a sound, it didn't work. This makes sense -- if you start TDM and then bring up the doom command prompt, the music keeps playing. But as soon as you type "map <mapname>", the music stops. I suspect map loading shuts down all sounds. At least, that's my theory.

 

*edit* And the Doom3 SDK agrees with me :rolleyes: . See http://www.iddevnet.com/doom3/, scroll down to 01/31/05 Map Loading:

 

" When you issue a "map" command, the following process happens:

  • Mute Sound System
  • ...

Link to comment
Share on other sites

If it is somewhat important, one could experiment with the idSoundWorld class during map load. The interface has a function like this:

// it is a good idea to mute everything when starting a new level,
// because sounds may be started before a valid listener origin
// is specified
virtual void			SetMute( bool mute ) = 0;

It may be experimental, but one could set a listener origin at the player's origin or 0,0,0 during map load, but it will be a hackish solution either way.

Link to comment
Share on other sites

Yeah, I don't think it's that important, personally.

 

Should I assume from the general lack of comments that people haven't loaded the map? Or is there just general ambivelence about the design?

Link to comment
Share on other sites

Yeah, I don't think it's that important, personally.

 

Should I assume from the general lack of comments that people haven't loaded the map? Or is there just general ambivelence about the design?

 

I don't have net access on my main PC and the laptop has net but can't play D3, so, no, sorry, I haven't loaded it yet :( Hopefully can try on Friday.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Should I assume from the general lack of comments that people haven't loaded the map? Or is there just general ambivelence about the design?

Do you mean specifically about the loading image(s)? If so, yep I've seen it quite a few times this weekend. :) Just to confirm: I only see one background image (it doesn't change), and the blood splatter progress is very cool, apart from the unfortunate fact that Doom3's loading progress is always woefully inaccurate (:()... wish we could address that somehow. I think I recall someone saying it's more accurate when the PAKs are unpacked, but that doesn't seem to help here. And I see discussion of ambient sound/music during; that would also be cool, if it can be done. Maybe just ambient creepiness (e.g., chosen by map author) as opposed to the theme yet again.

 

Anyway just rambling thoughts.

Link to comment
Share on other sites

apart from the unfortunate fact that Doom3's loading progress is always woefully inaccurate

 

Yeah, I wish something could be done about that, but I'm not sure what...I tried the same loading screen on a smaller map and it didn't have all the extra loading time, so it's not the actual values in the gui that are the problem.

Link to comment
Share on other sites

I haven't tried it yet, but synching now...

 

 

As for the loading screen, I wonder if it would be possible to do something similar to Assassin's Creed, where it loads the map essentially in the "background" and has a 3d loading environment where you can move around in normally etc. Dunno how we could do this apart from running another D3 process in the background and then switching to it. Either way it's probably too much time for little gain.

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

      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
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...