Resolution drives me crazy

What i learned (I know how to take care about sizes.):
The size of the graphics not imported will be the size (CPU/GPU usage) of the graphics imported in game salad no matter how i resize the graphics in game salad?! Is that true?

  1. But does it affect blur? So do i have to take care about dividable by 4 again just because it could affect blur?

  2. So does then the app actually display it in higher resolution (when the resolution of the graphics is higher than the native resolution on the display?) So when that is so do i have then a kind of downsampling? You know what i mean: It s like downsampling 4k to 1080p on PC. (Its like anti alising)

  3. And why does Gamesalad not display the native resolutions under Scene Attributes?
    For example for iPhone 6 Plus it is 960 x 540 and not 1920 x 1080. I know it s the same Aspect ratio but i want to know. (Maybe you have to set it manually?!)

Best Answers

  • SocksSocks London, UK.Posts: 12,822
    edited September 2014 Accepted Answer

    @Creator97 said:
    What i learned (I know how to take care about sizes.):
    The size of the graphics not imported will be the size (CPU/GPU usage) of the graphics imported in game salad no matter how i resize the graphics in game salad?! Is that true?

    This was answered in your previous thread on resolution.

    @Creator97 said:
    1. But does it affect blur? So do i have to take care about dividable by 4 again just because it could affect blur?

    Image divisibility effects image quality, but not always, clean graphic images will sometimes be effected, but a photograph is unlikely to be effected . . . . also if your image is moving (a spinning asteroid for example) image quality will be much more effected by the movement (the pixels in the image being represented by the pixels on the target device) than it would be by not being divisive by 4.

    Do some tests for yourself, import an image that is 200 x 200 pixels, then get the same image and in Photoshop crop off a single pixel (crop and not resize) from each side, and then import this 199 x 199 pixel image and place it next to the 200 x 200 pixel image, also test it on your target device.

    Can you see a difference ? If the answer is yes, then the image is being effected by its non-divisilibity, if the answer is no then it's the type image that is not particularly effected by image divisibility.

    Now move the image (use something like Move at speed 200), if you can see the difference between the 200 and the 199 pixel image you have the best eyes in the known universe. :smile:

    There is no problem using images that do not divide evenly, it won't effect performance or break anything, just that with some types of image it can cause a small amount of aliasing . . . this was more of an issue before Retina screens turned up, but with Retina screens any aliasing that is there is harder to see.

    @Creator97 said:
    2. So does then the app actually display it in higher resolution (when the resolution of the graphics is higher than the native resolution on the display?) So when that is so do i have then a kind of downsampling? You know what i mean: It s like downsampling 4k to 1080p on PC. (Its like anti alining)

    If you place a 400 x 400 pixel image in a 10 x 10 pixel image, the image will have to be squeezed down to fit. As you play the game (or use the app) the 10 x 10 pixel image will always have a 400 x 400 pixel image on it, if you zoom the camera in to that 10 x 10 actor or do something like interpolate the 10 x 10 pixel actor's size up to 400 x 400 pixels you will see the extra resolution (by that I mean, you will not be zooming in on a 10 x 10 image).

    @Creator97 said:
    3. And why does Gamesalad not display the native resolutions under Scene Attributes?
    For example for iPhone 6 Plus it is 960 x 540 and not 1920 x 1080. I know it s the same Aspect ratio but i want to know. (Maybe you have to set it manually?!)

    That's just how it is for various reasons, you work at the non-Retina resolution.

  • SocksSocks London, UK.Posts: 12,822
    edited September 2014 Accepted Answer

    @Creator97 said:
    My question was :... when i resize it in gamesalad. There is size under attributes of each actor: Does that have to be dividable by 4, to not affect blur?

    Yes.

    But the entirety of the gaming world would be a much duller place if nothing changed size, moved, rotated, bounced or got shot out of a canon ! Any kind of movement will introduce sub-pixel blurring / aliasing, if images didn't blur/alias when they moved their movement would look jittery . . . . so . . . an actor at 100 might be divisible by 4, but it won't be at 101 or 102 or 103 . . . then at 104 it will be divisible by 4 again . . . then it won't be at 104, 106 . . . . etc . . . so should we never have an actor grow in size, or come towards the 'camera', or should we never zoom into a scene, or zoom out ?

    @Creator97 said:

    So what i mean i import a 400 x 400 graphic, then i go under this image attribute->size and then change it to 199 x 199. Does that make a difference in blurriness?

    Yes, there will be an aliasing of the pixels, but whether you can see this or not is another matter, you might notice it on constrasting clean graphic elements that don't move, although Retina screens make even this hard to notice (if you have a Retina screen do some tests to see what I mean) . . . . but for a lot of things like effects, photographs, projectiles, bullets, Tony the Spider, moving objects (as soon as something moves on a screen its pixels will alias, unless it is moving in whole pixel increments (which wouldn't look very smooth)) . . . etc etc . . . with all these kinds of things you are unlikely to notice any difference.

    @Creator97 said:

    Not in GPU/CPU Usage thats what you told me.

    I've not mentioned GPU/CPU at all, I was referring to pixels and aliasing, you can have this same conversation about television monitors or graph paper if you want, GPUs and CPUs have no bearing on all this.

    Also . . . . image placement within GameSalad is important.

    Import a perfect image, 400 x 400 pixels, and place it at X = 96.87, Y=112.32 . . . you now have a blurred/aliased image . . . so placement within GameSalad is at least as important as your image divisibility.

    You can also import a 199 x 199 pixel image (a 'bad' image') and place it at X = 53.5, Y = 227.5 and you have a perfect (no blurring/aliasing) image.

  • SocksSocks London, UK.Posts: 12,822
    edited September 2014 Accepted Answer

    @Creator97 said:
    I think it s clear now. Yeah you are right you not mentioned CPU / GPU but memory.
    So I am pretty sure that it also will affect GPU when you have several higher resolution images moving over the screen...

    Sure having several higher resolution images moving over the screen will effect processor load, but so will spawning 12,000 actors or playing 90 audio tracks at once . . . . but neither of them have anything to do with aliasing or optimal image quality, it's best not to conflate too many subjects when you are learning about this stuff.

    @Creator97 said:
    There is no way to lock the X and Y position to have just whole numbers?!
    30.0 not 30.35?

    Change attribute - self.positionX to floor(self.PositionX)

    Change attribute - self.positionY to floor(self.PositionY)

    @Creator97 said:
    And there is also no way to lock actors in the scene side by side?!

    You mean like a snap-to-grid function ? No, there is nothing like that, it would be incredibly useful, but unfortuntely GameSalad doesn't have anything like that.

    If there are lots of actors then most people use a little bit of code to lay them out side by side.

    @Creator97 said:
    The problem is each time I have to look under attributes and then change the numbers there.

    Yes, it's not a great way of working.

    @Creator97 said:
    And also I have an actor moving over the screen with x velocity on a platform. The scene has gravity so it would fall down if the platform ends. I copied the platform and put it on the and of the platform but one Y (Position) higher. Why does this not stop my actor? (It is a square.)

    I have no clue. Scene gravity is not very efficient or useful, better to use the Accelerate behaviour on the actors you want to be effected by gravity (270°/scene).

    @Creator97 said:
    BTW what is the highest resolution image possible to import in game salad?

    2048 x 2048 pixels.

  • SocksSocks London, UK.Posts: 12,822
    Accepted Answer

    @Creator97 said:
    Don t know what you mean with that.

    The Change Attribute behaviour will change the position of an actor to make it sit on a whole pixel.

  • SocksSocks London, UK.Posts: 12,822
    edited October 2014 Accepted Answer

    @Creator97 said:
    I don t know how to do that?!

    Take a look through the GameSalad Cookbook to see how to work with behaviours and rules.

    @Creator97 said:
    I drag change attribute behavior under each actor I want to sit on a whole pixel. So there is the text:
    Change Attribute: self.Position.X To:???
    What do i have to fill in instead of ???

    This has already been posted above, you've removed the end of my example, replaced it with question marks, and then asked what the questions marks should be ! :smiley: The answer is the question marks should be the thing you have removed ! :wink:

    Change attribute - self.positionX to floor(self.PositionX)

    Change attribute - self.positionY to floor(self.PositionY)

    @Creator97 said:
    Is this then just for when the actor is not moving?

    Your question was "[is there] no way to lock the X and Y position to have just whole numbers?! 30.0 not 30.35?"

    So, this actor you would like to lock to a whole pixel value, would you also like it to be moving at the same time ?

  • SocksSocks London, UK.Posts: 12,822
    edited October 2014 Accepted Answer

    @Creator97 said:
    Yeah bad from me. But how do you see that it works? (I just didn t see and so meant you wanted to say that i have an actor called floor and you have to change it to it s X position.

    'floor' is a maths function, it rounds a number down to a whole value . . . so floor(53.27) is 53 . . . and floor(10.88) is 10 . . . and so on..

    @Creator97 said:
    And then the actor sits on the whole pixels when the scene starts. Right?

    The change attributes posted above places the actor on a whole pixel value for both X and Y.

    @Creator97 said:
    What I meant with that i he skips the ...,1234 X and Y position when he moves. So he is falling down accelerated by 270 degrees and then he sits first at Y 40 and jumps to 41 and is NOT using 40,1 40,12 and so on.

    An actors position on the screen is not determined by its starting position.

    Placing an actor at X10, Y10 does not mean it will only move in jumps of 10 pixels from then on, placing an actor at x100, Y100 does not mean it will only move in jumps of 100 pixels from then on . . . the same is true if you place an actor at X1,Y1, this does not mean it will only move in jumps of 1 pixel.

Answers

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,919

    the plus's resolution is 1920x1080 because of how Retina display works. But the screen size is 960x540 don't confuse the two.

  • Creator97Creator97 Member Posts: 140
    edited September 2014

    and the other questions? Don t you now them? Or did i asked not clear enough. I don t know because I am german.

  • Creator97Creator97 Member Posts: 140

    I think it s clear now. Yeah you are right you not mentioned CPU / GPU but memory.
    So I am pretty sure that it also will affect GPU when you have several higher resolution images moving over the screen...
    Now it s all clear.
    There is no way to lock the X and Y position to have just whole numbers?!
    30.0 not 30.35?
    And there is also no way to lock actors in the scene side by side?!
    The problem is each time I have to look under attributes and then change the numbers there.
    And also I have an actor moving over the screen with x velocity on a platform. The scene has gravity so it would fall down if the platform ends. I copied the platform and put it on the and of the platform but one Y (Position) higher. Why does this not stop my actor? (It is a square.)
    BTW what is the highest resolution image possible to import in game salad?

  • Creator97Creator97 Member Posts: 140

    @Socks
    You said: I have no clue. Scene gravity is not very efficient or useful, better to use the Accelerate behaviour on the actors you want to be effected by gravity (270°/scene).

    I used the accelerate behavior. But you have no clue it s ok.

    You said:
    Change attribute - self.positionX to floor(self.PositionX)
    Change attribute - self.positionY to floor(self.PositionY)

    I don t know how to change it exactly. Don t know what you mean with that.
    When i drag objects they are always 30,4 or 40,3. Is that for letting Gamesalad know that he should place it at X 40,0 and Y 50,0 when I moved an object in the scene at X 40.43 and Y 50,32 (or something like that.)?

  • Creator97Creator97 Member Posts: 140

    I don t know how to do that?! I drag change attribute behavior under each actor I want to sit on a whole pixel. So there is the text:
    Change Attribute: self.Position.X To:???
    What do i have to fill in instead of ???
    Is this then just for when the actor is not moving?

  • Creator97Creator97 Member Posts: 140

    Yeah bad from me. But how do you see that it works? (I just didn t see and so meant you wanted to say that i have an actor called floor and you have to change it to it s X position. Know what I mean? Just thinking over several edges. Is that easy just typing what you said! :D)
    With moving I meant when you fill in the gaps like you said you can t see anything until you start the scene right? And then the actor sits on the whole pixels when the scene starts. Right? So when he moves at beginning he sits 0,0001 seconds on the whole pixels and starts moving. What I meant with that i he skips the ...,1234 X and Y position when he moves. So he is falling down accelerated by 270 degrees and then he sits first at Y 40 and jumps to 41 and is NOT using 40,1 40,12 and so on. I am not stupid just thinking over edges, when you can say this in english how we say it in germany. :D

  • Creator97Creator97 Member Posts: 140

    And how do I see that my gabs are not filled correctly for example when I type foor(self.PositionY)
    ?

  • Creator97Creator97 Member Posts: 140

    And also should it not be floor(self.Position.Y)
    There s always a point in front of the Y or X when I choose it?!
    You typed floor(self.PositionY) Is that really right?

  • SocksSocks London, UK.Member Posts: 12,822

    @Creator97 said:
    And how do I see that my gabs are not filled correctly for example when I type foor(self.PositionY)
    ?

    I haven't got a clue what this means !

  • SocksSocks London, UK.Member Posts: 12,822

    @Creator97 said:
    And also should it not be floor(self.Position.Y)
    There s always a point in front of the Y or X when I choose it?!
    You typed floor(self.PositionY) Is that really right?

    What do you think ? ;)

  • Creator97Creator97 Member Posts: 140

    So I think it s written with point but I need that you prove that and say yes it s written with point or not (You wrote it without) because I trust you!

    And how do I see that my gabs are not filled correctly for example when I type foor(self.PositionY)
    In this example floor is typed without l so does Gamesalad say no that instruction does t exist?!

Sign In or Register to comment.