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.

DarkBASIC Professional Discussion / Updating a loading image without syncing the rest of the program?

Author
Message
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 14th Aug 2012 03:33
I have a loading animation. I want to update the animation yet not sync the rest of the loading objects. So I need some sort of real multitasking. A bit like having two DBPro programs running at the same time.

... Is it possible?

Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 14th Aug 2012 05:05 Edited at: 14th Aug 2012 05:07
have you tried sync off while continuously pasting your animation to the screen then sync on when your objects are done loading?

also, you could exclude object on each object, as you load them, and leave sync alone, then exclude object off the queue when they're done?

in theory, either should work pretty well (i've run small tests with expected results on both).

Virtual Nomad @ California, USA . DBPro V7.7
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 14th Aug 2012 07:54
Thats erm interesting Virtual Nomad...

Alternatively I would use Synced or more UnSynced loading with STYX see if IanMs MatrixUtils has any equivalents...

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 14th Aug 2012 23:19
I'll try these ideas out, and see how it turns out. Thanks!

Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 16th Aug 2012 21:58
What do you mean by not syncing the other objects? Do you mean not drawing them?

Whenever I've done loading screens in a non multitasking environment, I've generally made a big old loading function where I load 1 model or asset, then call a load screen update function. So it looks like:
- Load object
- Update load screen
- Load sounds
- Update load screen
- Load another object
- Update load screen

I put the camera well away from the origin so that nothing flashes up on the screen. Not ideal, but works.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 17th Aug 2012 00:08 Edited at: 17th Aug 2012 00:10
I'm creating at least 40000 objects, so updating them is no good. I need to ignore them, else the program might have a really long pause in it. I was hoping that an animation could multitask like it did on the Amiga. I think I'll just have a static loading image.

Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 17th Aug 2012 00:52 Edited at: 17th Aug 2012 00:53
The same technique applies though. Easy to do. So long as the camera isn't pointed at them (or you exclude them after loading) you can be syncing a loading screen between object loads without a performance hit. (Though wouldn't suggest syncing after every object load)

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 17th Aug 2012 01:40
Oh, OK I'll try it out.

Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 17th Aug 2012 02:33
i also think animated GIFs might play/animate regardless of "everything". as their support is undocumented, and useage hasn't been discussed much, i don't know for sure. worth a shot.

Virtual Nomad @ California, USA . DBPro V7.7
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Le Verdier
14
Years of Service
User Offline
Joined: 10th Jan 2012
Location: In the mosh-pit
Posted: 17th Aug 2012 19:41
Maybe with Set Object Mask Obj, 0 after each obj loading,
And a loop when all have been loaded


DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 27th Aug 2012 17:54
Could you simply disable autocam feature and move or rotate the camera at the start so you cannot see the objects as they load? I'm pretty certain they go to 0,0,0 by default. Then display your anim as an animated sprite or video? I am unsure now if DB can play an animation while loading up anything, or if it will simply pause until it has finished. If not you have to try to sync in between loads and settle for a slightly slow anim. Different size objects will alter load times of course. Also try to use dbo objects as they load faster than .x.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 27th Aug 2012 18:06
another way is a textured plane if thats of concern and disable the movement until everything is loaded... place the plane in front of the camera...

I have a loader so not too worried about this right now...

Login to post a reply

Server time is: 2026-07-07 10:11:53
Your offset time is: 2026-07-07 10:11:53