Posted: 18th Jun 2007 8:34
i got a loading screen to work, but it seems that it doesn't show u for all the things that are loading

here is my setup


sync on
sync rate 0
sync

Load image "loading screen",1
paste image 1,600,300
load textures()
load models()
load terrain()
load the rest()

do

whatever()
loop



I think i am missing something here
because the loading screen only flicks on once for less than a second after a long wait at of the black screen.

i think all the loaing happens at the black screen because the tim length of it depends on how mutch i load into the game.

so what am i doing wrong?
Posted: 18th Jun 2007 8:36
http://forum.thegamecreators.com/?m=forum_view&t=37583&b=6
Posted: 18th Jun 2007 8:46
JESUS CHRIST! i just want a simple image to be displayed while stuff is loading. I am not into loading bars yet,thats too advanced for me
Posted: 18th Jun 2007 9:29
first of all getting cranky and being plain rude doesn't help you, it makes you look very foolish and immature in fact.

Secondly, If your not applying yourself to learn types / arrays etc, before embarking on a game, you will find, you might have to re-do the whole structure of the game later on.

Simple conditional loops are going to be everywhere in your games structure, something you should also have fathomed before embarking on a game design.

There are many ways you can achieve a result, this method uses a sprite to hide the 3d objects being created and updates the loading screen because of the sync within the looping creation process, however it will most probably be slow with massive amounts of media. There are many other ways to load stuff as well, its not the definitive answer.

The first method I showed you, and namely part II of the examples is a very efficient way of making a loading screen.

Btw use the code tags supplied when proving example code.

+ Code Snippet
REM TEMP SETUP
sync on : sync rate 0 : set text font "Verdana" : set text size 24

REM MAKE A TEMP GRAPHIC
ink rgb(55,55,55),1
box 0,0,screen width(),screen height()
ink rgb(95,95,95),1
box 50,50,screen width()-50,screen height()-50
ink rgb(195,195,195),1
center text screen width()/2, screen height()/2,"Loading Screen"
get image 1,0,0,screen width(),screen height(),1
cls

REM TURN THAT INTO A SPRITE
sprite 1,0,0,1

REM WHILE THE MEDIA IS LOADING USE A SYNC TO UPDATE THE SCREEN IN THE LOOP
for i = 1 to 200
   make object cube i,1
   rotate object i,rnd(360),rnd(360),rnd(360)
   color object i,rgb(rnd(255),rnd(255),rnd(255))
   sync
next i

REM HIDE THE SPRITE AFTER ITS BEEN USED
hide sprite 1

REM TEMP MAIN LOOP
disable escapekey : while escapekey()=0

REM END TEMP MAIN LOOP
fastsync : endwhile


REM CLEANUP
for i = 1 to 200
   if object exist(i) = 1
      delete object i
   endif
next i

delete image 1
delete sprite 1

end



Finally, your signature leaves nothing to be desired, as much as your attitude to getting free contextual help with your own problem.

Id suggest you change your signature to something positive and leave the attitude for some place else when asking for help and free time.

If your frustrated, your probably skipping way ahead of your own ability and not learning things in a structured order.

Not my problem anymore, I tried to help you.
Posted: 18th Jun 2007 11:04
I actually didn't mean it to come out in a immature/ foolish way
i was just surprised because the first example was no match for my skill.
Also in the previous reply, i made a typo I was supposed to say
I am NOT into loading bars yet,thats too advanced for me


I fixed it. I think this is what made the little misunderstanding and me looking like an idiot.

I didn't realized that other people might interpret my words differently. I should weigh my words. I apologize.

But you DID help me with the second example, its what i have been trying to make.


also, I use the code tags for code. I tend not to use them for pseudo-code.
Posted: 18th Jun 2007 12:31
I can see that frustration does not bring out the best of us, anyway hope it helps.
Posted: 18th Jun 2007 21:46
cls
Load image "loading screen",1
sync
paste image 1,600,300
sync
load textures()
load models()
load terrain()
load the rest()
Posted: 19th Jun 2007 2:10
you should really try them before you post them.
Posted: 19th Jun 2007 3:31
cls
Load image "loading screen",1
sync
paste image 1,600,300
sync
load textures()
load models()
load terrain()
load the rest()


this one also works but i have one problem. I can't figure out where to delete the image. There is something i need to do to this to get it off the screen when its done loading. As far as i am concerned, it doesn't go off the screen. The other example with the sprite, i got it to work, but something about sprites that make the black colors show up as blue.
Posted: 19th Jun 2007 18:59
this should work fine:
+ Code Snippet
sync on : sync rate 0
cls
Load image "loading screen",1
paste image 1,600,300
sync : sync
load textures()
load models()
load terrain()
load the rest()
delete image 1
do
cls
whatever()
sync
loop


untested but I see no reason why it should not work...
Posted: 20th Jun 2007 2:21
well, thanks everyone for the help, for some reason i couldn't find anything simpler in these forums.

Later maybe i will add a loading bar but i don't need it now.

thanks everyone!
Posted: 20th Jun 2007 8:33
what you could do is use more than one do loop... so for instance...

+ Code Snippet
do
if menustuff()=1 then exit
loop
do
loadstuff()
loop


that example will work if you have menustuff return an integer value.
Posted: 20th Jun 2007 21:45
Interesting!

i have always thought that DB can only do one do-loop

but again, i never tried experimenting with that.
Posted: 20th Jun 2007 22:05
for some reason i couldn't find anything simpler in these forums.


Before loading the image and all the 3D objects - which turns on the 3D display and wipes off your loading screen, simply use:

Set Camera View 0,0,1,1

Set it back to the required screen size afterwards with:

Set Camera View 0,0,800,600

...when everything has all loaded.

TDK_Man