Resizing to iPad technique - same project file
Hey guys,
I just started converting Penguin Pounce to the iPad by using Tenrdrmer's technique he shared with us not to long ago.
It works great, however, I had thought that I would need to save my project file as Penguin Pounce HD for example. Then I would create the iPad version on that new project file separate from my iPhone one. This is just how I thought, I don't know if this is what you had thought.
I got to thinking, what if I need to change my iPhone version because it has a ton of bugs? (not saying it does) Then I would have to fix them in the iPad version wouldn't I?
I have configured a way to have it IN THE SAME PROJECT FILE. Just thought I would share. If you already know this, then don't bother reading.
I created a real attribute (global) called iPad/iPhone and set it to .9
Then I went into each actor and put a change attribute:
change attribute self.width to self.width*game.iPad/iPhone (which would be .9)
I also did this for the self.height since my game is landscape.
I did that for all my actors. I then created a new actor called iPad/iPhone
I dragged this into my scene, unlocked it, and put this:
Rule: if game.iPad/iPhone = .9,
change attribute: current scene.camera.size.width to 480
change attribute: current scene.camera.size.height to 320
change attribute: current scene.camera.origin.X to 477 (since my camera is off a little)
OTHERWISE
change attribute: current scene.camera.origin.X to 477 (this is used for me when I convert the project file back to iPhone)
----------------------------------------------------------------------------------
Now here is the cool part:
just go and change the file to iPad landscape and you should have a working iPad project!
How do you change it back to iPhone?
Just change it back to iPhone landscape, and go into your attributes and change iPad/iPhone to 1.
That should do it!
NOTE: You will have to have an unlocked actor in each scene that does this rule:
Rule: if game.iPad/iPhone = .9,
change attribute: current scene.camera.size.width to 480
change attribute: current scene.camera.size.height to 320
change attribute: current scene.camera.origin.X to 477 (since my camera is off a little)
OTHERWISE
change attribute: current scene.camera.origin.X to 477
..Then it should work.
I haven't come across any issues and I just thought I would share.
Hope this helps someone.
Braydon
I just started converting Penguin Pounce to the iPad by using Tenrdrmer's technique he shared with us not to long ago.
It works great, however, I had thought that I would need to save my project file as Penguin Pounce HD for example. Then I would create the iPad version on that new project file separate from my iPhone one. This is just how I thought, I don't know if this is what you had thought.
I got to thinking, what if I need to change my iPhone version because it has a ton of bugs? (not saying it does) Then I would have to fix them in the iPad version wouldn't I?
I have configured a way to have it IN THE SAME PROJECT FILE. Just thought I would share. If you already know this, then don't bother reading.
I created a real attribute (global) called iPad/iPhone and set it to .9
Then I went into each actor and put a change attribute:
change attribute self.width to self.width*game.iPad/iPhone (which would be .9)
I also did this for the self.height since my game is landscape.
I did that for all my actors. I then created a new actor called iPad/iPhone
I dragged this into my scene, unlocked it, and put this:
Rule: if game.iPad/iPhone = .9,
change attribute: current scene.camera.size.width to 480
change attribute: current scene.camera.size.height to 320
change attribute: current scene.camera.origin.X to 477 (since my camera is off a little)
OTHERWISE
change attribute: current scene.camera.origin.X to 477 (this is used for me when I convert the project file back to iPhone)
----------------------------------------------------------------------------------
Now here is the cool part:
just go and change the file to iPad landscape and you should have a working iPad project!
How do you change it back to iPhone?
Just change it back to iPhone landscape, and go into your attributes and change iPad/iPhone to 1.
That should do it!
NOTE: You will have to have an unlocked actor in each scene that does this rule:
Rule: if game.iPad/iPhone = .9,
change attribute: current scene.camera.size.width to 480
change attribute: current scene.camera.size.height to 320
change attribute: current scene.camera.origin.X to 477 (since my camera is off a little)
OTHERWISE
change attribute: current scene.camera.origin.X to 477
..Then it should work.
I haven't come across any issues and I just thought I would share.
Hope this helps someone.
Braydon
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Comments
It prob would be a good something to have posted in that thread in the interest of organization. Also keep in mind for nook/fire you will need to adjust the width and height the opposite of what you do for iPad.
Glad you liked that technique. It has save me hours on end. And it even works for expanding and iPhone app out to iPad size or prob many other sizes for Mac apps.
Cheers
Aaron
Reading your post correctly, would you like me to post this in that thread?
Yes, It's great and only took about hour for me to sort everything out and get a good bit done. Now that the coding's done, Ill just go into each scene and unlock that actor.
Braydon
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx