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.

Binary operations with lists on Twitter web

Binary operations with Twitter lists via web client

For quite a while now, Twitter has lists. Lists are nice - you can include people with them, and then view their posting on a separate page. Or view multiple of these at once if you are using TweetDeck.

The process of managing lists leaves some to be desired, though - if you want to do something like

  • Add all followed users to a list
  • Exclude all followed users from a list
  • Add all followers to a list
  • Add all members from a list to other list
  • Exclude all members of a list from another list

You are apparently expected to do so by using the little context menu on each user, picking "Add or remove from lists...", and then ticking/unticking the checkbox for the according list.

That's no fun. But, of course, this can be helped with a bit of JavaScript.

Continue reading

Top-down bouncing loot effects

GIF
In action

A little while ago, I was asked about what would be a good approach to creating an effect for a top-down game where coins would fly out of a smashed object. Not recalling any tutorials on the matter, I've made an example of this exact thing, and this is a post detailing everything related to such an effect.

Continue reading

“live-reloading” web pages via AutoIt

So I've been recently looking for something to help with micro-debugging (mostly verifying output) of my JavaScript+HTML applications via automatically reloading test page on source change, and found a variety of solutions,

A bit of a trouble, isn't it? For most purposes, it'd suffice to check for file time change and refresh the page in the browser. So might as well do that with help of AutoIt.

Continue reading

Tululoo: Analog Control extension (updated)

Today I've updated my Tululoo example for analog controls.
If above image isn't very illustrative, these are small on-screen circles, that can be used in applications and games to convert user input from on-screen coordinate to a vector.
In contrast to not very documented example that I've made last spring, this is now presented as an extension.
That has detailed documentation, quite cleaner structure, and more functionality (for example, now it's possible to check if a specific analog control element was pressed, similar to keyboard keys).
As one can probably guess, it also handles touch input on mobile devices accordingly, allowing multiple controllers to be interacted with at once.

Download extension+example