Scene size change question...
gamesfua
Member Posts: 723
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.
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_clyro Posts: 5,394@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
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.
I am having this same problem, it is extremely annoying.
- Thomas
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."
- Thomas
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!
Interesting.
Lump Apps and My Assets
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
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).
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
@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
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!
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS