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 / Problem with GetPointerX()

Author
Message
Iwashere68
7
Years of Service
User Offline
Joined: 6th Jun 2016
Location:
Posted: 11th Sep 2018 15:25
After two years I finally get around to work on an update of a game on iPhone (programmed in C++ using tier 2).
I updated to the newest version of AppGameKit and now there is a problem with agk::GetPointerX() that was not there two years ago:

If I put my finger on the bottom of the screen, there is a delay of maybe a second before GetPointerX() gets the new value.
But if I move the finger or lift it, GetPointerX() immediately gets the new value.
Also, the problem only seems to occur at the bottom edge of the screen.

So far, I don't use Multitouch-events in this project; and I'm not really that keen on re-implementing game-controls

Does anyone else have this problem?
Any ideas for a quick workaround?

This game is controlled by sliding a finger left/right at the bottom of the screen, so it's a pretty awkward problem
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 12th Sep 2018 09:36
Do you have any code so we can check its not a mistake?
Also which phone are you using?
Does it work on PC?
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 12th Sep 2018 13:34
It sounds like something we encountered with iOS 11, it introduces a delay in touch events near the top and bottom of the screen due to the swipe gestures that iOS uses for the notification bar and home bar. iOS will stop the event going through to the app until it can be sure you are not swiping.
Iwashere68
7
Years of Service
User Offline
Joined: 6th Jun 2016
Location:
Posted: 12th Sep 2018 21:42
Yes, I have iOS 11.4.1 on my iPhone.
And yes, this delay occurs near the top, bottom and left edge of the screen (but strangely, not near the right edge).

I just created a new project for testing, it's definitely GetPointerX() and GetPointerY() that behaves this way:



But the current version of my game in the AppStore (compiled two years ago) does not have this problem, it works perfectly fine with iOS 11. I just checked.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 13th Sep 2018 12:24 Edited at: 13th Sep 2018 12:28
I experienced the same problems with the top with iOS. In the end I just moved the buttons away from the edges. It's still not great but better. I realise that won't sort your problem where you need to swipe from the edge.
Iwashere68
7
Years of Service
User Offline
Joined: 6th Jun 2016
Location:
Posted: 14th Sep 2018 09:06
I think I'll circumvent the problem by introducing a slider bar that is positioned away from the edges.
Originally I thought that would be a bad idea because it unnecessarily restricts the player. But it might actually result in a more intuitive game play.

Login to post a reply

Server time is: 2024-04-19 03:54:26
Your offset time is: 2024-04-19 03:54:26