User Tag List

Results 1 to 7 of 7

Thread: Mouse polling rate causing slowdown

  1. #1
    Clicker

    Fusion 2.5Android Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Firefly 3D Module (Steam)
    roxflame's Avatar
    Join Date
    Oct 2008
    Location
    Melbourne, Australia
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mouse polling rate causing slowdown

    I have a gaming mouse, that defaults to a polling rate of 1000hz. With the polling rate of my mouse set to its default, while moving the mouse in my game, the FrameRate drops dramatically to ~35FPS.
    If I drop the polling rate of my mouse down to 125hz then the Framerate stays at a nice clean 60FPS

    Does anyone know which events run more often when they polling rate of a mouse is higher? Asking so that I can try and optimize my game to handle a gaming mouse on defualt settings...

  2. #2
    Clicker Multimedia Fusion 2 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    Uppsala, Sweden
    Posts
    48
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Interesting find. I've tried to test this on my projects and system and it does indeed seem that mouse pollrate affects framerate. I don't get anyway near such a dramatic framedrop though, in fact I have to set framerate to max 1000 in order to even see it but when I do frame goes to around 900 when moving the mouse and mousepollrate set to 1000hz while unaffected at 125hz.

    I've tried to test various mouse oriented conditions as setting positions to Xmouse/Ymouse, testing for mouseclicks, while mouse is on object etc but none of this seems to matter. The only thing affecting the framerate is actually moving the mouse at all, regardless if there are is any mouse related code in the project. In fact I get the same result on a blank new project with no objects or code.
    While this doesnt really seem to affect me it is curious and I guess it could be critical in situations where users might use a slower computer with a high pollrate mouse.

  3. #3
    Clicker

    Fusion 2.5Android Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Firefly 3D Module (Steam)
    roxflame's Avatar
    Join Date
    Oct 2008
    Location
    Melbourne, Australia
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah to be fair this is on a relatively complex project that has a lot of mouse related events, and the big drop is with moving the mouse only while polling rate is high, so I think the impact on my game might be higher than might be on some others...
    I'm glad I learned at least how to toggle the polling rate on my mouse, as part of this, but of course ideally theres a way to at least somewhat optimize this... I'd be willing to try all sorts of things, from swapping out the mouse related checks and events to some using another extension, or adding a per-frame limiting condition somehow... Not exactly sure how to tackle this yet as it's seems really odd, and took me ages to figure out what was even happening.

  4. #4
    Clicker Multimedia Fusion 2 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    Uppsala, Sweden
    Posts
    48
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Did some more testing and disabling the debugger seem to fix the issue entirely on my end. After closing the debugger I cannot reproduce framedrops by moving the mouse regardless of pollrate. I know the debugger can have impact on performance, so maybe it's extra sensitive to mousepolling. Have you tested your project with the debugger disabled?

  5. #5
    Clicker

    Fusion 2.5Android Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Firefly 3D Module (Steam)
    roxflame's Avatar
    Join Date
    Oct 2008
    Location
    Melbourne, Australia
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The plot thickens. I can no longer replicate my own issue, with or without the debugger haha.
    Maybe the mouse polling was also interacting with something else I had running at the time...
    I'm going to keep my polling rate on 1000hz for a while and see if I can learn more when/if the issue returns.

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,582
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    Hey Rox. Do keep us posted with anything you find. BTW, does this mean you're working on Dynacorp again?

  7. #7
    Clicker

    Fusion 2.5Android Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Firefly 3D Module (Steam)
    roxflame's Avatar
    Join Date
    Oct 2008
    Location
    Melbourne, Australia
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It sure does! After a long hiatus keeping my web development company humming along, and also getting a publishing deal landed for a table-top game, I'm back on the game-dev. Still part-time due to having a day job, but I'm happy that the creative spark has returned!

Similar Threads

  1. Xbox One frame rate bug. 60 FPS impossible without virtual mouse present.
    By raxabit in forum Universal Windows Platform Module 2.5
    Replies: 22
    Last Post: 11th May 2020, 05:54 PM
  2. how to find out what is causing the most runtime slowdown?
    By TheCrimsonTaco in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 18th August 2017, 07:29 PM
  3. Replies: 6
    Last Post: 9th May 2016, 08:03 PM
  4. What could be causing this?
    By ecoste in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 21st December 2013, 03:57 PM
  5. [BUG 257-9] Large background objects causing slowdown
    By AyreGuitar in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 21st April 2013, 11:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •