Table writing FPS

james.triggerjames.trigger Member, BASIC Posts: 4

Hi,

My game uses a lot of change table values to score damage to and from enemies, using different values for things such as armor amounts, damage increases etc.

When testing this via the viewer app (iPhone 5 and iPhone 6 tests) The FPS drops from 60 to 54 before returning on a direct damage (one load of table changes) and to around 56 fps steady for damage that runs over time. I've run tests taking out all elements like graphics, text, color changes, etc but it seems to all point to the table changes being the issue.

So my question is: how intensive is table changes???? I kinda thought this would be no issue compared to features such as animation but it seems animation is trivial by comparison!

Thanks,

Newbie.

Comments

  • vikingviking Member, PRO Posts: 322

    I never did any performance checks on table changes because I assumed they were very low cost in terms of performance. Anyone on the forums that did any tests on how costly they are?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Lost_Oasis_Games might have some insights into this...

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @james.trigger are you doing more than changing existing values? This "should" not have a noticeable impact on performance. Adding or deleting rows however does.

  • RedCubeGamesRedCubeGames Member Posts: 37

    Same problem here! I am using tables in my quiz game. I have "stored" answers in table, and I made 4 different actors with display text function (4 different answers). I have set the rules in those 4 actors so that every time I change question (next or previous), rule changes column in the table to +1 or -1 and displays next set of 4 answers or displays previous set of 4 answers. So, every time that my 4 actors are "reaching" into the table to "read" next or previous column to display answers, I have spotted the FPS drop. So I went and tested (heavily) my app, to make sure that table is the real "enemy" of the FPS, and it really is. I figured that if I add more actors that are "reading" table, there is bigger FPS drop every time they do it.

    To conclude - More actors that are "reading" table, bigger FPS drop every time they do it.
    - Less actors that are "reading" table, smaller FPS drop every time they do it.

    (ps. - this is not written in the stone, this might only be in our situations, maybe our rules are not set properly.)

    This might help - I made creative solution to my problem! I did this - every time I change question, first the question flies off the screen and then when question isn't any longer on the screen, all the answers also fly off the screen and then my rules are triggered to change 4 answers (here is where FPS drop happens), by that time my question is already in its original position, and now my 4 answers are popping one by one on their original positions (all this happens in 1 second). So user will never now that there have been FPS drop :). I hope that this helps you maybe, if not with the FPS drop, then to - think creatively! :smiley: cheers

  • RedCubeGamesRedCubeGames Member Posts: 37
    edited June 2016

    @Hopscotch Actually, I am not saving table after every change.. This is how things work - I have question and 4 answers. I tap on one of the answers and then i have one button that when pressed checks all answers, and if combination of answers are correct, user gets +1 positive point, and if it isn't correct, user gets +1 negative point, and right after i press my check button, and answers are checked i have a rule that saves table (positive and negative points). That is it. So i don't have a save table rule after every change.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    A quick drop in FPS to the mid 50's is not an issue. This is totally normal. This can happen during different processes and is still in a great range for FPS. Most games will have moments when the processor takes on a momentary heavy task. As long as the normal FPS is from 57-60 you are fine.

  • RedCubeGamesRedCubeGames Member Posts: 37

    @The_Gamesalad_Guru That is a great info! Thank you!

  • vikingviking Member, PRO Posts: 322

    I respectfully disagree with the notion that it is Ok to drop frames during game interactions. You can notice right away when you tap a button with a corresponding frame rate drop. It feels sluggish and sometimes the bottom will not give you the action you expect. In my opinion, it is almost impossible to make a great gameplay experience on a touch device if you have a 5-10 frames per second drop every time you interact with the game.

  • james.triggerjames.trigger Member, BASIC Posts: 4

    Hi guys - thanks for the responses.

    It is using existing values and no saves. I've run more tests where I've applied more an more table changes (spells) all running at the same time and the performance only drops another 2 or 3 fps (from the original drop) so it seems to level off.

    That said, for what are equations this seems bit odd!

    The actual performance on the iPhones don't seem to suffer at all but the fps value drops as stated.

    I'm still trying to identify if there's something else happening but seeing I'm using tables for like 90% of my game it's rather annoying XD

  • james.triggerjames.trigger Member, BASIC Posts: 4

    Just as an update, I just tried placing a new actor into a scene with simple rule of when actor touch pressed > change table value to 50.

    Ran this and even this drops fps from 60 to 58 for a second upon press.

    Is it normal that change table values to do this? :S

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @viking said:
    I respectfully disagree with the notion that it is Ok to drop frames during game interactions. You can notice right away when you tap a button with a corresponding frame rate drop. It feels sluggish and sometimes the bottom will not give you the action you expect. In my opinion, it is almost impossible to make a great gameplay experience on a touch device if you have a 5-10 frames per second drop every time you interact with the game.

    I wasn't talking about all interactions or every interaction. I know some people think that if it doesn't stay pinned a 60fps 100% of the time there is something wrong. This was the point I was making. If a simple blank project with only a table write behavior is causing a drop in fps then this may be a bug that needs reporting.

  • james.triggerjames.trigger Member, BASIC Posts: 4

    Just FYI I am talking with the support chat as @The_Gamesalad_Guru says, FPS is happening on a blank project with a single change table value on actor press.

    I'm running Mac System Version: OS X 10.11.4

  • vikingviking Member, PRO Posts: 322

    @james.trigger Did you get any more info about this? Does change table value actually cost that much in terms of performance?

Sign In or Register to comment.