playArea.myScore:setText("Score :- "..myTravelDistance)
the above line is dropping my games fps by atleast 30 - 40% and game looks very very choppy. i am using ttf font. the game is really very heavy loaded for my lg optimus p500 [but it runs very smooth when i comment this line] and i am using 30 fps setting
i dont know wheather using bitmap font will help or not i will try this but thought i should have to mention this over here
Thnx
Comments
actually as it is in development i had still not put the lower resolution graphics only on graphics for the size of 640x960 and hence the game is too much loaded but as i said previously it runs very smooth if i comment that line
Meaning If I need to add 1000 points I add 1000 points.
If I need to add 900 points I add 9 frames by 100 points, etc. Still has a little cool increase effect and does not seem to slow down the game.
Likes: hgvyas123
yup i know about bitmap font however still not given that a try there a also one method by @techdojo somewhat similar to settextureregion (?) but not tried that also
How about adding a function like buildCache() to TTFont class like:
Likes: hgvyas123, phongtt, alexzheng
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
local text = TextField.new(font, "0123456789abcdef.....")
text:setAlpha(0.01) -- or putting it behind the bg
self:addChild(text)
sorry can't test it currently as it will happen in my p500 and i dont have it currently my brother uffff..........
Likes: hgvyas123
https://sites.google.com/site/xraystudiogame
secondly, if you don't need to change the text, you don't need the cache, it will only consume memory without ever doing anything
https://sites.google.com/site/xraystudiogame