Loading/Progress Bar?

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Loading/Progress Bar?

Post 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
Tvspelsfreak
Chaos Rift Junior
Chaos Rift Junior
Posts: 272
Joined: Wed Sep 29, 2004 5:53 pm
Favorite Gaming Platforms: NES, SNES
Programming Language of Choice: C/C++
Location: Umeå, Sweden
Contact:

Post by Tvspelsfreak »

Your levels will probably load fast enough to eliminate any need for a progress bar.
User avatar
JS Lemming
Game Developer
Game Developer
Posts: 2383
Joined: Fri May 21, 2004 4:09 pm
Location: C:\CON\CON

Post 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.
Small girl at the harbor wrote:Look Brandon, that crab's got ham!
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Post 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
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Post 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:
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Post 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.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Post 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.
Post Reply