Native mouselock for GameMaker
A downloadable extension for Windows
Buy Now$2.95 USD or more
Supported GameMaker versions and export platforms:
GM8.1 | GM:S | GMS2.x | GM2022+¹ | |
Windows | ✅ | ✅ | ✅ | ✅ |
Linux | ✅ |
¹ Including LTS - just all semi-recent GM versions, really
YYC is supported for GameMaker versions where it exists.
A native mouselock extension for GameMaker. Perfect for games with screen-space mouse aiming - no more need to worry about the game not restricting the mouse position quickly enough and user clicking outside the window - with this extension the mouse cannot escape the specified region, as it uses OS-level functionality to confine it.
Included functions:
- display_mouse_lock(x, y, width, height)
- display_mouse_unlock()
- display_mouse_bounds()➜
Returns the current mouse bounds as an array.
Typical use:
if (window_has_focus()) { display_mouse_lock(window_get_x(), window_get_y(), window_get_width(), window_get_height()); } else display_mouse_unlock();
Package contents:
- The extension itself.
- Sample project (shown on the GIF).
- C++ source code.
Purchase
Buy Now$2.95 USD or more
In order to download this extension you must purchase it at or above the minimum price of $2.95 USD. You will get access to the following files:
display_mouse_lock (for GM2022+).yymps 11 kB
display_mouse_lock (for GMS2.3.x).yymps 86 kB
display_mouse_lock (for GMS1 and GMS2.2.x).gmez 31 kB
display_mouse_lock_demo (for GM2022+).yyz 37 kB
display_mouse_lock_demo (GMS2.3.x).yyz 40 kB
display_mouse_lock_demo (GMS1 and GMS2.2.x).gmz 40 kB
display_mouse_lock (for GM8.1).zip 3.6 kB
Download demo
Download
display_mouse_lock_demo.zip 2.3 MB
Development log
- A Linux version7 days ago
- A Windows x64 compatible versionMay 23, 2021