Now with... GM8.x support?


I’ve had some half-finished tooling lying around from previous works and I’ve had an idea. Not a good idea, but an idea.

And thus: there is now a window_shape version that you can use in even older GameMaker versions. I’m only able to test with GM8.1 (2011) because that’s the only version I have an activated license of, but it likely works all the way back to GameMaker 6, if not earlier (I can’t easily establish when external_define was added).

Installation

  • Copy window_shape.dll to your project folder (or add it to Included Files?)
  • Import scripts from window_shape.gml (you can drag-and-drop it onto GameMaker)
  • Import constants from window_shape_constants.txt (using menu:Resources➜Define Constants)

The rest of the setup is as usual.

Notes and caveats

  • Per-pixel alpha option doesn’t seem to work, but maybe you can figure it out.
    I barely remember how underlying drawing mechanisms worked in 8.1
  • “sprite to shapes” / “RGBA buffer to shapes” functions don’t work because there are no functions to grab pixels from a surface and no buffers.
  • Functions that usually take arrays take ds_lists instead because you can’t pass around arrays in pre-Studio versions of GM.

Other that that, the extension seems to work as usual and I was able to re-create most of my demo project in GM8.1

Technical

Most of the groundwork that enables this has been done back when I made Steamworks.gmk and I have now updated both GmlCppExtFuncs and GmxGen to support this format.

More generally, if an extension

  • Doesn’t use RegisterCallbacks to dispatch async events
  • Doesn’t have too much hand-written GML code in it
    (e.g. var i = 1 has to be replaced by var i; i = 1 in 8.1)
  • Doesn’t use 64-bit integers
  • Doesn’t use arrays to pass around data
  • Doesn’t use anything else that was added in GM:S or later
  • Is already being compiled for GameMaker: Studio You can get it to work in older versions as well.

I could write a whole post about making native extensions for different GameMaker versions, but would anyone read it?

Files

window_shape (for GM8.x).zip 16 kB
Version 1.1 Jun 16, 2024
window_shape demo (for GM8.1).gm81 39 kB
Version 1.1 Jun 16, 2024
window_shape (for GM8.x).zip 16 kB
Version 1.1 Jun 16, 2024
window_shape demo (for GM8.1).gm81 39 kB
Version 1.1 Jun 16, 2024

Get window_shape for GameMaker

Buy Now$4.95 USD or more

Leave a comment

Log in with itch.io to leave a comment.