Scene size change question...

gamesfuagamesfua Member Posts: 723
edited March 2013 in Working with GS (Mac)
Hey all! This is either the world's dumbest question or a question that may inspire future solutions.
Heres the situation.
My game was originally iPhone legacy landscape. I converted the project to iPhone 5 landscape.
Problem is on scenes that i had not made wider than 480 (on the original legacy project) that now there is an inch gap on the right side of the scene. This wouldn't be horrible IF I had more scene width to the left of the scene because then i could just center the camera over the scene and crop.
Instead i have to literally move hundreds of images and layers over to the right. Spawn coordinates are also affected.

So the question is, is there any way to add more width to the left of the scene OR any easier way to move all assetts to the right?
Real despearate on this question. Any help would be so appreciated.
Thanks! :)

PS- i imagine one solution is to put a line of code in every single object that says, on start, change position attributes to x amount to the right. But i'm thinking that just makes for sloppy code and bloating.

Best Answer

  • beefy_clyrobeefy_clyro Posts: 5,394
    Accepted Answer
    @anatomyofdreams unless i'm massively mistaking something, can you not just leave it as legacy and create an actor on each of your scenes, unlock it and create the following rule;

    If game.Screen.Size.Width = 568
    Change attribute Scene.Camera.Size.Height to 378
    Change attribute Scene.Camera.Origin.Y to -29

    Then use crop. I've used this on LAD and LAD:Run and both have worked great, occasionally I have needed to tweak a couple of bits but generally has worked great.

Answers

  • SolarPepperStudiosSolarPepperStudios Member Posts: 754
    What did you convert it with?
  • gamesfuagamesfua Member Posts: 723
    @utveckla_games thanks for helping out! :)
    Originally iphone 4 legacy landscape. Saved as an iphone (5) landscape project. For the time being i'm focusing on getting it compatible between iphone 4 and 5 full screen via crop/overscan.

    Thus far the way i've been doing it, is by recording the x coordinate of the background image. Then moving it until its center in the iphone5 camera. Recording that number. Then subtract the difference (example 42 x).
    I then take every actor and spawned object and redo the x coordinates by adding (example 42) to it. Its teeeeeeeeedious. But its working.

    This is all because i can't move the camera anymore left to center the screen. When you add extra width to the scene it only goes to the right. I'm not complaining about that- as i think i understand the purpose for it. But i'm curious if there's a faster workaround.
    Thanks!

    PS- My game is being built twice. There's an iphone 4 and 5 version of each level within the game. Screen size detects which version you should go to. I had to do this because my game is far too complex for a single actor/camera fix.
  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    @anatomyofdreams - I feel your pain. X(
    I am having this same problem, it is extremely annoying.
    - Thomas
  • gamesfuagamesfua Member Posts: 723
    @snapfirestudios part of me is relieved that i'm not the only one. More of me just feels bad for you haha ;) Its a real headache isn't it?
    If i was ever to make a suggestion to gs it would be to help automate this. Not too hard if you ask me. Here's how i see it working.
    1.) you highlight all of the actors you want to move. When selected gs records the origin point. When you release, it records the new destination. It records the difference between the two values and saves it as value x.
    2.) you can now click on any actor. When you want to add this value x to an actors attributes, simply click on the attribute (i.e. change attribute self position x) and hit some kind of button or shortcut key. The value x will be added to the attribute.
    3.) this would be the solve if you ask me. Or at least one of the solves. We can't be the only ones going through this nightmare.

    The only other thing i can think of is a zoom feature.

    Good luck my friend. I certainly feel your pain. I've got well over 100 scenes with like 50 actors and spawn points in each. Best of luck to you! Lets keep eachother posted if we come up with some helpful tricks. Hopefully someone will post a response here and say, "hey morons press the button over there."
    ;)
  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    Hopefully someone will post a response here and say, "hey morons press the button over there."
    ;)
    Wouldn't that be nice.
    - Thomas
  • quimququimqu Member Posts: 22
    Hi,

    I suppose your camera size is 480x320. If you make your camera size proportional to the iphone 5 screen dimensions, but keeping the 480 widht, it might work. That means changing the camera size to 480x270.

    Hope it works!
  • LumpAppsLumpApps Member Posts: 2,881
    In a way what you are saying is make the scene less high?
    Interesting.
  • ChakkuChakku Member Posts: 1,513
    @anatomyofdreams
    Maybe you can give every actor a tag, and make a rule saying to change every actor with tag 'actor' position.x to position.x+that inch of space.

    Just a thought :)
    Chakku
  • quimququimqu Member Posts: 22
    Yes, if you dimension the camera to the screen ratio of the iphone5, once you play the game in the iphone 5, the game is not deformed and it works at fullscreen. Of course you must reposition the actors that are cut by the new camera dimensions.

    At least that worked for me when I did the same thing for the iPad screen, which is wider than the iphone 4. And it worked perfectly.

    It's a fast way to convert to diferent screen ratios (iphone 4 to iphone 5 and iPad).
  • gamesfuagamesfua Member Posts: 723
    I'll give these all a shot! Thanks so much everyone! Really appreciate it! :)
  • Brand0n1210Brand0n1210 Member Posts: 12
    If nothing works, Darren on deepblueapps.com has a wonderful project resizer program for sale. I know your probably not looking to buy something but it's really useful!
  • iZeeBoiZeeBo Member Posts: 8
    what you can also do is you can just go to scene which is next to game which is selected already. but make sure that you are in the scene that you want to edit. then you get a second attribute box with all different attributes. But these all relate to the scene that you are in right now so they are not made for actors. Then you simply click on the arrow which is on the left hand side of the text size. this is the third one in the column. then you will get 2 options which say width and height, then you put in the sizes that you wish to have in the scene. hope this helped you guys.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
  • gamesfuagamesfua Member Posts: 723
    Just to be clear this question wasn't about how to move a camera or change scene size. The problem was that when you go from iphone 4 to 5, there's an inch of space to the right. So that means ALL OF YOUR ACTORS and ALL OF YOUR SPAWN POINTS need to also MOVE TO THE RIGHT. I was curious if there was some magic way of course correcting it all without doing it manually. But it doesn't matter now. That was ages ago. I just manually re-did the entire game in two different versions (iphone 4 and iphone 5 version). There really was no other way around it. I didn't like the camera tricks (as it squished stuff). But thanks ya'll! :)

    @fryingbaconstudios I want to put your answer in a frame and worship it as the single greatest blow-off response of all time.

    @izeebo thanks! But the question wasn't about changing the size of the scenes. But I appreciate the effort :)
  • gamesfuagamesfua Member Posts: 723
    Thanks @beefy_clyro
    Really appreciate that. But unfortunately aside from the game looking stretched by that method, there's also many other problems that have to do with conflicting camera data in the game, etc.
    But people should definitely take note of what you've so generously explained! I think it will help many other people out.
    Thankfully this is all behind me now. This post was from March. I've already just recreated the game from scratch. Making two versions of the same game. When the device detects width it takes you to the appropriate version. My game is just sooooo massive and has so many different types of games in it, that there never appeared to be a one trick solution that worked for everything and didn't sacrifice quality.

    thanks again my friend! :)
  • mataruamatarua Auckland, New ZealandMember Posts: 854
    Beldor has the best blow-offs.
Sign In or Register to comment.