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.

Dark GDK / Moveable Text Window Lags 3d World

Author
Message
Parry
AGK Developer
14
Years of Service
User Offline
Joined: 16th Dec 2009
Location: Swampstone
Posted: 31st Jan 2010 23:47
I created a moveable text window. It works fine till text is added and the game lags out for a split second. With alot of text coming across, my game lags so much it is unplayable

This code adds text to the window.


Anyone recommend a different approach to this?
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 1st Feb 2010 11:07
didn't really read the whole code, but if it's slow, the problem is dbInk.
dbSetTextSize also slows it down, but not as much as dbInk

Richaldo
15
Years of Service
User Offline
Joined: 12th Nov 2009
Location: Hertfordshire, England
Posted: 3rd Feb 2010 22:04
I'm in a similar position to Parry.

dbInk doesn't seem to cause much of a slow down for me, but changing the font (dbSetTextFont) and font size (dbSetTextSize) causes a very noticable drop in performance.

Ideally I'd like to be able to have labels on screen in different fonts and sizes, but changing these settings each frame (to draw each label) seems to be out of the question at the moment as it's just too slow.

I guess its loading the font each time those functions are called? It would be good if there was a way of pre-loading the fonts that we want to use outside of the main rendering loop so we can just reference them somehow each time we want to change the typeface (a bit like how we can preload images and reference them by index later).

Login to post a reply

Server time is: 2024-11-20 05:22:38
Your offset time is: 2024-11-20 05:22:38