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.

Author
Message
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 6th Oct 2012 13:30
Text is just too slow. Advance 2d text is the same as DBP's stock command which are pointless and D3D is alittle faster, but not fast enough. So a work around is in order and I'm thinking Dot/Line Batching.

Since you can display a thousand pixels with batching far faster than displaying text with only a few pixels, I need to make a copy of the text display but via dots/lines.

The question is how would you be able to create a dot/line copy of text without storing massive amounts of data for each dot/line position?
Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 6th Oct 2012 13:49 Edited at: 6th Oct 2012 13:57
well d3d is the fastest text plugin i ever used. and it doesnt slow down the game at all. (thats why its my choice)
u must be doing something wrong..
but if u want to try something else,
how about creating your text in buffer, and then converting it to image.

search for bitmap examples over the forums..
it should be like:



[edit]
btw, its not the FPS rate you need to worry about, its your timed formula that needs to calculate the fps and boost objects in same speed no metter what fps u getting
if the fps drops down to 20 is still acceptable. but with 20 fps, your objects needs to move faster - thats when your timed movement formula goes in.

Advanced Updater for your games!
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 6th Oct 2012 15:37
I'm creating an editor so timed formula for timer base movement isn't really the issue. But just display a few lines of text slow it down so much that there no point in event trying to display polygons. DBP is already slow at displaying large amounts of objects.

Now after doing some tests I found there was something wrong with d3d when using advanced 2d. But after a reinstall of DBP, it was fine for some reason and yes your right, d3d is fast. After a test it's a faster than dot batching. a2 is really really so. I swear it shouldn't be slower than DBP but damn, it's really slow.

As of converting text into images, I think now that d3d is working again pasting image text would be slower.

So I guess you could say this is solved, thanks Sergey K.

Side note: a2 text seems to be very slow, wonder if that's an issue...
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 6th Oct 2012 15:38
If you are changing fonts over regularly then DBP takes it time converting the font ready to be used. I'm actually working on a utility class for both DBP and DarkIrrlicht which allows you to convert fonts to a class in memory and use them really fast for pasting text to images and bitmaps.

Instead of changing fonts each frame, the only way around it at the moment is to have sprites with text on them pre-prepared before your main loop. This will save DBP having to convert the fonts each time back into a bitmap format.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 6th Oct 2012 16:28
Pre-rendering is limited when it comes to scaling, though imagekit is very hand. But with advance 2d scaling isn't an issue until you get to text, things become a pain. I usually just use one font so switching isn't the issue. But this utility sounds interesting, can't wait to see it in the future. Awesome WLGfx
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 7th Oct 2012 01:21
Yeah, one of the limitations in DBP is actual drawing directly onto images which is what I'm putting together. The text pasting is almost done, there's a fast version that skips alpha blending and the second version which pastes using the fonts anti-aliased alpha, both are getting optimised too with x86 assembler. I'll post it up once it's done. And there'll be a few other functions added to it too, lines, rectangles, ellipses, etc.

The idea behind this font utility is to call the function to setup the fonts in memory (small memory footprint as it just stores alpha data) before any major processing and then use them whenever. I've not added scaling yet, but you can setup multiple sized fonts if you wish.

I'm only working on this because I need the font data for something else...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Duffer
23
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 8th Oct 2012 21:42
@ WLGfx,

Sounds v useful. Will tag this thread...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Login to post a reply

Server time is: 2026-07-07 19:09:44
Your offset time is: 2026-07-07 19:09:44