Published game resolution issues (all of a sudden)

bluellamabluellama Member, PRO Posts: 27

I have almost finished my first game, and have been publishing and testing it on my iPhone multiple times. All of a sudden, the graphics are showing up really blurry / low resolution in my latest published version. They were fine previously, and I can't work out what would have changed in my settings to cause this? I have tried republishing again in case it was just a glitch during the publishing process.

I have also noticed that since my last updates, the game freezes completely when changing to the "Game Over" screen, which I have set up as a pause scene that is triggered when my lives attribute = 0. This has always worked as well until my last updates.

The actual export settings and publish settings haven't changed at all, so I'm not sure where these problems have come from?

Since my working version, the additions to code (that I can remember) have been:

  • setting up tweet sheet attached to a button on the game over scene (text only, no images)
  • high score saving to a table instead of an attribute (high score updates if game score > high score)
  • adding a link to a URL on a button in my "settings" scene
  • updating game center to unlock achievement when score is over 1000, 3000 or 5000

I can expand on these if anyone thinks they could be related to the problem?
Thank you for any help!

Comments

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @bluellama, can you put "Display Text" behaviors at multiple point in your code before and after the change scene so you can track how far it gets before it freezes?

    Regarding the blurry images, in which previous versions of GS was it ok?
    What settings did you enter on the publishing page regarding Legacy Resolution. What did you have before and what now?

  • bluellamabluellama Member, PRO Posts: 27

    Hi @Hopscotch , I'll try the display text option. I'll also try saving a new file and removing some of the latest additions to see if I can backtrack where the problem began.

    The blurry images haven't changed since a GS update - it's changed between two times I've published (after updating my game)

    The publishing page settings haven't been changed at all, which is why I find it strange. The minimum supported OS version is 6.0 and I haven't ticked "legacy retina independence" - These are the settings I have used every time I have done my testing on the iphone so far

  • bluellamabluellama Member, PRO Posts: 27

    Ok good news... I have worked out the resolution problem.

    The "resolution independence" box in GS has been ticked, because I wanted to import images that were 2x size into my game. However when publishing with it ticked, it goes blurry. If I untick the box before publishing, it is great resolution. I'm not sure why/how this changes things, but it works.

    GS automatically seems to untick the box every time I open my app, so I never realised it had made a difference during publishing until I've tested both ways now.

    Still working on the freezing problem. Doing various tests now. I have started by turning off ALL code that is located on my game over pause screen, and it stops freezing. So now I will turn them back on one-by-one to find out which code is causing the problem, and I'll post when I find it to see if anyone else has had the same issue or if anyone knows a work-around for what my code was trying to achieve.

  • bluellamabluellama Member, PRO Posts: 27

    OK I've found it. I was trying to save my high score to a table. Here's the code that caused the problem:

    Rule: When game.game score [my attribute] > tableCellValue( game.table_achievements ,8,2) [this is where my high score number was]
    Change table value:game.table_achievements
    Row 8
    Column 2
    Value: game.game score

    One thought.... the high score in my table is an integer, because I have other numbers also in the table that are all integers. However the game score attribute is an index.... could this be causing the code to crash?

    I left the table as integers because I am using this to update all my game center achievements, and index is not an option in game center. However the game score attribute is an index because I don't want the score to drop below zero.

    So can game center receive data from an index number, not an integer?

    Would the problem be that I'm trying to compare an index to integer or because I'm trying to compare an attribute to a table cell value?

  • bluellamabluellama Member, PRO Posts: 27

    Hello again, I've just noticed that the table doesn't let you select index as an option at all. So my question remains, could the comparison of game score > high score be causing problems since one is an index and the other is an integer?

    If so, I'm guessing the best solution is to use integer for my game score, however I need it to not go any lower than zero. Is there a way to restrict this so I can use an integer?

    Otherwise, does anyone know what else might be causing the freezing issues with this code?

    Thanks again.

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @bluellama, I don't think it is because of the use of index. Though I never use the type index.

    Are you sure that you are not referencing a nonexistent row in the table?

    Also, to keep a number from going below a certain number, 0 in this case, use the max() function.

    max(0,game.score) will return the larger of 0 or game.score. So if game.score becomes less than 0, it will just return the 0.
    Also check out the min() function which does the opposite.

  • bluellamabluellama Member, PRO Posts: 27

    thanks for that. It's possible that something else is wrong with the code, but at least using the max function might help. I'll see how it goes

Sign In or Register to comment.