Problem Screen Landscape - IOS

Previous topic - Next topic

Kyo

 test with:
- SETSCREEN 480,320,TRUE (and False)
- SETSCREEN 960,640,TRUE (and False)
- SETSCREEN 9999,9998,TRUE (and FALSE)
and i test with resolution from Option -> Resolution  (On Gl_B IDE Menu)

But the game run i portrait ... WHY?

Other info:
i use xcode 5.1 and ipod 4th gen with ios 6.0.1

spacefractal

Because SETSCREEN not designed to work on iOS and android at all.

Use the orientation command I fix it. Howover on ios8 there might been a change, so you might need to checkout the resolution by GETSCREENSIZE
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kyo

How i use orientation command???
Please example  :nw:

Kyo

SETORENTATION Work fine!
But not the size of the screen, how to use GETSCREENSIZE?

I have to remove SETSCREENSIZE or what?

Please example ;)

spacefractal

SETSCREEN is designed to change resolution on DEKSTOP machines, so its can been used. So you can just remove that.

checkout how to use GETSCREENSIZE in the help. Its used like GETSCREENSIZE ScreenWidth, ScreenHeight.

make sure to supports both landscape orentations (if your game is not a tilt game). Here checks the device tilt and rotate it when needed.

Something like this:
Code (glbasic) Select

FUNCTION ControlTilt: checkres=0
STATIC COUNTER=13
STATIC ORIN=0
LOCAL x, y
LOCAL NEWRIENTATION

USESCREEN -1
COUNTER=COUNTER+1
IF COUNTER>100 OR checkres=1 THEN COUNTER=85

IF (COUNTER=17)
IF ORIN>-1 AND (GETORIENTATION()<>ORIN OR checkres=1)
//IF ORIN>-1 AND (GETORIENTATION()<>ORIN) AND (ORIN=1 OR ORIN=3) // landscape only
LOCAL OORIN=GETORIENTATION()
SETORIENTATION ORIN

// ?IFDEF IPHONE
// IMPORT "C" int iOSSetOrientation(const char*)
// IF ORIN=3 THEN iOSSetOrientation("landscapeleft")
// IF ORIN=2 THEN iOSSetOrientation("portraitupsidedown")
// IF ORIN=1 THEN iOSSetOrientation("landscaperight")
// IF ORIN=0 THEN iOSSetOrientation("portraitnormal")
// ?ENDIF
ORIN=GETORIENTATION()
IF OORIN<>ORIN OR checkres=1
GETSCREENSIZE ScreenWidth, ScreenHeight
ResetBackground()
RETURN
ENDIF
ENDIF
ENDIF

IF COUNTER<15 THEN RETURN

IF GETORIENTATION()=0
y=GETJOYY(0)*100
x=GETJOYX(0)*100
ELSEIF GETORIENTATION()=1
y=-GETJOYX(0)*100
x=GETJOYY(0)*100
ELSEIF GETORIENTATION()=2
y=-GETJOYY(0)*100
x=-GETJOYX(0)*100
ELSE
y=GETJOYX(0)*100
x=-GETJOYY(0)*100
ENDIF

//IF device$="a" OR device$="ak"
// x=x/10; y=y/10
//ENDIF

IF y>60 AND ORIN<>2
ORIN=2; COUNTER=0;
// SetScaling()
ELSEIF y<-60 AND ORIN<>0
ORIN=0; COUNTER=0;
// SetScaling()
ELSEIF x>60 AND ORIN<>3
ORIN=3; COUNTER=0;
// SetScaling()
ELSEIF x<-60 AND ORIN<>1
ORIN=1; COUNTER=0;
// SetScaling()
ENDIF
ENDFUNCTION


the iOS8 issue im talked about with landscape is not a orientation issue, but a window bounds issue (orientation was still correct). So SETORIENTATION should not effect when that issue is fixed.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kyo

thanks for reply!

My game not is a tilt game.

I use only Landscape SETORIENTATION 1 and I remove SETSCREEN!
But when the game start it's scaled (see the image), I think the problem it's Z Project - universal screen size scaling system, but i don't know how to fix this problem.

I have GETSCREEN at the top of code:
Code (glbasic) Select

GLOBAL screen_w, screen_h
GETSCREENSIZE screen_w, screen_h


and another in Z Project - InitZ(1) Function:
Code (glbasic) Select

  GETSCREENSIZE x_res,y_res


spacefractal

you have propety set it too early, so scaling is wrong. you should reinit it after orientation. But that is not my job. Im have allways used my own scaling system, which dosent uses offscreen buffer.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kyo

The problem it's the new version 12.308 ... but i don't know why....
I compiled the game in old version 12.096 and it work fine (correct fullscreen landscape mode)

Another Bug ...  :whistle:

spacefractal

#8
this ios 7 is now bugged. This is due a attempt to fix a iOS8 issue (which have changed how the window frame works), which is extractly what you see now (and Gernot have confirmed it, hopefully fixed soon):
http://www.glbasic.com/forum/index.php?topic=9971.msg87503#new

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kyo

Ok I wait for fix and for now i use 12.096 ...
I hope Gernot, also solves my problem with Background (black line)....
I write to him a private message, but he did not answer ...
I wait ....  :whistle:

spacefractal

#10
im have no idea what refenence you meant with blackborder.

Howover Gernot cant anwear all messages, and if he did, he would not have time to bugfixes the bugs from the main forum. So its not a good idea to do support to him via pm. That why we have a forum here, but its seen you wont do a full example on the issue.

Howover if you use SMOOTHSHADING TRUE, then that might needs to see alpha multiply issues on the borders (which can been very bad on tiles). So you should try to uses SMOOTHSHADING FALSE instead before drawing the polygon.

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

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kyo

I write in Forum my problem with a black line border:

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

The problem with SMOOTHSHADING FALSE it's in change of resolutions, the graphics are horrible ...  :noggin:

spacefractal

#12
you can do nothing, its a limit. That issue have been around nearly since beginning and in years. Its a alpha MULTIPLY issue you property see. SMOOTHSHADING TRUE is just ugly to uses with tiles, so dont do that (im diddent do that my self in both my games due that issue). Yes its might been blocky, but you need to do workaround by other way.

You can do enable and disable SMOOTHSHADING on the same picture, so you can disable it for tiles, but using it for sprites etc.

Im pretty sure this issue will not been fixed, because its property not possible at all. The only way this can been fixed (if possible) is in the CLEARSCREEN command, if its was possible to clear the picture in a different way with a white background and invert the alpha values in its memory (CLEARSCREEN RGB(), ALPHA).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kyo

I test to enable/disable smoothshading only on BG ....
But it's horrible in fullscreen Mode ....

You think it's impossible to modify in GL_B???
You think Gernot not reply me????

I think you're right!

MrTAToad

He's probably busy at the moment.