GameMaker work and assorted tools
A little bit of everything in this one
As in, work on GameMaker itself rather than tools for GameMaker.
For some time it’s been on my mind that GameMaker’s HTML5 builds are a bunch bigger than they could have been - GM has it better than Unity or Godot with their multi-megabyte WebAssembly blobs, but at 1.9MB worth of JS (~500KB gzipped) it is still a bunch bigger than web-first game engines and frameworks.
GM has a system for stripping unused functions, but it can only do so much - for example, it cannot remove most of the Box2D code because that’s conditionally used across numerous functions.
Properly solving this is no easy task, but there’s a simpler solution - the compiler is well aware of which features the game uses, so we can tag parts of runtime code as related to one or other feature and strip them if that feature isn’t used.
The results are good - for example, this little physics-based interactive piece got 3 times smaller with this system:
In a medium-sized project, you can still get some 30-40% runtime size reduction, and tiny interactive pieces (akin to what you occasionally see in my blog posts) can be 7-10 times smaller as the runtime is reduced to the absolute minimum (room logic, a little drawing, and some data functions).
With some luck you’ll be seeing this in GameMaker betas in the upcoming months, and you can read a little more about the technical side here.
I have implemented a Chromium Embedded Framework wrapper for a client, which allows their GameMaker application to display a web browser inside the game window, although more broadly display it wherever, really - it’s just a surface.
This was quite an experience and opens up some interesting possibilities, though it is unclear whether they would want to eventually open-source this solution.
I did a little work on Samurai Gunn 2! The game’s rewrite and upgrade is ongoing and I mostly help with debugging netcode.
I did a little work on Nuclear Throne, though technically I’m poking Nuclear Throne all the time.
I also did a bit of integration work on a good videogame, but the feature’s not announced yet so until the next newsletter you’re left to guess what videogame could this possibly be.
I have released a GMEdit update, which most notably brings the coroutine generator up to par with current GameMaker syntax.
Coroutines are a kind of a function that you can suspend/resume halfway through. Things like this:
These are most commonly implemented as little state machines, and this generator follows that pattern. The update also adds some new features, such as making it easier to pass the coroutine-object to other functions, which enables you to do cool things like this:
So you can implement a cutscene as a coroutine, or do async execution as a coroutine, and all of this is is about as lightweight as it would have been if you hand-wrote the code.
Other GameMaker things
I updated GMLive with a bunch of fixes for variously exotic bugs.
I updated my zip writer extension to fix a little issue with CRC32 checksums being bit-inverted (which causes some programs to complain about that), although in the stable GameMaker version you no longer need it - there are now built-in functions for working with ZIP files.
I updated my extension for embedding the game into GameMaker IDE window to support current GameMaker versions.
This is a half-joke extension, but a few hundred people downloaded it… for some reason.
I wrote a post about implementing variable references in current GameMaker versions.
I made a bunch of new things and tweaked some existing ones.
My tool for making real fonts out of font “spritesheets” now has a bunch more options and even support for color fonts! (if your browser supports those)
Combined with a secondary userscript for auto-linking images, this makes the process of writing Steam guides visibly easier.
As result, I have finally wrapped up my big Parkitect guide and also put up my old Mindustry guide on Steam (now that this no longer requires manually converting lists and linking up images).
As you might already be aware, I recently got a fancy little keyboard, and a thing that bothered me about it is that the best way to share your key layout was to take screenshots of the configurator program, which is not very good at all.
So I made a tool that takes JSON files from the configurator and converts them to a format that an existing tool accepts to draw your layout with all the labels, combo keys, and so on.
Between Twitter removing the “classic” TweetDeck app (and finally making the new buggy app a part of the paid package) and friends scattering across a half-dozen websites, I found myself with switching between a handful of tabs just to get a glimpse of what’s going on, anyway.
So I made an app that helps with that! You can stick a bunch of windows into it, set up how many pixels to trim from each edge, and it’ll display them inside a TweetDeck-like horizontally scrollable window. And it’s not just for browser windows either - any kind of window!
Slight comedy here is that I haven’t been looking at social media all too much in the past months, with exception of occasionally scrolling through the (slower-moving) cohost! timeline, which led me to write a userscript that enables scrolling between posts by pressing Home/End and that’s very convenient, but makes me want press Home/End on other websites that have sections of content.
I got a new office chair, which is one of these with mesh-based seat and back - a welcome addition for summer months when I’m pretty comfortable with working without turning on the AC (which puts my apartment at somewhere around 27℃), but sitting on a faux-leather chair is less so.
I’m still taking my arbitrarily long walks - one time, while looking for a service center to get a PS4 controller fixed, I apparently walked for so long that I ended up in the past:
Summer is usually the season when old friends stop by in Odesa or I get myself out somewhere for a vacation, but there’s less of that in time of war - my parents visited for a few days, but otherwise conversations are mostly carried out online.
And that’s about it, really - there are a couple more things that happened, but that can wait until the next post as I am once again greeted by my ultimate nemesis:
Thanks for reading!