MouseLock & PointerLock for GameMaker


(click for web demo)

I made a small GameMaker: Studio extension that provides a unified API for "mouselock" between desktop and web (HTML5).

The way this works is by utilizing built-in mouse snapping functions on desktop targets, and using Pointer Lock API on HTML5. It bridges between the two, and you get simple functions like mouse_lock(), mouse_unlock(), and mouse_delta_x & mouse_delta_y for getting the mouse movement offset while mouse is locked.

So, if you ever wanted to make some web-based first-person shooters (or just games with mouselook) with GameMaker: Studio, now you can.

The extension is free and can be downloaded from itch.io or GameMaker: Marketplace.

Related posts:

One thought on “MouseLock & PointerLock for GameMaker

  1. Pingback: Introducing: GMLive

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.