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.

Dark GDK / Loading Screen

Author
Message
mikeMarek 597
15
Years of Service
User Offline
Joined: 12th Feb 2009
Location:
Posted: 22nd Mar 2009 15:09
Any idea on how to get a loading screen? Let's say I need to load a couple hundred images and sounds, but I don't want the user to be looking at a black screen for 30 seconds. Is there some function or variable or method of obtaining how much percent of something is loaded? Thanks for any replies!
-Mike
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 22nd Mar 2009 17:46
Well i'm not sure if there is or not, but you could:

1. Play an animation so the screen isn't blank or...

2. Draw the percentage of media that has been loaded (if there is a function to get total media then you divide that by the amount of media you are loading.
mikeMarek 597
15
Years of Service
User Offline
Joined: 12th Feb 2009
Location:
Posted: 22nd Mar 2009 18:11
Well that's what I'm trying to do - make/get the function that will return the amount that's loaded. I did look at some of the samples that comes with the GDK and they seemed to place an image on screen, then use dbSync() twice. But if there was a way to get a percentage that would be better.
prasoc
16
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 22nd Mar 2009 18:30
put at the top of the loading:

dbSprite(0,0,{YOUR LOADING SCREEN IMAGE I.D});
dbSync();
dbSync();

and it should place a loading screen
cdiddy
15
Years of Service
User Offline
Joined: 16th Feb 2009
Location:
Posted: 24th Mar 2009 02:47
didn't work for me plz help. i would like a custom loading screen that doesn't just say "loading" because i can already do that.

dbPrint("Please wait loading map...");

nubs
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Mar 2009 13:50 Edited at: 24th Mar 2009 14:03
I know you are looking for away to do this in DGK, this one way of doing it in darkbasic.

I am sure once you have looked at it you will be able to make something like it in DGK.



If this was not what you wanted, then say so, I sure some else has another way of doing this and in DGK, or will be able to convert the above.
edit
runable demo to down load and look at.

Dark Physics makes any hot drink go cold.

Attachments

Login to view attachments
Lucence
15
Years of Service
User Offline
Joined: 24th Mar 2009
Location:
Posted: 25th Mar 2009 02:06
Well it seems there are no magic code snippets that will produce what you need, so the solution is probably logic based.

What I would do; assuming that you are coding OOP, create a sprite that contains the various loading frames you would like the user to see. I would place the initial frame at the top of your program and after each object instantiation switch to the next frame.

If you aren't coding OOP, you should be able to achieve the same thing by switching frames between the taxing declerations.

I hope this helps!

Login to post a reply

Server time is: 2024-11-25 16:30:16
Your offset time is: 2024-11-25 16:30:16