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 / Multithreading load map

Author
Message
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 9th Jun 2014 23:24
I don't know.

The core of the problem is that sync and load object read and write to the same memory location simultaneously. You'd have to ensure that the loaded object is added to the render list when sync isn't reading from the render list.

I like how this contributes absolutely nothing other than unnecessary memory consumption and processing overhead, since this is a single-threaded application (at least that's what I gather).

Quote: " // Make a copy, in case someone manipulates the list from their own
// function while it's being actioned.
std::vector<RenderListItem> RenderList( g_vRenderList );"


gamerboots
17
Years of Service
User Offline
Joined: 8th Dec 2008
Location: USA
Posted: 10th Jun 2014 00:28
Quote: "So, ironically Sleep is the most CPU tiresome DBP command someone could think of using in any application for any purpose under the sun; "


I pointed this out in an earlier post.

Now, back to getting a decent solution to the problem. If you were a plumber and needed one straight pipe to connect one piece to another you would not connect a dozen as it would end up looking like a plate of noodles. So why not just use one piece.

--------
DBP Archive
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 10th Jun 2014 00:38
Quote: "Now, back to getting a decent solution to the problem. If you were a plumber and needed one straight pipe to connect one piece to another you would not connect a dozen as it would end up looking like a plate of noodles. So why not just use one piece."


I agree, it seems a single threaded approach is the most viable option here. Just make your splash screen interesting enough so it doesn't have to be animated, and as Van B pointed out, don't make the loading bar continuous but make it have bars to hide the fact that it's single-threaded.

Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 10th Jun 2014 01:05 Edited at: 10th Jun 2014 01:08
Or do what I am doing; use two processes, one to load the object; and another to display it when loaded; polygon by polygon.

Or perhaps VisualProg will figure out a solution and put us all to shame. Since VP has gone so far as building his own DLL for the job, it would be worth adjusting the strategy than throwing it away.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 10th Jun 2014 01:30
Here's an idea: Screen-capture the loading screen and save it to a video file so you can display it during loading as an animation.

Loading bars can be drawn on top of animations.

Login to post a reply

Server time is: 2026-07-05 22:46:04
Your offset time is: 2026-07-05 22:46:04