Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Gf11speed

Mouse lag

This topic is 6735 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

While working with the mouse, there is a particular lag. Anyhow, I''m doing it like this: int mouseX,mouseY; mouseX+=mouse_state.lX; mouseY+=mouse_state.lY; DrawBitmap(Cursor,mouseX,mouseY); Is there any way I can eliminate this lag? Do you know exactly what I mean when I say mouse lag? It can''t possibly be the computer, I have a 600mhz, 64RAM, blah blah... Thanks for you time.

Share this post


Link to post
Share on other sites
Advertisement
i heard there is an article on gamesdev about rendering the mouse cursor in another thread. this should be what you are searching for

Share this post


Link to post
Share on other sites
How often is mouse_state getting updated? Are you manually updating mouse_state by processing buffered messages from the mouse? If you are using buffered messages, make sure you poll the mouse an appropriate number of times per second. Because you could get a lagged mouse, if say you''re only updating the mouse position once for every frame you render, even if the frame rate is maxxed at the monitor refresh rate.

Share this post


Link to post
Share on other sites
Thanks, Aeetes! I updated the mouse_state twice-per-frame and it abolished the lag. Thanks a lot, I learned something:
the more you update the mouse per-frame, the more sensitive the mouse.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!