Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

About mouse coordinates

A topic by E17bits created 5 days ago Views: 17 Replies: 1
Viewing posts 1 to 2

Hello, I am using this extension, and it's really great, but I hope to be able to get the exact position of the mouse so that my game can have more precise control. Is there a function that can achieve this?

Developer

On Windows and Linux, display_mouse_get_x and display_mouse_get_y poll the current mouse coordinate directly from the system, but you are still bound by when the game finishes drawing and the window contents update.

The system cursor, on other hand, is drawn on spot whenever the system sends the image to the display, so that’s always slightly ahead of what you can get by drawing in-game.