Game Development Community

iPad Woes

by Matthew M. White · in iTorque 2D · 10/06/2010 (10:46 pm) · 22 replies

Whyyyyy is this happening?

I have followed all the other threads
(setting project to iPad, updaing the .xib, setting XCode target to iPad)

img17.imageshack.us/img17/9600/screenshot20101006at744.png

Also it's orange because I changed the background colour from white to orange in interface builder.
It's my favourite colour.

Otherwise it would be white.
Page «Previous 1 2
#1
10/07/2010 (7:23 pm)
Bump... still having this issue.
Recompiled everything..

Cheers!
#2
10/07/2010 (8:02 pm)
I'm starting to think it has something to do with the .xib because... all of the openfeint .xibs work fine. That is also integrated through Torque ... so I'm assuming its our xib somehow. I'll rebuild that entirely and see if it works.
#3
10/08/2010 (1:28 am)
Matt I wish I could help you, I did not have this issue putting a game on the ipad (no I had other issues). As far as I know I just selected the iPad settings in 1.4.

#4
10/08/2010 (7:20 am)
I don't use IT2D or iT3D, but works with obj-C on iPhone/iPad.

Technically, the problem you see is that the UIView that contains your background image is not located at the top-left corner of your window. Your window is another UIView whose background you set to orange.

The position of the UIView that contains you image is defined by its 'frame'. A frame is a CGRect structcontaining properties 'location' (with x and y sub-props) and 'size' (with width and height sub-props).

So, you can redefine the frame of your UIView with
myView.frame = CGRectMake(x,y,w,h);

Or define it in interfaceBuilder, in the 'meter' pane with the ruler on it (I'm not sure of the name because I never use IB).

Nicolas Buquet
www.buquet-net.com/cv/
#5
10/08/2010 (12:02 pm)
iT2D does not use UIViews etc at all for any "ingame matter", it uses an EAGLView as any realtime media engine actually to which it renders geometry :)
#6
10/08/2010 (1:13 pm)
I didn't know about iT2D using EAGLView.

But EAGLView doesn't exist in Cocoa/UITouch.

It is a class defined by Apple in its openGL template projects. And it inherits from UIView.

So, all of the above information is valid, and I hope useful.

Nicolas Buquet
www.buquet-net.com/cv/
#7
10/08/2010 (1:23 pm)
Seems like the portion with the meter pane in IB is indeed set to 0,0, top left, frame.
... this is the portion defined in mainwindow-ipad.xib as well as mainwindow.xib.

Other thoughts?
#8
10/08/2010 (1:44 pm)
Wait, I think I'm having an epiphany. You're saying that changing mainwindow-ipad.xib around isn't going to change anything because the EAGLView component isn't in the right spot... wow, I have no idea how to change that.

I'm very proficient with TS, but... my obj c / mac knowledge is ... lacking.
#9
10/08/2010 (2:28 pm)
Okay, can someone give me a hint as to what file I'm going to find the changes I need to make in?
I've been rooting through the engine with 3 other people here... and none of us can figure this out.
#10
10/08/2010 (4:28 pm)
I've seen this behaviour before with the iPhone and the shift is usually due to the status bar; cell signal, battery etc

Personally if you are digging into EAGLView for the answer then I think the problem is somewhere else.

#11
10/08/2010 (5:00 pm)
In this image, the statusbar is still visible, though
#12
10/08/2010 (5:20 pm)
have you measured the width of the orange piece? Is it 64 px by any chance?
#13
10/08/2010 (5:26 pm)
Exactly 64px
#14
10/08/2010 (5:28 pm)
Please in the name of all that is holy tell me you have a solution
#15
10/08/2010 (5:37 pm)
Okay, its looking like you have the iPhone 4 resolution set for the horizontal.

iPad = 1024
iPhone 4 = 960

1024 - 960 = 64

Hopefully that will help narrow it down.
#16
10/08/2010 (5:39 pm)
Search your project for 960 ...
#17
10/08/2010 (6:03 pm)
Talking with Matthew in IRC about this. I am unable to replicate this on my end, but I'm continuing to work with him to see if we can find a solution. Should we discover the issue, we will post in here in case someone else encounters the problem.
#18
10/08/2010 (6:15 pm)
@Scott

No occurrences of 960 though, iphone4 does show up...
#19
10/08/2010 (9:45 pm)
We just found a host of problems in IRC related to him using a version of the engine that did not support iPad. That could be a problem.

Once again, IRC has proven itself useful.
#20
10/09/2010 (8:16 pm)
@Matthew - This is worth a try: go to platformGL.h and change to this

#define IPHONE_DEFAULT_RESOLUTION_X 1150
#define IPHONE_DEFAULT_RESOLUTION_Y 1024

#define IPHONE_MAX_RESOLUTION_X 1150
#define IPHONE_MAX_RESOLUTION_Y 1024
Page «Previous 1 2