Universal Binary~Tutorial
Hi,
This method works very well for my games, and thought I should share. Now, this isn't a real universal binary, but it is setup, so that all you have to do is change the project type and publish again. So easy.Please like.
This method works very well for my games, and thought I should share. Now, this isn't a real universal binary, but it is setup, so that all you have to do is change the project type and publish again. So easy.Please like.
Comments
http://forums.gamesalad.com/discussion/32594/resizing-to-ipad-technique
BTW the "IF and ONLY IF I GET 10 likes on this post, will I post the tutorial. Please like." is so freaking lame I should just delete your post all together. This is a community of sharing. Yes there are somethings that cost money but for the most part the people who sell there time give ten times that for free with no strings attached.
Now If your method is not basically what I have listed out in that thread then please feel free to share. But please do not set conditions on your contributions to this community.
WidthRatio (real)
HeightRatio (real)
Create a scene at the begging of the game. Call it RatioFinder. Then create a new actor, call it RatioCalculator. Put the actor in the middle of the scene. Now, you must find put the width and height of the device you really designed the game for, for example if you made it for iPad then you would 1024 in the width and 768 for the height. Then in the actor add the following rule, change attribute game.WidthRatio to game.Screen.Size.Width/(the width of the device you originally designed the game for). Then add another change attribute game.HeightRatio to game.Screen.Size.Height/(the height of the device you originally designed the game for). Then add a timer (run to completion) that changes the scene to the main scene. Now, we are going to design a custom behavior. Make a group and call it Resize in an actor of your choosing. In it add 4 change attributes.
The configurations:
self.size.width to self.size.width*game.WidthRatio
self.size.height to self.size.height*game.HeightRatio
self.position.x to self.position.x*game.WidthRatio
self.position.y to self.position.y*game.HeightRatio.
Make this a custom behavior. Drag it onto all of your actors and backgrounds.
See in my method you don't need to add stuff to every actor you only need to add extra rules to actors that need to maintain a specific visual dimension like Circles and Squares most others look fine even when they get a little distorted on their original dimensions. Then the only thing that goes into every scene is a camera controller that makes the camera size on the scene the size of the original project.
Also the only expression that needs to be added to adjust the actor dimensions on anything you want adjusted is to multiply the width of Height one by 0.9 its different based on orientation and platform. For me I always go from iPhone to iPad and Nook/Fire so portrait iPad you would multiply width by 0.9 and then portrait Nook/Fire you would multiply height by 0.9 then do the opposite dimensions for Landscape orientations.
I actually setup a few Game Attributes so I can set what resolution and platform its going to. So then all my links on the iphone version go to iphone stuff and the ipad versions go to ipad nook version goes to nook etc….. and the actors adjust their size accordingly as well.
Then I only have do make and update to one project and I can publish a binary for every single platform out of that one project file.
It would make a lot of stuff easier.
Thanks
If I build the original game on an iPhone, I just change the camera width,height and tracking on every scene to match the iPhone dimensions. I have three files. 1 iPhone, 1 iPad, and 1 Kindle (which I use for all android). That's it. I don't add any additional actors, behaviors, or anything. I haven't had anything skew so badly that an iPad or Android user would even think its skewed. Only by comparing between devices may you see a difference, and its very slight. I've only done this with 3 games, so I can't say it'll work every time, but its all I do.
Tenrdrmer's technique
http://forums.gamesalad.com/discussion/32594/resizing-to-ipad-technique
My link:
http://forums.gamesalad.com/discussion/32546
My technique uses game.Display.Width and game.Display.Height to auto-scale to screen size, combined with bradherman's technique for scaling actors and position.
Once you have it setup, it's really easy and worked well. It essentially worked exactly like how the GS viewer seems to handle previewing apps on your iPhone projects on an iPad. The GS viewer scales everything up, and it works like a universal app, it just doesn't do the automatic graphics scaling. That can be handled easily with a few attributes to scale based on "if iPad" using @bradherman technique.
It's not at all difficult to implement, though some claim it doesn't work for all types of games. I haven't had any issues yet, but that may be because my instrument apps are more simple than a more complex and in-depth game.
Unfortunately, I just discovered that it appears GS has closed this option with 0.9.91, if I create a new project it won't work, but my old ones still do. It's frustrating as I was getting used to easily bouncing between iPad/iPhone with my technique.
I believe it is related to this post: http://forums.gamesalad.com/discussion/37897/change-regarding-scene-attributes-in-custom-behaviors
So it seems the best strategy is to use tenrdrmers technique until GS opens this option up again in the next Creator update, or gives us real Universal Support.
Edit: Fixed your Link. It was not deleted just on the old URL format. -tenrdrmer