Page 1 of 1

Loading/Progress Bar?

Posted: Tue Mar 01, 2005 9:09 am
by Falco Girgis
Tvspelsfreak (or JSL if he'd know), is there any way to know how much of something the DC has loaded at a certain point in time?

I think it'd be pretty badass to have a progress bar on Null when you load each level.

If you can't tell how much of something you've loaded, you could always do the cheap way like this, right?

Code: Select all

load something
increase bar
load something
increase bar
load something
increase bar

Posted: Tue Mar 01, 2005 10:19 am
by Tvspelsfreak
Your levels will probably load fast enough to eliminate any need for a progress bar.

Posted: Tue Mar 01, 2005 10:32 am
by JS Lemming
The thing is, if you wanted super smooth load barage, you would need to physicaly rewrite the actual loading function (unless you used interupts) because you can't do anything until the image is finished loading. The new function would have to load a few bytes then update the progress bar, then load some more bytes and so on...

Then again, if you have alot of small images to load, it won't look that bad doing it the cheap way. If you do choose to do it the cheap way, make sure you base everything off percentages instead of just "increase bar length 5 pixels" after each image is loaded.

Posted: Tue Mar 01, 2005 3:40 pm
by Falco Girgis
Yeah, when you think about it the levels might load fast enough to make a load bar useless, but it still doesn't eliminate the 1337ness.

Think about it. We've been having ~100 PNGs for tiles in each level. Then, the level has music...

Probably still won't require a load bar, but what happens if a user tries to load a kajillion PNGs with some huge ass sound file?

I wouldn't want the DC to just sit there so they think it's a glitch or it froze.

I'm thinking that if I do decide to use a progress bar, it could see how many files it'll have to load and see how many pixels the bar will be required to increase after each file is loaded in order for it to fill up the bar and not go over.

I just think a progress bar would look flippin' awesome.

Code: Select all

Entering level: "Gemini Salsa"
Loading:
+---------------+
|-------      |   46%  
+---------------+
0 (fancy spinning Null)
Then we could have fancy sonic looking thing that says Act 1 while it loads. XD

Posted: Sun Aug 14, 2005 1:13 am
by Falco Girgis
js lemming wrote:The thing is, if you wanted super smooth load barage, you would need to physicaly rewrite the actual loading function (unless you used interupts) because you can't do anything until the image is finished loading. The new function would have to load a few bytes then update the progress bar, then load some more bytes and so on...

Then again, if you have alot of small images to load, it won't look that bad doing it the cheap way. If you do choose to do it the cheap way, make sure you base everything off percentages instead of just "increase bar length 5 pixels" after each image is loaded.
Ahhh... Just surfing through the good ol' topics of the upper forum (dev forums, nobody cares anymore). Well, I proved you wrong, JSL. :spin:

Posted: Wed Aug 31, 2005 6:10 pm
by MarauderIIC
Oh? Howso? I was thinking you'd really need to do it based on filesize of loaded files/total filesize to load, not # of files loaded to make it more accurate.

Posted: Wed Aug 31, 2005 6:29 pm
by Falco Girgis
That's actually what I did. I just read and wrote bytes to and from a buffer. Like putting a file from the CD or PC into ram. Just do it a certain number of bytes at a time.