Can we move the entire scene without changing the camera or the camera origin?

vikingviking Member, PRO Posts: 322
I would like to change one attribute and move the entire scene 44 pixels to the right on the x axis so that my iPhone 4 version fits perfectly on the screen in my game that was saved as an iPhone 5 project. This way I could ship the game as a universal build that would run perfectly on all iPhones and iPods. However, the only way I have figured out to solve this problem is to take every actor in every scene and move them all 44 pixels to the right, but I would like to avoid the pain of doing this tedious process for hundreds of actors.

I don't want to change the camera origin, because that seems to change the interaction with the actors which is also a lot of work to fix. (Collision is suddenly offset by 44 pixels making the game unplayable...)

Am I missing something here? Is there a simple way to move the entire scene 44 pixels in any direction? If not, shouldn't there be an option to do this in GameSalad?

Comments

  • vikingviking Member, PRO Posts: 322
    Then maybe I can make a feature request @CodeWizard?

    I would like to be able to unlock an actor in a scene and add the following logic:

    If screen width = 480
    Change attribute current scene position x to current scene position x +44

    If I had this then I would not have to worry about aspect ratio issues between iPhone 4 and iPhone 5, at least not in my game. Sure, I can add this logic to every actor in my game the hard way, but I think access to the scene x and y coordinates would be a great (and hopefully simple) tool in GameSalad.

    What do you think?
  • mataruamatarua Auckland, New ZealandMember Posts: 854
    You can do exactly what you said, above, already. It's in the drop downs.
  • vikingviking Member, PRO Posts: 322
    I don't think so. I am pretty sure that the current scene position x and y coordinates are not accessible. @Matarua - If you are sure, then where exactly in the drop downs can you find this?
  • artfishartfish Member, PRO Posts: 369
    @Viking It would be great if we had a multi select and and transform entry field (a box to enter move all selected items xposition+44 pixels, etc.) but we do not yet. ;( I was just asking about this last week. I ended up just using overscan and creating rules to adjust my HUD actors positions depending on device.screensize. Not the best workaround, but it worked. Good luck finding a suitable alternative for your project.
  • vikingviking Member, PRO Posts: 322
    @artfish I think so too.

    @CodeWizard It seems to me that switching from a saved iPhone 5 project to an iPhone 4 project using Crop will center the scene from the middle and therefore cut off the scene at both ends on iPhone 4. We should have a Crop Left, Crop Right and a Crop Center (which is actually what we have now) option so that every project can be more easily supported across multiple screen formats. It would be so elegant and a lot of GameSalad users would not struggle so much with making their game run on all the devices.

    (Or just the option to move everything in the scene together to wherever we want it :)

    Don't you agree?
  • LiquidGameworksLiquidGameworks Anchorage, AKMember, Sous Chef Posts: 956
    @viking You can access an actor's current position. You could make a global attribute, calling it "Offset". Then add a rule to all your actors that says "If screen width = 480
    Change self position x to current self position x + game.offset". You can create the one rule, then copy paste into all of your actor prototypes. Change the offset attribute to 44, then you should be good to go.
  • vikingviking Member, PRO Posts: 322
    @LiquidGameworks Thanks for the message :) I know that I could do it this way and perhaps I will have no choice but to go through hundreds of actors and add this logic to almost all of them. It is not as easy as just adding to every actor by the way. Some of them need special logic and it is going to be painful. It seems to me that since we will always support multiple screen formats in development, moving the entire scene should be one of those simple additions to make our lives easier. It is difficult to keep logic for every possible screen format clean as it introduces opportunities for human error.
Sign In or Register to comment.