Display text drops my fps from 60 to 18 ! why?!

POMPOM Member Posts: 2,599
edited November -1 in Working with GS (Mac)
Hello guys i just discovered something very disturbing,
When my game is in the gameover screen it has display text to display the score ,
now i noticed that the fps is 18! and i started to comment out rules and to my amazement the display text caused it!
turn it off , 60fps , turn it on , 17fps !
i must say its 6 display text in one actor but still! 6 display text rules drops 40fps from our game?!
Common GS , how long is it going to take to give us a proper display text?!

What i did is remove the Text behavior from the actor and gave it to a new actor with no other rules,
Now the fps is on 48 , i can leave with that but that was really annoying,

I hope this info will help some of you in searching fps drops for no reason.

Roy.

Comments

  • old_kipperold_kipper Member Posts: 1,420
    I have noticed similar things and in a project I have been getting better results with custom fonts for numbers than using the display text.

    cheers kipper
  • jb15jb15 Member Posts: 602
    Yeah--custom fonts look better anyway. It'd be great if GS provided a ton of great fonts to use in games.

    Oh well. :)
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Same exact thing happened to me with my newest project. I went to use display texts for score and height as a placeholder and it dropped my fps to 15. I came so close to stopping the project cause i though for sure that all the custom fonts would do more damage but that wasnt the case. All the custom font didnt effect it at all. i just stay away from display text alll together now
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    Display text is far more worse than a constrain attribute in terms of performance.

    It constantly check the entered attribute even if it does not change, moreover it constrain itself to the actor position.

    So it is really bad to use display text other than to display attributes for testing purposes. For everything else use custom fonts. They can also be used for real time scores without using constraints.

    ________________________________
    【ツ】iPhone Icon Pack 【ツ】 - 【ツ】Graphic Pack【ツ】
    Free GS demo: High score simple and advanced; Game Center; App Rating System
  • DrGlickertDrGlickert Member Posts: 1,135
    Are the actors that have the display text moving?

    I have a game that, I too, almost abandoned because my fps was around 8-12, but I was using the display text to help de-bug things and see what attributes were firing when and such...

    Most of these were moving actors (some stationary).

    Guess my question really is more if moving actors with display text eats more fps than stationary actors.
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    It doesn't matter if they're moving or not, it constantly constrain its x and y positions to the actor and it also constrains to the displayed attribute/s.

    ________________________________
    【ツ】iPhone Icon Pack 【ツ】 - 【ツ】Graphic Pack【ツ】
    Free GS demo: High score simple and advanced; Game Center; App Rating System
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    Hmm, maybe it's not just the text on its own that is causing the drop in FPS. I have 2 game modes, one with a score using display text and one without. Both have the same frame rate.

    On a side not, there is WAY to much guess work with using GS. It's really annoying sometimes. Is it SO much to ask for some clear cut official guidelines from the GS coders of how to best optimise a project? The info in the wiki is very minimal.
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    I Also DONT have this problem when I test on my iPhone 4, I have 3 Display text in an endless Gameplay, and it works over 60 fps.

    I Agree with Shaz, to many question to know how to optimize a code, GS should have better stuff for this.
  • POMPOM Member Posts: 2,599
    shaz said:
    Hmm, maybe it's not just the text on its own that is causing the drop in FPS. I have 2 game modes, one with a score using display text and one without. Both have the same frame rate.

    Its only the text mate , i doubled and tripled checked , basically there is nothing to check , i delete the 6 display text rules and leave everything else like it was , and voila!! 60 fps !

    Roy.
  • StuartYStuartY Member Posts: 134
    Wow! And here was I thinking that writing text was THE simplest thing a computer can do. No way should it be that costly. And I've got a game that HAS to use display text - the alternative would be to prebake reams and reams of sentences that would take up 100s of mb of ram.

    It makes me wonder whether GS is going about things "back to front" - instead of checking attributes for being changed constantly, why not check the RULES every time an attribute is changed? That way, if, say, a dialogue line only changes every five seconds, it's not constantly draining cycles seeing if it's not changed. But something that changes a lot - an actor's x position, for example - would still have the same cost as now as it fires the constrain rules associated with it as it moves. Maybe this is naive from a coding perspective, but it sure seems like common sense.
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Are your rules based on attributes populated by constrain behaviors? Also, are the text behaviors displaying static text or attributes?

    I'm guessing that there is some type of excessive looping that is resulting in either the rules you are using, or how often the attributes are being updated.
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    Unfortunately I can confirm that the problem is the text behavior. When I tested my last game I had a simple display text on 4 actors to check on an attribute, the text wasn't wrapped in any rule. When I later deleted that behavior I got a 10 fps increase.

    ________________________________
    【ツ】iPhone Icon Pack 【ツ】 - 【ツ】Graphic Pack【ツ】
    Free GS demo: High score simple and advanced; Game Center; App Rating System
  • POMPOM Member Posts: 2,599
    The text behavior is showing the score of the game in the Game over screen with simple rule:

    When self.alpha = 1
    display text
    display text
    display text
    display text
    display text
    display text

    I have 6 display text rules grouped together .

    once iv'e taken those rules and gave them to a NEW actor with no other rules other than the text , fps jumped back to 58-60 , im just glad i noticed that cause naturally i never suspect text behavior for performance issues , but now i will!

    Roy.
  • DieganDiegan Member Posts: 55
    Could someone point me in the right direction to learn what are and how to display custom fonts, and how to know the framerate during my game?

    Thx!
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    Open GS Creator and search for custom font in the new tab.

    To check framerate you have to install the GS Viewer on your device.

    ________________________________
    【ツ】iPhone Icon Pack 【ツ】 - 【ツ】Graphic Pack【ツ】
    Free GS demo: High score simple and advanced; Game Center; App Rating System
Sign In or Register to comment.