Computer Science Canada Basic Loading bar |
Author: | copthesaint [ Thu Mar 12, 2009 2:50 pm ] | ||
Post subject: | Basic Loading bar | ||
My class was asked to do a project of a loading bar over the next hour, I decided to do one as well. Here is the loading bar for anyone who may want it. Why not post a awsome loading bar you have made here?
|
Author: | Tony [ Thu Mar 12, 2009 3:14 pm ] |
Post subject: | RE:Basic Loading bar |
![]() http://compsci.ca/blog/now-loading-loading-bar-anti-pattern/ |
Author: | BigBear [ Thu Mar 12, 2009 3:36 pm ] |
Post subject: | RE:Basic Loading bar |
I think loading delays are pointless. But if you were actually loading something that would take time, maybe a map file and character's stats file? I don't really know what would take enough time for a loading bar. This loading bar is a process so it will display progress as the program is starting. I understand how you are drawing the bar and the colors but where does it take any thing from the program. You called LoadBar before those variables. What portion actually stops at the vars? |
Author: | Insectoid [ Thu Mar 12, 2009 4:15 pm ] |
Post subject: | RE:Basic Loading bar |
When I have lots of stuff to load, I just put "Loading..." before anything and cls after everything is loaded. I admit, I've done something similar to this in the past. Only once, though, and only because I was trying to make it look more like a cash register (with the animation representing the printing of the receipt). This was only a month or two into programming though, and I realized how retarded it was soon after. I find with Turing's slow graphics it may almost double the loading time (if not more) by adding graphics. |
Author: | Tony [ Thu Mar 12, 2009 4:28 pm ] |
Post subject: | Re: RE:Basic Loading bar |
BigBear @ Thu Mar 12, 2009 3:36 pm wrote: I don't really know what would take enough time for a loading bar.
In large games, loading a new area of a map, along with 3D models and textures could take some amount of time. Though this is usually done during loading rooms. Ever notice long narrow corridors with a locked door at the end? The game is loading the next area while you run through that room, and unlocks the door when the loading is done. No pause. |
Author: | BigBear [ Thu Mar 12, 2009 4:32 pm ] |
Post subject: | RE:Basic Loading bar |
Ok but how does this code actually load anything. It yes it stops at vars but all I see his a fancy RGB color bar moving. |
Author: | corriep [ Thu Mar 12, 2009 4:43 pm ] |
Post subject: | Re: Basic Loading bar |
copthesaint wrote: My class was asked to do a project of a loading bar over the next hour, I decided to do one as well. A rebel are we? ![]() You could have done this w/out the process; I hate seeing people use process for anything other than playing music. |
Author: | copthesaint [ Fri Mar 13, 2009 2:04 am ] |
Post subject: | Re: Basic Loading bar |
corriep wrote: You could have done this w/out the process; I hate seeing people use process for anything other than playing music. Umm Process are fine for this case and is really needed for to ('Load') the vars I Used process to make it appear to load as it pauses the animation while creating the variables. Btw Don't get the idea that having a loop run in the background is a bad idea (ITS NOT), but it just may slow down the program or cause flickering with multiple drawing and view.update. If you were to run all of your drawings in a process looped and had your conditions in your main loop your program would be fine. I don't know why people have these big grudges on processes. ![]() Btw This was posted because I Wanted MORE EXAMPLES o loading bars, because many didn't know what to do for there loading bars in my class. This wasn't a Discussion topic that I wanted, and also I was just doing this quickly and helping others out at the same time. I wasn't trying to go for anything close to perfection |
Author: | DemonWasp [ Fri Mar 13, 2009 9:03 am ] | ||
Post subject: | RE:Basic Loading bar | ||
If you're going to make a loading bar, you'd best make it actually correspond to the work done by the program. My example follows; while it's more simplistic graphically, it communicates the point AND it lets you actually track the loading that's happening in the background:
A worthwhile note: I can't imagine anyone coding a game in Turing that actually takes any appreciable time to load on any machine made in the last 10 years. There are 3D display engines on this site that load in under 2 seconds! Even worse, the game I'm currently working on as a side project loads in about 2 seconds flat despite loading various models and a lot of high-resolution textures (admittedly, it *is* in Java, which has a pretty heavy speed advantage on Turing). There's really no point in making a loading bar unless it looks like your program is crashing or hanging while it's loading. |
Author: | Tallguy [ Fri Mar 13, 2009 9:47 am ] | ||||
Post subject: | Re: Basic Loading bar | ||||
copthesaint wrote: My class was asked to do a project of a loading bar over the next hour, I decided to do one as well. Here is the loading bar for anyone who may want it. Why not post a awsome loading bar you have made here?
lets not complicate things
basically the same thing, justa whole lot simpler |
Author: | Insectoid [ Fri Mar 13, 2009 10:37 am ] |
Post subject: | RE:Basic Loading bar |
If there's a way to get the file size in Turing when loading pictures and whatever, and you can calculate the bit size of a string/int (not too hard) you can make it accurately show how much data has been loaded and even give an accurate percent based on the total number of bytes to be loaded. It would impress your teacher and even if you aren't loading enough to warrant a loading bar it would be good (as it actually does something based on what you're loading, not just delaying the program). In this case, I believe it would be worth it. |
Author: | DemonWasp [ Fri Mar 13, 2009 10:47 am ] |
Post subject: | RE:Basic Loading bar |
You can use File.Status to get the size of a file on disk. |