Framerate problem getting on my nerves &$#@

Hi,
Last week i found a very nice template made by firemaplegames with custom fonts.
first i tested my game without the custom fonts in the gamesalad viewer, it showed 60 frames per second.
then i used 7 custom font actors, the FPSecond went down to 21. Is there a other way to still use custom fonts but keep the FPSecond up?
thanks.
Last week i found a very nice template made by firemaplegames with custom fonts.
first i tested my game without the custom fonts in the gamesalad viewer, it showed 60 frames per second.
then i used 7 custom font actors, the FPSecond went down to 21. Is there a other way to still use custom fonts but keep the FPSecond up?
thanks.
This discussion has been closed.
Comments
EDIT: you could even have it so it only displays the custom fonts right before you start playing and right after you die. Or you could have a score button that causes the fonts to appear. If you wrapped all the rules (with all those constrains) in a boolean that also made the fonts appear (interpolate alpha) you could try to have the best of both worlds.
good luck
Right now it is set up to use Constrains in the Score Glyph Actor.
Those will kill your FPS.
You need to create a global boolean attribute called something like 'updateScoreNow'.
Whenever something changes the score, set that boolean to true.
And in the Score Glyph Actor create a Rule, like this:
Rule
When all conditions are valid:
game.updateScoreNow = true
-----Change Attribute: game.updateScoreNow To: false
-----Change Attribute: self.Image To: "score_"..floor(( game.currentScore % self.divisor )/( self.divisor /10))..".png"
That way it only updates when the score changes and it's not constantly taxing the system.
That should help anyway.
also how can you see if its using the boolean and not the constrain?
cheers
so ive created currentscore integer, tempscore integer and update score now boolean
on the score increaser instance ive added
on mouse button down
change attribute game.currentscore to game.currentscore +10
change attribute game.update score to true
then i added the code to the sore glyph
Rule
When all conditions are valid:
game.updateScoreNow = true
-----Change Attribute: game.updateScoreNow To: false
-----Change Attribute: self.Image To: "score_"..floor(( game.currentScore % self.divisor )/( self.divisor /10))..".png"
however all the self.mydigit rules are still in there i take it these stay in there as other wise it would not know which number to display at the right moment...
however when i click the instance, unlock it and get rid of the old code
constrain self.mydigit to floor(( game.currentScore % self.divisor )/( self.divisor /10))
nothing works any more...
For example In a racing game you wouldnt want the time to run like 12:54.567 seconds
but a timer running in real time at 12:5 seconds runs smooth
then after you finish you can display the full time 12:54.567 for you final time... or score etc.
Also keep your images small and square. Something like 32x32 or 64x64
I stil cant get the other bit to work so il try your way and hopefully the frame rate wont be to bad.
Then I added a timer rule and everything worked as expected.
Rule
When all conditions are valid:
game.updateScoreNow = true
--Change Attribute: self.Image To: "score_"..floor(( game.currentScore % self.divisor )/( self.divisor /10))..".png"
--Timer: After 0.1 seconds - Run to completion
-----Change Attribute: game.updateScoreNow To: false
EDIT: nvm, figured it out