Offsetting images on screen based on device heights
Hi all,
Ive had to redo my game back in 10.0.4 for some reason my new version, the buttons wont work in the 11.0.xxx versions, even though they work fine in 10.0.4. I've sent support an email on this.
Anyways. Ive used the screen offset instructions from the SantaGO template.
Created an actor that contains all the offsets, and then put it off screen so its not visible.
Then Ive added the offsets to all the stationary actors on the different scenes based on whether they need to move down if they're at top of screen, or up if they're at bottom.
Im posting screenshots of what Ive done to see if someone can tell me if Ive missed something.
I also ensured that the attribute game.Offset is in the game attributes as an integer.
I've tested this out on viewer and also published and tested directly on my ipad, but its still cropping off the top and bottom of the screen by around 60 pixels.
The initial game was set up for iphone5 and published as IOS universal with overscan checked.
Any advice would be greatly appreciated.
Download UfoBlaster on the iTunes store
Answers
Is it just some buttons that you need to move around depending on screen size or is it also the background?
@dues Its all the buttons, the background is fine as it works with the overscanning.
I had another look at the app on ipad before I crashed. The buttons are starting to show, so the screen check actor I put in must be working, but I haven't allowed enough offset.
Now that I know its working I can probably work out the offset myself with some testing back and forth, but if anyone knows how much to offset based on the resolutions I think that'd be great to be shared on the forum
Download UfoBlaster on the iTunes store
I'm not on my Mac right now to test it, but shouldn't it be 1024 instead of 1,024?
@opa thats something I thought to, but everytime I type in 1024 it automatically adds a comma
Im going to google about offsets and see what I come back with
Download UfoBlaster on the iTunes store
I'm 99.1% sure that it should be 1024, have you tried to change that value with expression editor?
yep that did fixed it.
But still, the screen sizing is working based on the screen check actor I made, just need to work out the exact offsets
Download UfoBlaster on the iTunes store
This method changes the position of an actor based on screen size, and also calculates the proper size of the actor.
Maybe this could help
http://forums.gamesalad.com/discussion/53670/new-universal-build-method-iphone-4-iphone-5/p1
Thanks I'll take a read of that. If I can get the problem that Ive sent across to support about 11.0.12 to work, then the stretch option will work fine for me, but in the mean time working this out without relying on stretch will be handy
Download UfoBlaster on the iTunes store