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 / Text speed start to be a creepy problem

Author
Message
Alduce
23
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 1st Mar 2014 10:50
Hi guys, I am feeling really bad with the font speed problem in DBPro.

My game using a lot of text informations and I am suffering a giant framesXsecond fall... this is really a BAD THING.

So I am reading here in the forum and I see there are 3D or bitmap text plugins availables..
I find one of these, seems fast but it need to use COLOR BACKDROP 0 and this constraint give me a lot of troubles (it's too long to explain but I am changing the color of backdrop so I can't use this plugin) and I can't to see a size command.. so I finished to test it.

So, guys, if you know a good and faster than standard DBPro text please! provide me a link!
ShellfishGames
13
Years of Service
User Offline
Joined: 6th Feb 2013
Location:
Posted: 1st Mar 2014 12:35
I always use d3d_func dll (here), it is much faster and the text looks much better than the native DBP text. Small usage example (untested):



In case you want to use it, just make sure to call d3d_init in the beginning and only use d3d_text in between d3d_starttext and d3d_endtext - and make sure your font IDs are correct, otherwise it doesn't display anything or with wrong font or crashes. I can't remember.
Oh, and define all your different fonts in the beginning of the program, and not dynamically when you use them.

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 1st Mar 2014 13:23
Shellfishgames solution is good but am not sure it solves the problem.

remember that fonts are drawn on bitmaps not on the 3D screen. do minimize the 3D screen using "set camera view" and allow fonts to be drawn on bitmaps.

yet you need to be careful that using "CLS" will slow down the screen so make sure you only clear the part of the bitmap where you write your game information.

as well remember to use: "Sync on : Sync rate " and then "Sync" inside "Do - Loop" this will help you game go much faster because you're allowing the graphic card to be fully busy with the back buffer and once finished analysing bitmaps and 3D, it flush all on the screen in one go using "sync"

hope this helpful.

Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 1st Mar 2014 15:33
Well you could always try your own sprite alphabet...
Just paste your entire font (all characters) to the screen one at a time then capture each letter as an image then make a sprite from each image. Then work out a routine for pasting according to your string.

However, I haven't done this myself...
What's the consensus on sprite based fonts, anyone?
Are they acceptably fast when a lot of text is involved?

666GO†O666
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 1st Mar 2014 17:10
I think using D3D is your best bet really.

Alduce
23
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 1st Mar 2014 18:06
Thank you all guys! D3D plugin tested and no more speed problems related to text!

Login to post a reply

Server time is: 2026-07-07 03:47:27
Your offset time is: 2026-07-07 03:47:27