imageblitzbasic

Author Topic: iPad app in Landscape mode.  (Read 391 times)

Offline mrplant

  • Mr. Polyvector
  • ***
  • Posts: 139
    • View Profile
iPad app in Landscape mode.
« on: 2011-Aug-22 »
HI.

Beginner here. I am wanting to develop a game idea for the iPad - this game would work in forced landscape mode only.
I have seen conflicting code here and there but they are probably for doing other things such as supporting orientation changes etc.
As I have said I want to force the screen to landscape 1024x768 pixels.

My question is - what is the easiest way to do this - what commands do I use to set this up best.
Also, I understand that GRABSPRITE will not work in landscape mode - So i take it I should just load each sprite up individually and put them on the screen?

I am doing a tile based game - large squares that are 64x64 pixels - the man moves around the maze but the maze does not scroll.. Do I have to redraw the whole screen each frame?

Thanks for any advice - I would appreciate any comments.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *****
  • Posts: 10294
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: iPad app in Landscape mode.
« Reply #1 on: 2011-Aug-22 »
inplatform option, set to 1024x768. Done.
Now Apple will reject it, because you have to provide both orientations (on left side and on right side). Read the gravity with GETJOYX() and use SETORIENTATION 1 or 3 according. Done.

Offline mrplant

  • Mr. Polyvector
  • ***
  • Posts: 139
    • View Profile
Re: iPad app in Landscape mode.
« Reply #2 on: 2011-Aug-22 »
Thanks. Will investigate that.

Offline mrplant

  • Mr. Polyvector
  • ***
  • Posts: 139
    • View Profile
Re: iPad app in Landscape mode.
« Reply #3 on: 2011-Aug-24 »
Hi.

All ok but.. still struggling with reading the gravity code - Are there any examples of reading GetJoyX and setting the orientation?

Thanks.

Offline mrplant

  • Mr. Polyvector
  • ***
  • Posts: 139
    • View Profile
Re: iPad app in Landscape mode.
« Reply #4 on: 2011-Aug-24 »
I just read more on this forum.. It seems this code will do the trick perhaps:

http://www.glbasic.com/forum/index.php?topic=6419.15

Right at the end.

Thanks again!

Offline Dark Schneider

  • Mr. Polyvector
  • ***
  • Posts: 128
    • View Profile
Re: iPad app in Landscape mode.
« Reply #5 on: 2011-Aug-24 »
inplatform option, set to 1024x768. Done.
Now Apple will reject it, because you have to provide both orientations (on left side and on right side). Read the gravity with GETJOYX() and use SETORIENTATION 1 or 3 according. Done.

There is need to select them in the XCode 4 project?, I mean, Apple looks at the binary metadata or they test in real usage rotating a real device?.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *****
  • Posts: 10294
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: iPad app in Landscape mode.
« Reply #6 on: 2011-Aug-24 »
they really test your app and complain when they put it upside down, that it's not OK and reject.
I DO HAVE A GAME THAT DOES NOT ROTATE, THOUGH!!! That's kinda unfair IMO.