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 screen

Author
Message
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 17th Sep 2006 17:59 Edited at: 17th Sep 2006 18:03
ok i am working on a simpel rpg righ now. but i am having trouble with a loading screen. hwo wouldi do that? if i just want it to be a plain black picture on the screen that just says loading how woul i do that?

do i just use an if then statement

if <object 2 is loaded> then <delete background>


or somethign like that..if thats the case how do i make it so it knows that it has been loaded then deleteing the loading page?
the reason i ask this question is because when i start my game it shows everything loading.

thanks.

<img src="http://www.boomspeed.com/egraphics/75as4.gif" border="0" title="Adopt_one_today_from_pickle-green.com/egraphics!">
GMan
18
Years of Service
User Offline
Joined: 16th Sep 2006
Location: TEXAS
Posted: 17th Sep 2006 18:07
when you use a command to load anything, the code execution pauses until it is finished loading. So to do what your asking for you would first make sure sync is on so the screen doesn't refresh until you want it to. Then put your image on the screen followed by all of your loading commands. Once your done loading you use the sync command, and continue with your game.

The right man in the wrong place can make all the difference in the world.
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 17th Sep 2006 18:20
can someone help me on this.

<img src="http://www.boomspeed.com/egraphics/75as4.gif" border="0" title="Adopt_one_today_from_pickle-green.com/egraphics!">
Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 17th Sep 2006 18:45
Do you mean like this?



If your loading screen is the word loading you don't have to delete it, the sync in your main loop with erase it.

If you're seeing the game load, make sure you don't have any sync commands in the loading code. If you don't, I would guess you haven't put sync on at the start of your program. If you don't use sync on, the program syncs automatically.

Also you will need to put a few sync commands after you print the word loading to make it appear.
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 17th Sep 2006 19:20
i have sync on in my game loop an deverything is loading outside of the loop..ill show u my code..its not very good.



<img src="http://www.boomspeed.com/egraphics/75as4.gif" border="0" title="Adopt_one_today_from_pickle-green.com/egraphics!">
Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 17th Sep 2006 19:57
Sync on not only has to be before the main loop, but before the loading code also. Until the sync on command is found, everything will be automatically displayed, which is why you could see the game loading. I tried to fix your code by putting sync on at the top and the center text command I posted earlier. Does it work?

DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 17th Sep 2006 20:26
yes it works...thank you fo helping me.

<img src="http://www.boomspeed.com/egraphics/75as4.gif" border="0" title="Adopt_one_today_from_pickle-green.com/egraphics!">
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 17th Sep 2006 22:55
DB newbie...that code is fine. It is not the code you want for a finished game...it is stream of consciousness programming. That is fine, as long as you realize that...which you do. So don't go bashing your own code thinking that it will keep us from doing it. I would NEVER bash anyone's code. Different peeps = different code.

Your code is linear and purpose-driven. It is also easy to read and follow. That is more important now than how many fps you can squeeze out of it. After all, this is BASIC...not assembler, or C++.

Login to post a reply

Server time is: 2024-11-27 07:38:20
Your offset time is: 2024-11-27 07:38:20