Mouse lag

For questions about using Classic.

Post » Mon Nov 15, 2010 5:19 pm

Hello. I've mainly use gamemaker in the past for my projects but I've been trying to switch to construct periodically. There are a couple of reasons I haven't made a complete switch but the biggest one is that there is a slight delay in mouse lag. I know it sounds super picky but anytime I try and implement a custom mouse cursor the visual feedback makes me feel like my mouse is being drug through mud. It's a really big deterrent for me.

There is a lot of discussion in this thread. But it's about a year old now.
viewtopic.php?f=3&t=5154

DirectX + triple buffering + v-sync seems to be the culprit. It also seems to have varying effects on different hardware. I know a lot of games implement a hardware cursor to get around this and in the thread I linked Ashley mentioned creating a new add-on. But, again, that was a year ago. I check in every now and then and try out the updated construct builds but the problem still persists and there doesn't seem to be much commotion within the community about it.

So does anyone know of an add-on or work around for this? At the very least I'd like to stir up interest in it or see if any more information has been garnered over the last year.
B
2
G
3
Posts: 16
Reputation: 882

Post » Mon Nov 15, 2010 5:23 pm

I never noticed this. The mouse response is super smooth for me.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Mon Nov 15, 2010 5:38 pm

I would love a solution for this, but if such a fix gets implemented it would probably have to wait for construct 2.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Mon Nov 15, 2010 6:02 pm

[quote="Davioware":1660woe1]I never noticed this. The mouse response is super smooth for me.[/quote:1660woe1]

I think it's dependent on your graphics hardware. I have an nvidia 7800 if that information helps at all.

[quote="Arima":1660woe1]I would love a solution for this, but if such a fix gets implemented it would probably have to wait for construct 2.[/quote:1660woe1]

That's really unfortunate. :(
B
2
G
3
Posts: 16
Reputation: 882

Post » Mon Nov 15, 2010 9:58 pm

If you don't mind using python and have ctypes installed you can change the windows cursor for your app with this:

First add the window plugin to your cap. Then add this script:
[code:3rgqnlqv]from ctypes import *
cur=windll.user32.LoadCursorFromFileA(r'C:\WINDOWS\Cursors\banana.ani')
windll.user32.SetClassLongA(Window.AppWindow, -12, cur)[/code:3rgqnlqv]

Put the script as a subevent of "Start of Layout" or some other event so that it is not run every frame. It only needs to be run once.
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Tue Nov 16, 2010 3:09 am

Do you think you could make an example .cap?
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Tue Nov 16, 2010 11:28 am

Here's a example with all the required python files:

[url:10ka1eyk]http://dl.dropbox.com/u/5426011/examples3/cursor.zip[/url:10ka1eyk]
made in 0.99.96
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Tue Nov 23, 2010 7:12 pm

That's perfect R0j0! Thanks for your help!
B
2
G
3
Posts: 16
Reputation: 882

Post » Fri Jun 03, 2011 6:42 am

That .cap was blank for me? All it had was a "start of level" condition.
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Fri Jun 03, 2011 7:26 am

[quote="alspal":3grbxpy2]That .cap was blank for me? All it had was a "start of level" condition.[/quote:3grbxpy2]

Just use the code above it:
[code:3grbxpy2]
sys.path.append(System.AppPath)
from ctypes import *
cur=windll.user32.LoadCursorFromFileA(r'C:\WINDOWS\Cursors\banana.ani')
windll.user32.SetClassLongA(Window.AppWindow, -12, cur)
[/code:3grbxpy2]
NB.

I've add the AppPath on 1st line so it works for me! You may or may not need it.

Zen
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,846
Reputation: 48,293

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests