Universal binary and assets
sabshire
Member Posts: 15
Ok, just beginning to check out game salad. I come from being a very experienced developer to this platform. I like the concept, and I think this could be a great tool to create some games without a lot of the headaches with development. I do software development (not game related) professionally, have created games for the iPhone, but would like to enjoy making games, and not worrying about writing all of the code.
I say all of that to ask for help in understanding how the assets work in game salad. I'm used to developing the assets for each device resolution (ipadhd, ipad, iphone5, iphone4s, iPhone) and then selecting the sprites (usually based on filename extension) to determine which assets I need to load. I can't seem to determine how you create a game that would be universal, having nice crisp graphics on each device.
Help me understand how this works. I've done some searching on the forums, but I guess I am not searching for the right thing, as I have not found anything yet. And my playing around in the tool has left me scratching my head.
Thanks a bunch!
I say all of that to ask for help in understanding how the assets work in game salad. I'm used to developing the assets for each device resolution (ipadhd, ipad, iphone5, iphone4s, iPhone) and then selecting the sprites (usually based on filename extension) to determine which assets I need to load. I can't seem to determine how you create a game that would be universal, having nice crisp graphics on each device.
Help me understand how this works. I've done some searching on the forums, but I guess I am not searching for the right thing, as I have not found anything yet. And my playing around in the tool has left me scratching my head.
Thanks a bunch!
Comments
GameSalad just recently got the ability to publish apps as universal binaries. Lets say you create an app for iPhone 5 and publish it as a universal binary. The app will look normal on an iPhone 5, but it will be letter-boxed (have black bars on either the top or bottom, like a widescreen movie) or cropped (zoomed in) on other devices such as iPhone 4 and iPad. That is without doing anything to the app to make it more compatible with other devices. To make look better on other devices, you will have to change camera settings, but this can cause some actors to look stretched, but the game will not be cropped or letter-boxed on the device. This method is found here: http://forums.gamesalad.com/discussion/53589/universal-build-tutorial-with-project-file#latest
Another method is to re-size and re-position all of your graphics and actors, based on the device. A method based on this is found here: http://forums.gamesalad.com/discussion/53670/new-universal-build-method-iphone-4-iphone-5#latest
What I do when I am making my games, is I use large sized (pixels) graphics from the start. This way, I can just scale them down for smaller devices, and then if I want to make it work with other devices, I just scale the actors respectively, and there is no quality loss, because the graphics sizes are already large.
Anyways, I hope this helps you a bit!
~Josh
When I create a new project, and add a scene, and have selected iPhone landscape in the project (for example), and I add my assets which are sized correctly for the retina display... I drag one onto the scene, and it's twice the size since the scene has it's width/height set to half (568x320) of what it should be (1136x640).
In addition, it seems that it resizes my assets a little as well. As an example, I have a block graphic that is 128x128, and it should be that size on the retina iphone display. When I drag that on to the scene, and then inspect it's size, it was 134.xxx x 134.xxx
Why?
I don't mind having a single set of assets that are sized automatically for the lower resolutions... I just need to know how to set the project up so that it will work. One additional note, I did select the Resolution Independence setting when I started the project. Unchecking that, and adding the same 128x128 graphic results in it being sized up to approximately 256x256.
Ok, well, that answers the question then. I just need to make each actor size to the smallest needed, and then let the resolution independence size them up. I just need to make sure I use the larger size assets when I import.
One additional question, if I want to make an app universal, what should the camera resolution be? I don't mind setting positions based on the device, but do I need to adjust the resolution as well for the camera? The game I am wanting to work on would not be scrolling the display, but I would like to utilize the whole display. I don't want to stretch the graphics, but would like to use the extra space when we have it.
Once that is checked off drag art into the actor window to crete an actor will make the actors half the size of the image file. You will have to drop the images onto the already created actors again to get them to resize to half res properly. but once you fix that and check RI you will see things as far as actor sizing work a little more as expected.
I set an actor on the scene that I unlock and have that grab the display height/width in pixels, toss those values into global attributes and then you have a reference point to place your actors. That's assuming you're placing them after scene load, which coming from a dev background may make more sense to do as it's a setup you may be more comfortable with.
As for the scaling issue, @tenrdrmer: If I import a 128x128 image and put that on an actor, the actor does not scale to the image size. So if 128x128 is the size you're looking for, the actor needs to be resized manually. Maybe the OSX version of GS Creator resizes the actors to the image size? The Windows version does not.
Hopefully after you see this, maybe you can shed some light. Basically I have a new project, add a 128x128 image, drag that and create an actor. It's size is shown as 134.3238x134.3238 Drag this on to the scene, and it is not sized in half. It remains the same size. Resolution Independence is selected. Running on the Mac, OSX 10.7.5
So now I just need to tweak my gfx in Inkscape so that everything is at 72dpi. Not quite sure how I am going to do that, but at least now I know the reason.
Thanks so much! That was a big help.
Does it also resize it to 64x64px when dragging into a retina project?
Welcome btw!
Lump Apps and My Assets
You just need to make sure your images are 72ppi and then GS will create the actor at the correct size.
The 128x128 image scales to 64x64 when I import it, so it appears to be correct.
I find it hard to imagine that GS is simply picking an arbitrary value when it comes to sizing the actors - I guess there is some meaning in GameSalad's madness here.