Project 1999

Go Back   Project 1999 > General Community > Technical Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 08-28-2022, 10:36 PM
Serendib Serendib is offline
Aviak


Join Date: May 2014
Posts: 58
Default Mouse turning lag / frame skip issue SOLVED

This was driving me NUTS for so long. I recently have a problem where I would sometimes be mouse turning while running and the game would lag with a frame skip, sometimes very slight, sometimes up to a half a second. I had no idea what was causing this.

Then I realized that I got a new mouse, and I remembered an ancient bug I once found when writing my own game engine:

The mouse polling rate was set too high.

As soon as I turned down my mouse polling rate from 1000 to 125, all my issues disappeared. Here is how to do it in the Razer Synapse settings menu:

[You must be logged in to view images. Log in or Register.]

The reason for this happening is kind of technical, but here it is: Inside the main event processing game loop for some games (and it turns out, titanium) there's code like this:

Code:
Event e;
while (nextEvent(e))
{
  // do things with the event
}
The high polling rate of the mouse (if moved at the correct speed) causes this queue to fill up faster than it can be processed on the same frame. Meaning you manage to move your mouse at the unlucky speed it could actually cause this to loop forever while your mouse is still moving.

Anyways - that's the fix. If you notice your game skipping frames while you mouse turn, try turning down your mouse poll rate.
Reply With Quote
  #2  
Old 08-29-2022, 02:58 AM
Noren Noren is offline
Aviak


Join Date: Dec 2014
Posts: 55
Default

Thanks a lot, I'll try that on my logitech mouse !
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:24 AM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.