Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Loading Bars!!!

Author
Message
BluEarth Software
20
Years of Service
User Offline
Joined: 13th Nov 2004
Location:
Posted: 14th Feb 2006 23:15
I was wondering how you can make loading bars(like the one in all the install wisards, minus the percentage) that would actually represent the progress of the game loading.

I have looked at code for one, and I noticed that:
It was printing [] every seccond
It wasn't "graphical", it was text(aviously)(were's spell check when you need it!)

Open to ALL suggestions

BluEarth Software
20
Years of Service
User Offline
Joined: 13th Nov 2004
Location:
Posted: 14th Feb 2006 23:17
Oh yeah, I am running DBC, and I can't get those enhancements to work anymore...

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 15th Feb 2006 11:32
perhaps the box command - that's how I do them - each time a new object is loaded, make the "right" value a little higher until all the object are loaded.

This does involve only loading one object/sound/texture etc. each time around the loop though
Yskonyn
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: Netherlands
Posted: 15th Feb 2006 13:01
___ this indeed works for small projects. If you have a huge amount of code you could try to set the box to increase after specific blocks of code are parsed to cover more code into the loading bar.


Yskonyn - (Waiting for Hands On DBP Programming Vol. 1)
"It's better to wish down here you were up, then to wish up there you were down."
BluEarth Software
20
Years of Service
User Offline
Joined: 13th Nov 2004
Location:
Posted: 15th Feb 2006 21:15
Sorry, I am a programming Noob, So I kind of need code, it doesn't have to be complete, but easy to understand.

Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 15th Feb 2006 22:08
You don't need code, trust me - it'll be better if you figure it out with a little help.

The idea is, every time you load an object, you add 1 to a variable. The variable starts at 0.
Then you draw a box on the screen - the box command takes four numbers - a top, left, bottom and right. You only want your box to grow to the right, so that's the only number you'll have to change.

Pseudocode-

Loading bar variable starts at 0
Draw a box - right= left+loading bar variable.
Load an object
Add one to the loading bar variable.
Draw the box again - it will be 1 pixel bigger!

Repeat that for all your items that you're loading (and maybe changing the number you add, depending how many objects you have) and you'll have a loading bar in no time.
Remember to sync after every time you draw the box - or it won't get shown!
Good luck.
BluEarth Software
20
Years of Service
User Offline
Joined: 13th Nov 2004
Location:
Posted: 15th Feb 2006 23:40
Uhh, k, Understand little bit of that, an example would be nice.
I don't copy the code, I rewrite it so it is still my code!



Halo Man
19
Years of Service
User Offline
Joined: 5th Nov 2005
Location:
Posted: 16th Feb 2006 00:20 Edited at: 16th Feb 2006 00:34
Quote: "I don't copy the code, I rewrite it so it is still my code!"


You copied tinkergirl's psuedo code? Maybe i just didn't understand you.

<a target="_blank" href="http://www.runescape.com">Runescape!</a>

Login to post a reply

Server time is: 2024-11-27 06:31:36
Your offset time is: 2024-11-27 06:31:36