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 / GetSpriteHitTest() bug in Alpha 12?

Author
Message
Jambo B
14
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 4th Apr 2015 14:25
I didn't want to jump in straight away and start yelling, "BUUG!" but I can't see how this isn't one.

Over here, getspritehittest() seems to be giving strange results in fullscreen mode – but only sometimes.

It seems that sometimes, getspritehittest’s view of the sprite’s position is higher up the screen than it should be.

I done make me a video:

www.glasstowers.co.uk/jbscript/spritehit.wmv

Like I said, this doesn’t happen every time. Would you mind running this code a few times in full screen and see if it happens for you (Alpha 12):



Thanks,

James
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 4th Apr 2015 15:20
for me it works.
does this happens in windows too if you hit an icon?
i think the mouse cursor sysbol using a location where the center is.
or what happens in paint if u set a pixel.

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Jambo B
14
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 4th Apr 2015 15:28
What I can't understand is that sometimes it works, and sometimes it doesn't. It was working fine on Alpha 11. No issues with Windows.

GetSpriteHitTest should return 1 when the hotspot of the mouse is over the sprite. Until Alpha 12, it worked fine over here.

@Markus: did you try it several times, and in fullscreen mode?

Thanks,

James
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 4th Apr 2015 18:09
yo, seems a bug in v2 12, now i had this too.
the hotspot go bottom mouse pointer.

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Jambo B
14
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 4th Apr 2015 23:49
@Markus: thanks for testing it out. I thought it was the code in my project! Spent ages trying different things.

So to confirm, it only happens in fullscreen mode, and not consistently - even with the same code.

James
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 5th Apr 2015 01:00
yo

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Jambo B
14
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 5th Apr 2015 04:16
I bet lots of people are using this command... trying not to be a pain in the arm, but must say that a quick fix would be appreciated - I was just about to upload my project to the beta guys

James
Jambo B
14
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 7th Apr 2015 03:43
Further investigation shows that Markus is right - the problem is that the hotspot on the mouse cursor moves to the bottom of the cursor sometimes in fullscreen mode.

James
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Apr 2015 12:44
Sounds like it might be moving the height of the Window title bar, which you don't have in full screen mode, thus it moves downwards.


I just tested one of my apps, and I can also confirm the problem exists.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 10th Apr 2015 17:33
Thanks for the code, fixed for the next version. This was caused by the new code to remember window positions and sizes across app sessions, if the window was full screen when it closed then it wouldn't properly resize it to full screen when SetSindowSize was called. For now you can work around this by using SetWindowSize to non-full screen and then immediately back to the full screen size, e.g.

Login to post a reply

Server time is: 2024-05-25 11:09:19
Your offset time is: 2024-05-25 11:09:19