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] GetpointerX and GetpointerY() in Version 2017_08_01 (Android Player)

Author
Message
sdl
AGK Developer
11
Years of Service
User Offline
Joined: 5th May 2012
Location: Germany
Posted: 22nd Feb 2017 15:51
This small example works normally under Windows.
Under Android, unfortunately, it does not:

Setvirtualresolution(640,480)
SetPrintSize(25)
ResetTimer()

Repeat
print("X Value= "+Str(GetPointerX(),2))
sync()
Until Timer()>15
End

The Android Player do nothing, no Print X or Y ....
Can you fix it in the next Version ?
SDL

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 22nd Feb 2017 16:16 Edited at: 22nd Feb 2017 16:18
for me your example works.
it show X Value= 0.00
and if touch the display i can see the position value.
i used build 8 jan 2017 and ide 2017.01.09

maybe your player did not get the bytecode at broadcast? firewall settings?
AGK (Steam) V2017.01.09 : Windows 10 Pro 64 Bit : AMD (16.12.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 22nd Feb 2017 16:25
@sdl Maybe it is a hardware or firmware issue with your particular device? What are you using?
sdl
AGK Developer
11
Years of Service
User Offline
Joined: 5th May 2012
Location: Germany
Posted: 22nd Feb 2017 17:45
Sorry for my english...
Ok sorry wrong Problem...
On 3 Android device the same prob...
I write a demo to see whats wrong...
I have test and the Problem is in combination
with getspritetesthit... On all devices is in the middle of the screen, You can touch, but there is no reaction... Only in the middel if the screen...
I hab no sprite overlaped, is only one sprite.
I hope you understand what i mean...

Sdl
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 22nd Feb 2017 18:15 Edited at: 22nd Feb 2017 18:17
lass dir mal SpriteIndex und die x,y position und den rückgabe wert mit print() ausgeben.
print ist sehr nützlich zum schnellen fehler finden.
wenn du SetViewOffset benutzt haben solltest mußte die bildschirm in welt pos. umrechnen.
AGK (Steam) V2017.01.09 : Windows 10 Pro 64 Bit : AMD (16.12.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
sdl
AGK Developer
11
Years of Service
User Offline
Joined: 5th May 2012
Location: Germany
Posted: 22nd Feb 2017 18:31 Edited at: 22nd Feb 2017 18:32
Hi Markus,

also das ist witzig...
Es geht wirklich nicht und zwar ist das Problem ganz einfach...
Rufe ich die Routine, die die Werbung initialisiert, nicht am Programmanfang auf, habe
ich in der Mitte des Screens einen viereckigen Bereich den man nicht drücken kann...
Ist dann wie eine toter Bereich... Zwar klein Bereich aber mein Button ist rund und leider genau an der Stelle....
initialisiere ich "admob" am Anfang des Programms geht alles...

Da muss man erst mal drauf kommen...
Liegt auch nicht an der Routine für die Werbung die macht ja nix... Außer das hier...

function werbung_init()
Status=0
if Status=0
//if Store_schon_mal_gekauft=0
SetAdMobDetails("ca-app-pub-303030030303303033303033xxxx")
//Create and Position the Advert
CreateAdvert(3, 1, 1, 0)




elseif Status=1 // Werbung anzeigen
if GetFullscreenAdvertLoadedAdMob() =1
//Make Advert Visible
//SetAdvertVisible ( 1 )
//Reload/Refresh Advert, call occasionally
//RequestAdvertRefresh()
SetAdvertVisible ( 1 )
ShowFullscreenAdvertAdMob()
else
RequestAdvertRefresh()
SetAdvertVisible ( 1 )
ShowFullscreenAdvertAdMob()
endif

endif
endfunction
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 22nd Feb 2017 18:56
Also Du bekommst kein GetPointerPressed() weil da dieser Werbe Banner Bereich drunter ist oder?

it seems the advertising area suppressed other click events.
AGK (Steam) V2017.01.09 : Windows 10 Pro 64 Bit : AMD (16.12.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
sdl
AGK Developer
11
Years of Service
User Offline
Joined: 5th May 2012
Location: Germany
Posted: 22nd Feb 2017 19:45 Edited at: 22nd Feb 2017 19:48
Hi,
nein ich initialisiere nur die Werbung von Admob, da wir ja noch keine Werbung gezeigt.
Ich mache ja nur das hier:

SetAdMobDetails("ca-app-pub-303030030303303033303033xxxx")
CreateAdvert(3, 1, 1, 0)

Dann startet mein Titelbild mit dem Play Button in der Mitte..
Wenn ich diese beiden Zeilen aufrufe kann ich in der Mitte des Screen nicht drücken...
Rufe ich die beiden Zeilen nicht auf, geht alles...
Ich lad mal mein Projekt mit hoch...

Einfach die Werbe_init() aufrufen oder weglassen...

Attachments

Login to view attachments
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 22nd Feb 2017 23:22 Edited at: 22nd Feb 2017 23:23
I don't speak much German, but when using percentage style virtual resolution (100x100), I use this to place a banner ad at the very bottom of the screen:


P.S. This is not a bug. Post name should be changed.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 23rd Feb 2017 09:21
ich denke dann ist der Bereich halt sw auf sw gilt aber trotzdem als Ebene wo die Clicks nicht durch gelassen werden.
Schraffierter Banner Hintergrund wäre dann besser.
Das hier zeigt bei mir gar nix an CreateAdvert(3

AGK (Steam) V2017.01.09 : Windows 10 Pro 64 Bit : AMD (16.12.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 23rd Feb 2017 10:52
@TGC Can we get a translation service built into the forum please?

Login to post a reply

Server time is: 2024-04-20 08:21:23
Your offset time is: 2024-04-20 08:21:23