0 Favourites

Mouse lag

This forum is currently in read-only mode.
  • 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.

    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.

  • I never noticed this. The mouse response is super smooth for me.

  • I would love a solution for this, but if such a fix gets implemented it would probably have to wait for construct 2.

  • I never noticed this. The mouse response is super smooth for me.

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

    I would love a solution for this, but if such a fix gets implemented it would probably have to wait for construct 2.

    That's really unfortunate.

  • 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:

    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.
  • Do you think you could make an example .cap?

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

    http://dl.dropbox.com/u/5426011/examples3/cursor.zip

    made in 0.99.96

  • That's perfect R0j0! Thanks for your help!

  • That .cap was blank for me? All it had was a "start of level" condition.

  • That .cap was blank for me? All it had was a "start of level" condition.

    Just use the code above it:

    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
  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Oops, lol. Thanks, this is awesome.

    I just realised I had to extract that py.zip into my construct/data/python folder too.

  • I just extracted py.zip into the same folder as the .cap. I haven't got python installed (not overly interested!)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
85 7,285
shimo's avatar
shimo
Unread hot topic
96 57,361
bitworks's avatar
bitworks
Unread hot topic
90 77,102
leonhard's avatar
leonhard