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 / Run two things at once

Author
Message
Mr Black
19
Years of Service
User Offline
Joined: 20th Oct 2005
Location: USA
Posted: 26th Jun 2006 22:26
I couldnt find this on the forums although i probably just searched for the wrong thing. Anyway, how do you show a loading screen that goes Loading. Loading.. Loading... over and over again and keep that screen there while in the background it actually loads the items. The best i could think of would not work.
D Ogre
21
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 27th Jun 2006 00:02
It would depend on how much media and how you set up the code to load it.
I might be able to help you if you have a code snippet.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 27th Jun 2006 00:08
There is actually a delay where the Loading stops, and you load a different object, but it is so fast that you do not see it. So really you just change the loading bar between different objects, or a few at a time.

Mr Black
19
Years of Service
User Offline
Joined: 20th Oct 2005
Location: USA
Posted: 27th Jun 2006 01:31
Ok, well as for D Ogre i dont really have any media yes, but i am just loading music fils for a quick program. So my code snippet would basicaly be
over and over until i am finished, and of course i would have correct content. As for loading i just have


And Pincho Paxton, i thought about that but i wanted to see if there was an easier way, im just using text but the loading bar method would work. Dont know how to do that though.
Bmad6
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location: Virginia, United States
Posted: 27th Jun 2006 05:20
I think Pincho Paxton's way is the easiest, because, if you're thinking of multi-threading, or having multiple blocks of code run at the same time, then you'll have to find another language - dbpro doesn't support multithreading...

Mr Black
19
Years of Service
User Offline
Joined: 20th Oct 2005
Location: USA
Posted: 27th Jun 2006 06:17
Ok, then i will have to figure that out, i should be able to get it , thanks for all the help.
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 27th Jun 2006 14:08
Mr Black, using your own psudeocode, here you go...
Wandering Swordsman
18
Years of Service
User Offline
Joined: 14th Jun 2006
Location:
Posted: 29th Jun 2006 09:58
I'd say go with what Pincho Paxton said, it's what I generally do when I want a loading screen.

And... what is this 'multi-threading', fraught with mystery and lack of DBP compatibility?

Quote: "or having multiple blocks of code run at the same time"

What languages allow this?


Example of my line of thought:


Am I completely wrong in my thinking?
Where can I learn more about multi-threading?

When I dream,
I carry a sword in one hand,
a gun in the other...
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 29th Jun 2006 10:35
The Amiga computer was able to run 8 things at the same time. Don't know much about PC Multithreading though.

Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 29th Jun 2006 14:41
DBP cannot multi-thread. Someone a while back was trying it, but it just crashes randomly. Do not even bother going down that route!

DBP is quick enough that during execution, doing little bits of each thing that you want to do in a loop feels exactly like everything is happening simultaneously.

And Wandering Swordsman, if you opened my code you will see that I hap done exactly as Pincho suggested, I was just trying to make it crystal clear for Mr Black.
Bmad6
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location: Virginia, United States
Posted: 29th Jun 2006 16:36
I know that either C++, Visual Basic, or both can do multi-threading, which basically means that you initialize a "thread" entity and assign it a block of code to execute. Then, you can tell it to execute, to pause during execution, to stop, to hand over control to another thread when it's done, etc... very powerful capability, but hard to control, because the same variables and resources are being accessed by different parts of the code, which leads to problems, so lots of fancy syncronization and stuff usually ends up being required...

However, in some situations (not this loading one, but maybe some others) you can emulate multi-threading by having another exe run at the same time, and communicating via a command-line input or file maps... (file maps are in the enhancement pack for dbpro)

"Catch me ridin' dirty" - Peace Out
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 30th Jun 2006 03:16
Wandering Swordsman
18
Years of Service
User Offline
Joined: 14th Jun 2006
Location:
Posted: 30th Jun 2006 04:03
Dream And Death:
Quote: "And Wandering Swordsman, if you opened my code you will see that I hap done exactly as Pincho suggested, I was just trying to make it crystal clear for Mr Black. "

True, and... why does this effect my statement that a loading screen of the nature Pincho Paxton suggested is a good way to go?
(Sorry, I know I normally list everyone who has mentioned the same idea and say something akin to 'as (Name), (Name) & (Name) have said.' I chose only to mention the originator of the idea for speed.)

I didn't mean to imply that I was ruling out your statement of the same style of loading screen. I'll try and avoid repeating this kind of breach in forum etiquette.

Very interesting, thanks for the information on multi-threading everyone.

When I dream,
I carry a sword in one hand,
a gun in the other...
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 30th Jun 2006 04:05
Sorry Swordsman, I didn't mean to sound huffy aboutit, I was just wondering if you had misunderstood what I had done!

Login to post a reply

Server time is: 2024-11-27 15:52:29
Your offset time is: 2024-11-27 15:52:29