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 / DBpro can use Multi-Core?

Author
Message
Jordi
15
Years of Service
User Offline
Joined: 20th Feb 2011
Location:
Posted: 15th Dec 2011 13:01 Edited at: 15th Dec 2011 13:28
Hello guys,

Anyone know that if DBpro can use Multi-Core?

I read that it's not possible, but I'd ask if anyone know of a plugin or something to use multi-core.

Thanks for help me

Greenster
21
Years of Service
User Offline
Joined: 3rd Feb 2005
Location: US ©
Posted: 15th Dec 2011 13:52
It already does. One drawback is there is no threading functions though.

When a software says it's optimized for multi-core, it doesn't actually mean anything except maybe more threads, cause the kernel handles it all nativly, you can't even influence hardware threading without a driver, and windows API has nothing for it..
Jordi
15
Years of Service
User Offline
Joined: 20th Feb 2011
Location:
Posted: 15th Dec 2011 17:17
Thanks Greenster

If I understand correctly, no have functions to control multi-core. The system use automatically if is required. ¿no?

Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 15th Dec 2011 20:14
How do you type an upside down question mark, and what is its purpose?

-In.Dev.X: A unique heavy story based shoot'em ~35%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 15th Dec 2011 20:42 Edited at: 15th Dec 2011 20:43
^ it's used in spanish for a question (same with upside down exclamation marks)


I don't believe you can multithread in DBPro, no.

Well, at least you can't use any native functions.

[edit]
I should elaborate on that: It is possible to multithread with DBPro through ianm's matrix utils, but from what I understand none of the DBPro functions are thread safe, so using them from a second thread could cause a memory error.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 15th Dec 2011 21:09
You mean this¿ and this¡?... I have been using them a lot lately... theyre built into my galaxy s ][ android keyboard

I think the solution would be to jump into Pure GDK or Dark GDK... bare in mind Pure GDK 2.0 is out soon... I am planning to jump into that... it features full thread management from what I have read so far...

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Dec 2011 22:29
In PureGDK, access to the DBPro/GDK runtime is serialised, ie, one-at-a-time.

Quote: "none of the DBPro functions are thread safe"

Absolutely true. In fact, I'd lay bets on the fact that anything using an ID (including in my own plug-ins) would not be thread-safe. It's only relatively recently that a simple thing like string assignment became thread-safe (DBPro moved to use VC++2008 and the multi-threaded runtime).

Quote: "Anyone know that if DBpro can use Multi-Core?"

Only when it is built into a plug-in. A few of the official plug-ins (PhysX and DarkLight?) use it - it's completely transparent to the user.

BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Dec 2011 12:29
PhysX - yes
Darklights - yes, for the creation of the lightmap
DarkAI - I'm not sure

I have tested standard DBP multicore using Intel's tools. It registers about 1% of the second core, probably for some low-level stuff. I mentioned to Diggsey the possibility of Box2D being multicore, so that DBP games could get certified by Intel as "designed for n-Core", but I don't know if he looked into it too deeply.

Morcilla
23
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 17th Dec 2011 17:14
Quote: "It's only relatively recently that a simple thing like string assignment became thread-safe"

Ok that DBPro and all related DX functions are not multi-core, but I think that multi-core still could be used in DBPro/DGDK programs to manage things like raw math calculus, keyboard input, AI systems, maybe music playing and this kind of 'parallel' stuff, is this right?

Quote: "DBP games could get certified by Intel as "designed for n-Core""

If DBPro could manage n-core just in the way that I described above, for 'secondary' tasks, that would be absolutely Fan-tas-tic!
Not only because of the advantage itself, but because of the relevance of being certified by Intel.
That would be a great boost for DBPro at this moment

Jordi
15
Years of Service
User Offline
Joined: 20th Feb 2011
Location:
Posted: 20th Dec 2011 14:11
Hello guys,

Quote: "How do you type an upside down question mark, and what is its purpose?
"


Quote: "^ it's used in spanish for a question (same with upside down exclamation marks)"


Yes, the "¿" is used in spanish. I'm sorry, when I write fast I forget to remove.

Quote: "I have tested standard DBP multicore using Intel's tools."


I tested my games with Intel's multicore test and the result is always 1,00 or 1,04

Weave
AGK Bronze Backer
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location:
Posted: 20th Dec 2011 15:26
Found this the other day in the forums somewhere, needs the dll in the download.... don`t know if it helps at all...

Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 21st Dec 2011 00:11
I could be wrong but the Styx plugin allowed you to register interval functions that run independantly from the main loop. It has been a long time since I used it and read its documentation. I remember my program crashing when Styx Intervals and Dark AI were used in the same program; possibly related to the use of threads. The Styx plugin also has a number of conflicts with other plugins.

Additionally, DarkNet optionally uses CPU threads per connection.

Login to post a reply

Server time is: 2026-07-10 03:09:37
Your offset time is: 2026-07-10 03:09:37