Universal binary and assets

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!

Comments

  • VoidedSkyVoidedSky Member Posts: 1,095
    Hey! and welcome to the forums!

    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
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    It's important to note gamesalad only allows one set of graphics to be loaded into the project. When you publish it will use those graphics for the build and if you have checked resolution independence it will create the half sized art files needed for the non retina devices. Besides that you really don't have much control over what assets are used.
  • sabshiresabshire Member Posts: 15
    Ok, those answers help some, but I have a couple more issues.

    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.
  • BrackAttackBrackAttack Member Posts: 22
    I could be mistaken, but I don't think Gamesalad 0.10.1 for mac supports true iPhone 5 optimization yet. That may be one issue.
  • PixelMetalPixelMetal Member Posts: 283
    Ok, those answers help some, but I have a couple more issues.

    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.
    Basically, because even though GS shows the image size when you import an image it doesn't really pay attention to it in any way, and you have to manually resize every actor to the proper size.

  • MantoManto Member Posts: 796
    Ok, those answers help some, but I have a couple more issues.

    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.
    Do you have your graphics ppi at 72? All the graphics will have to have 72 ppi when using GameSalad.
  • sabshiresabshire Member Posts: 15


    Basically, because even though GS shows the image size when you import an image it doesn't really pay attention to it in any way, and you have to manually resize every actor to the proper size.


    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.

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    No no. You do not need to resize your actors per say. Yes they are coming in larger than expected but its due to you not having Resolution independence checked off in the summary/info screen.

    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.
  • PixelMetalPixelMetal Member Posts: 283
    @sabshire

    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.
  • sabshiresabshire Member Posts: 15
    edited February 2013
    Ok, created a video to maybe explain this a little bit better.



    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
  • LiquidGameworksLiquidGameworks Anchorage, AKMember, Sous Chef Posts: 956
    @sabshire I just did a test. I think if you make your source image at 72 resolution, it should work properly. I conducted tests at both 72 and 300 (common output), and it worked perfectly at 72, and similarly to yours at 300.
  • sabshiresabshire Member Posts: 15
    edited February 2013
    @sabshire I just did a test. I think if you make your source image at 72 resolution, it should work properly. I conducted tests at both 72 and 300 (common output), and it worked perfectly at 72, and similarly to yours at 300.
    It's not 300, but you are correct that the DPI is the issue. I created the graphics in InkScape, and exported them. When I inspect this image in Preview on the Mac, I find that it is 34.29 Image DPI, resolution 128x128. Doing some math, I divided 34.29 by 72, and then divided 128 by that result, which gives me an approximate value of 268, dividing that by 2, and I get the 134.3238.... So that explains it.

    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.
  • sabshiresabshire Member Posts: 15
    Went into Mac Preview, edited the DPI setting to 72, it left the image size at 128x128, saved it, and then imported into Game Salad, and it works as expected. Ok, learned something new today. Very interesting to say the least. Thanks again @LiquidGameworks!
  • LumpAppsLumpApps Member Posts: 2,881
    Great, you figured it out. ;)
    Does it also resize it to 64x64px when dragging into a retina project?

    Welcome btw!
  • SocksSocks London, UK.Member Posts: 12,822
    edited February 2013
    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.
    @PixelMetal

    You just need to make sure your images are 72ppi and then GS will create the actor at the correct size.
  • sabshiresabshire Member Posts: 15
    Great, you figured it out. ;)
    Does it also resize it to 64x64px when dragging into a retina project?

    Welcome btw!
    In the project I created, the size is 568x320 (so I assume it is retina as that is half the iPhone resolution), unless there is a specific setting you are referring to.

    The 128x128 image scales to 64x64 when I import it, so it appears to be correct.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Sounds like you have it set properly now. But yes it is possible to make a non retina project at 568x320 you just need to make sure you have resolution independence checked and you will be set for retina.
  • PixelMetalPixelMetal Member Posts: 283
    @Socks it doesn't in Windows GS. It might on Mac.
  • SocksSocks London, UK.Member Posts: 12,822
    edited February 2013
    @Socks it doesn't in Windows GS. It might on Mac.
    Very odd ? I'm guessing there then must be some other piece of data (besides absolute pixel count / ppi - etc) that Windows GS is reading from the image files ?

    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.
Sign In or Register to comment.