Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Bug in 1074 Adcode on iOS?

Author
Message
Grumpy Jedi
14
Years of Service
User Offline
Joined: 16th Jan 2010
Location:
Posted: 20th May 2012 23:53
I created an ad for my app like this...



Now the code does work for creating, placing, and sizing an ad...HOWEVER, I happened to touch the right side of the screen where I have a gameplay button and it opened an ad.

Now my app is in landscape orientation and does not allow portrait. My hypothesis is that the detection box for where the ad would be in portrait mode is active even if my app is in landscape mode, hence 2 ad zones are detecting user input. The zone where the ad actually is, and the zone where the ad would be if it were in portrait mode.

Now this does NOT happen on windows, it only happens on iOS, specifically I tested on an iPad2.

I'm sooo close to release, but I can't very well do it with ads being clicked when they shouldn't be

Can anyone else confirm this?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 21st May 2012 00:36
it does not happen here on iOS in portrait mode.

i clicked on every inch of the screen and only the part where the ad is placed triggers an browser window.

most probably the bug happens in landscape mode.

please report it on the bugs site
Grumpy Jedi
14
Years of Service
User Offline
Joined: 16th Jan 2010
Location:
Posted: 21st May 2012 02:06
I've submitted the bug report.

You can view it here...

http://code.google.com/p/agk/issues/detail?id=323&start=100
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 21st May 2012 16:43
I have the same problem, posted about it twice, no response... I can't release my landscape apps on iOS before this is fixed...

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 21st May 2012 19:12
I just tested it on my iPad and the same problem occurs there as well.

Cheers,
Ancient Lady
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 21st May 2012 20:04
I have been posting here and there about this too. The orientation seems to be out of kilter. Sometimes the collision seems as if it is in the wrong mode, (adverts). The advert moves with the viewport, on android, which shouldn't happen. On the latest beta player the ads dissapear entireley on my app.

I see a lot of people have no problems when the game is basically a screen with no offset. My current project scrolls using setviewoffset, and has several issues. Another project scrolls, but I didn't use viewoffset, so works ok from what I can see so far.

Oh and getmusicplaying() doesn't seem to register properly on android. It will tell you what music is playing, but if you stop the music, and then try to use it to restart a new track when the music isn't playing, it fails. At least on my phone.

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd May 2012 02:06
Quote: " I happened to touch the right side of the screen where I have a gameplay button and it opened an ad."


Confirmed as a bug in landscape apps using the AppGameKit player. You can fix it in your XCode app by setting the shouldautorotatetointerfaceorientation to return yes for landscape, and using setorientationallowed(1,0,0,0) to turn off agk rotation. You may also need to add the row "initial interface orientation" with landscape in the info.plist file
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 22nd May 2012 13:10
Paul will you fix the ios templates in the next version?
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd May 2012 19:12
Yes, we'll be releasing a 1075 version "soon" that will make iOS and Android native orientation apps so this is no longer a problem.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 22nd May 2012 19:38 Edited at: 22nd May 2012 19:53
My game is meant to be played in exactly one orientation because is uses the accelerometer to move the player and extreme movement would flip the display.

I found
Quote: "shouldautorotatetointerfaceorientation"
in AGK/IDE/apps/<appname/Classes/UntitledViewController.m.

In my Xcode project I set the Supported Device Orientations for both iPhone/iPod and iPad to Landscape Right only. And set the initial orientation for landscape right home.

If I leave UntitledViewController.m completely alone, the behavior (except for the ad) is correct on both my iPad 2 and iPod Touch. The game displays in only one orientation and does not rotate at all.

And the ad touch area is in the wrong place for the orientation.

The default in UVC.m is Yes for portrait and No for everything else.

So, I set it to Yes for only landscape right.

On my iPod, everything showed and behaved correctly except the splash screen. The splash screen showed upside down in 'portrait' mode. But the game showed correctly and all clicks (ad or other) worked.

On my iPad however, the initial display (pre-splash) is correct, the splash shows incorrectly (upside down portrait stretched to fill) and the main game is squashed (it would be sorta correct in Portrait mode with tiny display). And anything that could be clicked on was totally in the wrong place. The ad seemed clickable in the lower left of the iPad, but outside the display for the game. Random smacking around the iPad might accidentally get a game started, but nothing worked right.

I went to test on my Android (and remembered to update the manifest to be in landscape mode), but could not get 1074 to recognized my bytecode file (I'll take this back up in the right thread in Android).

EDIT: with untouched UVC.m, my iPad rotates the game to portrait mode but with the correct proportions and the ad click works. The iPod displays in portrait mode with game stretched to fill and all the clicks are wrong. I can't seem to get consistent behavior at all, no matter what I have the UVC.m values at.

I just tried playing my iPod version, with menu showing correctly (YES on landscape right in UVC.m). But the accelerometer readings are all wrong!

And the iPad version is just plain messed up with the display and where it records clicks.

I'm going back to default settings and using SetOrientation(0,0,1,0) and wait for update to do ads.

Cheers,
Ancient Lady
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd May 2012 19:53
I would suggest waiting until 1075 as I've overhauled the orientation system to stop this kind of confusion. SetOrientationAllowed() will force device orientations from now on and shouldautorotatetointerfaceorientation is handled by AGK.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 22nd May 2012 20:01
Thank you.

Cheers,
Ancient Lady
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 22nd May 2012 21:37
Will this also fix the reported problems of the ios keyboard showing up the wrong side up now?
Grumpy Jedi
14
Years of Service
User Offline
Joined: 16th Jan 2010
Location:
Posted: 22nd May 2012 23:08
Quote: "Yes, we'll be releasing a 1075 version "soon" that will make iOS and Android native orientation apps so this is no longer a problem. "


Excellent!, thanks Paul
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd May 2012 23:39
Quote: "Will this also fix the reported problems of the ios keyboard showing up the wrong side up now?"


Yes
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 23rd May 2012 00:03
great! thanks a lot

Login to post a reply

Server time is: 2024-11-23 14:34:25
Your offset time is: 2024-11-23 14:34:25