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 / D3D Text is Slower than DBP's

Author
Message
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 31st Oct 2012 15:48
A lot of people are saying D3D is the way to go for text, but no matter how many examples I look at or things I try out D3D text is still slower than DBP's stock text command. Advanced2d is ridiculously slow for text so that's out of the question. So the question is why is D3D so slow cause everyone else seems to be flying with it?
Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 31st Oct 2012 17:22
lolz.. isnt it obvious u doing something wrong?

try to see if there are some plugins collides with your own functions.. it might make that slow problem of yours

Advanced Updater for your games!
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 31st Oct 2012 17:43 Edited at: 31st Oct 2012 17:44
Even if I take every other plugin (minus DBP's stock ones) out of the folder it changes nothing. I've run tons of examples so it's not my own code which is at fault. There has to be something that's conflicting with the plugin.

Try running this and post the results if you could please:


Mine were (on average):
D3D: 780
DBP: 1020
Zwarteziel
15
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 31st Oct 2012 18:24
Your code has these results on my system:

D3D: 876
DBP: 1101

(I'm using a Core I7 920 processor, running at 2.6Ghz with 16GB DDR3 and a ATI Radeon HD5800)
Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 31st Oct 2012 18:42 Edited at: 31st Oct 2012 18:43
D3D 1100
DBP 2400
i guess they fixed the slow text issue they had on the last dbp update.
althought i still recommend using D3D cuz the box/cisrcle/dot 2D commands are faster still..

btw, its not that healthy to your screen to force update it more than it designed to.
the optimal update screen rate is 60, you updating the screen

small update:
make sure u use randomize timer() before u work with RND
cuz the 1st RND output will be the same number if you wont use "randomize tiemr()"



Advanced Updater for your games!
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 31st Oct 2012 19:07 Edited at: 31st Oct 2012 19:14
Quote: "i guess they fixed the slow text issue they had on the last dbp update.
althought i still recommend using D3D cuz the box/cisrcle/dot 2D commands are faster still.."


True, though I use Advance2d for those.

Quote: "btw, its not that healthy to your screen to force update it more than it designed to.
the optimal update screen rate is 60, you updating the screen"


I know. But there would be no way of telling just how much of a performance hit it would have if we tested at 60 fps. Other than doing a timer based test that is.

Quote: "make sure u use randomize timer() before u work with RND
cuz the 1st RND output will be the same number if you wont use "randomize tiemr()""


Don't think it would make a difference to the test if I did. This was just a quick demo.

And now back to your original statement:
Quote: "lolz.. isnt it obvious u doing something wrong?"


Hehe, if only you knew

This really hinders text heavy GUI's. So it's will have to be image heavy for all the pre-rendered text, or have a text layer over the 2d that all the text get's printed to. And only update when I need. Ian M's Draw to Image command really comes in handy here so I can force all drawing operation to an image. Also imageKit for editing an image. Looks like I'll be having fun.
Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 31st Oct 2012 19:23
yeah i take my words back then

i missjudged the last dbp update haha

Advanced Updater for your games!
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 31st Oct 2012 19:36
Though I have to agree. Ages ago, text was so slow. They've done a good job of improving it.
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 31st Oct 2012 23:06
D3D: 1380
DBP: 2630

i7-3770K (3.5GHz) with 2GB 560GTX


Has someone tested this with different fonts? That used to kill DB also.

"You're not going crazy. You're going sane in a crazy world!" ~Tick
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 31st Oct 2012 23:22 Edited at: 31st Oct 2012 23:22
I've tested with loads of different font's and I get the same for all. My previous score was tested on a laptop (don't know the CPU old Quad core I think, but GPU 470M GTX) so I'm hoping I would match yours Phaelax, though my CPU (i7-3750) slightly under yours but I got a new GPU (2GB 680GTX) the other day.

Would text be more CPU intensive rather than GPU?
Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 31st Oct 2012 23:49
the text rendering = gpu
font changing = cpu and HDD speed

Advanced Updater for your games!
Duffer
23
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 1st Nov 2012 00:33
if you change fonts (or even change to italic or bold) within loop in DBP as opposed to (albeit pre-setup fonts in) D3D doesn't DBP drop down to a crawl....? I think that was always the v big issue... has it improved?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
GIDustin
18
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 1st Nov 2012 03:21
Quote: "if you change fonts (or even change to italic or bold) within loop in DBP as opposed to (albeit pre-setup fonts in) D3D doesn't DBP drop down to a crawl....? I think that was always the v big issue... has it improved?"


That is what I recall. Changing the font size, style, color, etc, and you will notice D3D pull ahead.

Also, not a huge thing, but you could replace the "rgb(255,255,255)" in the example with a constant, 0xFFFFFFFF to be a little more fair.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 1st Nov 2012 03:25 Edited at: 1st Nov 2012 03:26
1130~ D3D
1750~ DBP

Core i5 2nd Gen 2500 Stock + Turbo Boost 3.3~3.7GHZ Quad Core [no HT]
8GB DDR3 1333
NVidia 430 GT 1GB
Windows 8 x64

This is interesting...

EDIT

Regarding the Font issue, I do believe you can load fonts into memory in DBP...

pictionaryjr
17
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 1st Nov 2012 08:30
it is not the font, size, or text command that are slow in dbp. Its the style(normal,italic,bold,bolditalic)and background style(opaque, transparent) that are slow. I just put a function in my program that checks for the current style and pretty much organizes them so that it will try to use as little calls as possible. Its a huge speed impact. changed my programs from 15fps to 2k fps until I set the sync rate to 60.

Login to post a reply

Server time is: 2026-07-10 18:55:03
Your offset time is: 2026-07-10 18:55:03