it doesn’t look right on iOS 7.x. I couldn’t beat the first level because the level didn’t draw completely on the screen. there’s a big blue bar on the right side and the ball doesn’t enter into that area, which is where the gates are.
I’m guessing that the root problem is you are using a variable for x and y for making the game universal.
I had the same problem when I tried using a variable for a universal game, and the iPad air that the apple guy was reviewing the game on bugged out the game for some reason, looked exactly like above.
My variables for a landscape game were something like xMulti=WIDTH/1024 and yMulti=HEIGHT/768, then all fixed numbers would be multiplied by that variable, making it universal. But it didn’t work on all devices for some reason.
I had to switch back to the method that works every time, which is in landscape an object that is 100x100 in the center of the screen would be sprite(WIDTH/2,HEIGHT/2,WIDTH/10.24,WIDTH/10.24). The size of objects are both relative to WIDTH to prevent stretching issues on different aspect ratios. The game got approved the second time around with this method, as well as the other 5 games that I released.
@Crumble Thanks. Your correct in the method that I use to make the game universal. I think that this method works fine for all devices and that this is an iOS 7 problem. Any method of scaling to different resolutions won’t work when WIDTH and HEIGHT are incorrect.
Do you set any variables using width and height at “compile time” (not sure if that’s the correct term, but I mean outside of any function)? If so, width and height won’t reflect the orientation you’ve chosen with supportedOrientations, if the user launches in a different orientation.
It doesn’t seem to be tied to orientation. When it happened to me was with a portrait game. Everything was fine, but the background wasn’t stretching all the way across width wise. You can see in the above picture that the title “Ball Project” is correctly placed, but everything else is out of whack. What is strange is I was unable to duplicate it on my iPad mini 2, iPhone 5, or girlfriend’s iPad 3, but the guy reviewing my app sent me screenshots looking like the above from an iPad air. I can’t remember what iOS version all my devices were on though.
What is strange is that it works when you do the math for each fixed number in real time, sprite(WIDTH/2,HEIGHT/2,WIDTH/10.24,HEIGHT/7.68) for example. However, if you set up a variable that makes the multiple before hand (xMulti=WIDTH/1024 and yMulti-HEIGHT/768), then multiply your fixed number by that multiple, it doesn’t work like it should on all devices/versions of iOS.
I had this happen to me before when I was working on one of my games. The only way I could get it to work was by putting a for loop in the setup calling it twice. I don’t know why I had to do this, but it worked for some reason.
@Crumble Positions and dimensions that are defined at setup are scuwed and positions and dimensions that are calculated real time (WIDTH/2) are correct. I think WIDTH and HEIGHT work in real time because its done everything it needs to do with supportedOrenations(). If you try and use WIDTH and HEIGHT before its done what it needs to do with that, I think thats when scaling problems occur. I initialize all of my constants in a function that I call at the start of setup to avoid such problems.