FBA The Creator

The True Multiplatform PC / PocketPC Opensource Development Tool - Read Only Mode - Kept only for historical purposes - Thank you all ;)
It is currently Thu Jun 04, 2026 2:44 am

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Jul 01, 2008 7:48 am 
Offline
FBA Startup-Logo Creator
FBA Startup-Logo Creator
User avatar

Joined: Wed Jun 18, 2008 11:40 am
Posts: 100
Location: Brighton, UK
I kind of like the little text output from the print command but wondering if it's 'slow' compared to using gfx fonts?

_________________
http://www.boiledsweets.com


Top
   
PostPosted: Tue Jul 01, 2008 8:10 am 
Offline
FBA Administrator
FBA Administrator
User avatar

Joined: Fri Mar 21, 2008 11:19 pm
Posts: 238
Location: Rome - Italy
Well, the print function uses same technique of gfx fonts; actually it caches all calls with different colors when you call it with a new one, then it creates several font-set and finally it's drawed like a gfx font.
So there shouldn't be any overhead (caching time is very fast).

Be aware, if you 'print' a small text but with several different hundred colors, it will have to cache lot of font-set so you may experience slowdowns and higher memory requirements; for example this should be avoided:

Code:
function onmainloop()
print(10,10,"my cool flashing text", math.random(255), math.random(255), math.random(255))
end


If you print "hello" with a 5x5 font or 50x50 font, you'll have same script processing overhead, but, of course, the 50x50 one will have higher gfx overhead because the higher area to draw.

This doesn't means that printing 10000 small chars with 'print' will be always good (usually not).
My suggestion is to keep font output and, in general, all draw steps reduced to minimun possibile, then testing performances live on your devices :)


Top
   
PostPosted: Tue Jul 01, 2008 8:26 am 
Offline
FBA Startup-Logo Creator
FBA Startup-Logo Creator
User avatar

Joined: Wed Jun 18, 2008 11:40 am
Posts: 100
Location: Brighton, UK
OK so imagine this scenario...

In my menu I have a HELP page, that needs to contain a load of text and images that explain how to play the game. Would it be better (faster) to create the page with print and drawimage(s) or just design a simgle masked image (containing the text and images) in PhotoShop and render that?

Ta.

_________________
http://www.boiledsweets.com


Top
   
PostPosted: Tue Jul 01, 2008 8:30 am 
Offline
FBA Administrator
FBA Administrator
User avatar

Joined: Fri Mar 21, 2008 11:19 pm
Posts: 238
Location: Rome - Italy
IMHO:
if you haven't to show animated objects or similar while opening your help section, i think you could use the 'print' statement because a slow down in framerate won't be noticeable while looking a static menu :D
(of course if you reach 1 fps, you'll have troubles also to get input from stylus :mrgreen: )
Instead, if you have to show also animations, using a pre-created image with photoshop, could be better!
Just my opinion btw, usually the only way to answer these questions is testing on a real PDA


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited