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 / Displaying a "loading" screen while a movie is loading

Author
Message
Jcoggins
18
Years of Service
User Offline
Joined: 6th May 2006
Location:
Posted: 6th Apr 2008 17:48
Sometimes it takes awhile for an animation to load. Is there any way of displaying something that says "loading" until the animation starts playing and then removing the "loading" sign?

Jason
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Apr 2008 18:26
Hallo Jcoggins.... just put before your < sync on > something like:





cheers.

oh my god
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 6th Apr 2008 20:24
I think he wants a loading bar which gradually increases while the movie is being loaded. ... I don't know how to do this in DB but the general idea is to have your loading bar disected into smaller parts ( for example, you can have 6 parts as in 0% 20% 40% 60% 80% 100% ) so for every 20% of the file size loaded into memory, you display a different frame from the loading bar

Could you help me treat my injured Dino-Fly ?
Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 6th Apr 2008 20:41 Edited at: 6th Apr 2008 20:42
How would you detect that Twinsen?
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 6th Apr 2008 22:12
Unless you broke the movie up into even parts and updated the screen between loading the parts, the only way I could see it happening is if you could load the movie with a separate thread.

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 6th Apr 2008 22:52 Edited at: 6th Apr 2008 22:59
yes, as far as I know, DBPro can't split a file in smaller parts/chunks and then load it back up as a single file ... but then again, I could be wrong anyway, from what I've seen, animated loading screens, bars, meters, etc. are implemented ONLY when dealing with separate files, as the animation has an opportunity to change its frame in between file loads ... but when dealing with only one file, all games or programs have a static loading message displayed because it's really hard to play the animation while loading 1 file into memory ... for a single file, I'd say to display a message like "LOADING ..." or "Please wait while loading ..." or "Waiting ..." or even make it look funny and original like "Please be patient while we're handling your huge files for you, lazy boy !!!" or my favourite "Please wait while we're messing with your computer. Thank you!" and when it's ready say "Damage done " with the smiley also etc.

Could you help me treat my injured Dino-Fly ?
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 7th Apr 2008 00:04
Another thought I had was loading a small movie that looks good in a loop. Start that playing, then start loading the big movie while the little one plays. The little one could be a cut scene, or just about anything.

Jcoggins
18
Years of Service
User Offline
Joined: 6th May 2006
Location:
Posted: 7th Apr 2008 01:54
The idea of using a very short "loading" movie while the big movie is loading is very good. How would I be able to tell when the long animation is finished loading? When I have tested this in DBPro by using the "animation playing()" command DBPro reports that the animation is playing when it is still loading.

There needs to be a command to check to see when an animation is fully loaded and ready to play.

Jason
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 7th Apr 2008 03:02
Someone correct me if I'm wrong please...

The way the idea should work is,

- Your small video gets loaded and starts playing.
- While that plays, your program continues and loads the BIG movie.
- So while your program is still running, all the player sees is the small video.
- When the big movie is done loading your program continues.

So whatever it is you want to do next, such as play the big movie, just make the next command stop the small video, then play the big movie.

Jcoggins
18
Years of Service
User Offline
Joined: 6th May 2006
Location:
Posted: 7th Apr 2008 03:26
That is exactly the way I am wanting it to work. The question is how do I know when the big movie has finished loading?

Jason
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 7th Apr 2008 04:49
You don't. When the big movie is done loading your program will execute the next command. Until it's done loading your program wont do anything else, except you may get it to play the little video while it's loading.

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 7th Apr 2008 07:14
exactly ,, the only way your loading will play is inside a DO LOOP but you cannot put the movie loading process there too, you realize that

Could you help me treat my injured Dino-Fly ?
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 9th Apr 2008 17:44
It was brought to my attention in another thread, so I'll post it here too so others finding this thread in a search aren't misled.

When DBPro is instructed to load a movie file it turns that process over to DirectPlay (as I understand it) and DirectPlay continues to load the movie while DBPro continues to execute your program. There may be a short delay while it starts up the codecs and stuff, but DBPro execution does not stop and wait for the movie to fully load.

So once the load command has been executed, you may be able to pause the program "WAIT 2000" to allow enough of the movie to load, and then execute the play animation command.

To check whether or not the movie is finished, ANIMATION PLAYING returns a 1 if it's playing, and a 0 if it's not.

Vesper103
16
Years of Service
User Offline
Joined: 21st Feb 2008
Location: Beloit WI
Posted: 12th Apr 2008 05:14
well if your wondering how to decid what the laoded percentage is. do something like this:


then create a sprite for the loading bar. and increase the frame as the percentage gets to a desiarable level. hope that helps.


Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 12th Apr 2008 08:52
that I know ... I use it too but it's only viable for many files, not one

Could you help me treat my injured Dino-Fly ?

Login to post a reply

Server time is: 2024-11-25 06:48:25
Your offset time is: 2024-11-25 06:48:25