Simulating iPhone game (appearing stretched in portrait mode)
by Mr Zurkon · in iTorque 2D · 08/07/2011 (4:56 pm) · 8 replies
I've recently tried to deploy/test an it2d game on an actual iPhone (3g), but for some reason the resolution appears different from what it does when using the simulation tools in xcode.
I've set screen orientation to portrait and resolution to 320x480 in TGB. I've also checked "portrait mode" in xcode to be sure.
When I'm trying to run the game on an actual phone the game appears stretched as if it was in landscape mode (however, the orientation of the game is correct). This does not happen when simulating an iphone on the mac. The aquarium example (landscape) works without any problems.
Anyone have an idea what might be causing this issue? Do I need to set the resolution in xcode as well? I didn't specify anything for the aquarium example and it worked perfectly.
I've set screen orientation to portrait and resolution to 320x480 in TGB. I've also checked "portrait mode" in xcode to be sure.
When I'm trying to run the game on an actual phone the game appears stretched as if it was in landscape mode (however, the orientation of the game is correct). This does not happen when simulating an iphone on the mac. The aquarium example (landscape) works without any problems.
Anyone have an idea what might be causing this issue? Do I need to set the resolution in xcode as well? I didn't specify anything for the aquarium example and it worked perfectly.
#2
08/08/2011 (6:27 am)
That's weird. I'll try to test this on an iPhone and iPod later today.
#3
mainScreenGui.Extent = "480 320"
sceneWindow2D.Extent = "480 320"
to "320 480", but still nothing happens. I also added something to the echo statement so I could make sure that it read the file. Are there any other places I can override landscape to portrait manually? I found some earlier threads on this issue, but it seems it was fixed with 1.4 (?). I'm using 1.5 preview 1.
as i mentioned earlier, this is not an issue when running it with simulator.
08/24/2011 (8:26 am)
I tried to set it manually in main.cs where I editedmainScreenGui.Extent = "480 320"
sceneWindow2D.Extent = "480 320"
to "320 480", but still nothing happens. I also added something to the echo statement so I could make sure that it read the file. Are there any other places I can override landscape to portrait manually? I found some earlier threads on this issue, but it seems it was fixed with 1.4 (?). I'm using 1.5 preview 1.
as i mentioned earlier, this is not an issue when running it with simulator.
#4
08/24/2011 (9:10 am)
Check your camera settings in the level file (.t2d).
#7
08/25/2011 (10:45 am)
Yes, I'm trying to make it run in portrait. The problem is that it runs in landscape regardless of what I specify. This only occurs on a (real, non-simulated) iphone 3g. It works when using the simulator.
#8
07/16/2012 (4:46 pm)
hi, I'm wondering how do I run my app on my iphone, I use itorque 2d 1.5 with latest xcode and iphone 3gs. Also, can someone PLEASE tell me how do I use the gyroscope as controls in my code?
Torque Owner Mr Zurkon
see line 6: "mainscreen set to landscape". When I try to build on the iPad (exact same version of the game), it says "set to portrait" like it should, because that's what i've defined everywhere. For some reason the iPhone (3g) is ignoring this and setting it to landscape anyway.