Ball Project: Out Now!

Greetings! My very first iOS app is now live on the app store! I wouldn’t have been able to make it without your guy’s help so thanks. Please go check it out and spread the word.

Link to App: https://itunes.apple.com/us/app/ball-project/id961358098?mt=8

https://www.youtube.com/watch?v=8RPITp4I-WM

very nice video!

it looks sci-fi and high-end

Hey, I just decided to drop in on the forums for the first time in… who knows how long. Anyways, I saw this, and I really want to congratulate you. You’ve come a long way since when you first joined.

Good luck with your adventures!

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.

@matkatmusic What device and iOS version? Did you try restarting it?

@Jmv38 @firewolf @Zoyt Thanks for the praise guys. Welcome back Zoyt.

http://s8.postimg.org/bl6h91n11/image.jpg

So the dimensions are off for any device on iOS 7. How could that be?
Edit: Investigating.

So on iOS 7, it thinks its in portrait mode when it launches.

Edit: I made a hack fix to the bug and I’m now waiting for Apple to approve the update. The update also fixes some minor problems.

Nice looking game!

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.

@Goatboy76 I believe the apple guy who reviewed my game was on iPad Air on iOS 8. I’m guessing @matkatmusic is on an iPad Air.

ipad 3, actually.

@matkatmusic Thanks for letting me know about the bug.

The problem must be that WIDTH and HEIGHT are wrong when you set your variables

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.