Creating GameMaker Extensions outside of GM Studio

I’ve been getting back into GM Studio 1/2 lately and wanted to revive a project I was working on. My first step was to move everything into an extension (rather than the shitty drag and drop method I had suggested before to use)
After going through the GM Creating Extension tutorial it was pretty clear I was not going to go through the process of adding a function within GM Studio (click Add Function in dropdown + fill out form)
For most simple extensions this is probably fine but I’m hoping to add and remove functions at will. Rather than managing the extension through GameMaker I’d like to be able to create the .gmez file myself and have it properly import into GM Studio 1.4.9999
By default a user would simply Right click the extension, click Export extension and give it an appropriate name. The created file will automatically get the .gmez extension and you can drag and drop the file into any project and it should work as expected.
Here’s an extension I exported from GM 1.4.9999 that has already been setup to open with WinRAR on my machine

Contents are as follows:
-- Test/
   -- custom.gml
   -- Assets/
      -- Objects/
      -- ALL IMPORTED ASSETS CAN GO HERE (scripts, sprites, datafiles, etc)/
So you might be wondering how I already knew to open that with WinRAR.. I paid for an extension and it was mentioned in the docs that I could either drag and drop the extension and go through the normal flow of importing the assets object OR I could open the .gmez file with 7zip/winrar… the curious reader might be thinking this is just a .zip/.rar that is renamed.. you’d be close but let me show you the science I did to make importing my own extension work correctly.
Open up the example.gmez with your hex editor of choice and let’s look for some magic numbers! (I use WinHex. If you don’t have a hex editor its probably time to add one to the toolkit)
Since I’m not a noob to magic numbers I already have the List of file signatures purple on google and know a simple search of “37” will get me what I need.. and of course 37 7A BC AF 27 1C tells us we are looking at a 7-zip file
With some knowledge about how .gmx files are structured we can easily add additional functions and edit the .gml files outside of GM entirely! A simple test is to extract the .gmez file and create a default 7zip archive and drag and drop it into GM to confirm the results.
Since I’ve been modifying a lot of .gmx files on the fly with my GM Companion IDE doing the same for extensions feels like a natural feature add in the future. For now a simple scripted solution will do to tidy up a Github repo and hopefully allow others to contribute easier moving forward.
Random Note: I added a file to my extension, deleted it, and exported the extension. When I inspected the contents of the .gmez I noticed that the file that I inserted (and definitely deleted) was in the extension (massive .gml imported so was easy to notice).. Within GameMaker there was no reference to the file.. but I’m 100% it would be included in whatever is compiled.. possible to hide malicious code? (PoC || GTFO)

Git Remote Annoyances on Windows

I use a few machines and just want them all to work. Problem is that never happens and I run into stupid things that keep popping up so… I’ll document it in case anyone else is getting frustrated by the same nonsense So you’ve got a new repo on github and you want to copy-pasta the commands to setup the remote+push.. thats alright until..
> git remote add origin
> git push origin master
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Only reason I knew what to do was because I banged my head against the wall to start off a Ludum Dare.. the issue here has to do with the current auth being in conjunction with linkage.. if we just use the https remote all will be fine.. pretty silly
> git remote add otro
> git push otro master
Counting objects: 290, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (286/286), done.
Writing objects: 100% (290/290), 2.59 MiB | 1.24 MiB/s, done.
Total 290 (delta 38), reused 0 (delta 0)
remote: Resolving deltas: 100% (38/38), done.
 * [new branch]      master -> master
and now we can git as expected on Windows w/ credential file auth (might popup in other cases.. but dont really want to test that stuff)

Ludum Dare 43 Post Mortem

I’ll do my best to keep all my disappointment out of this post but I am obviously a little upset that after 27+ hours of work I didn’t have a game to deliver. I think there’s tons to take away from the entire experience even though technical tooling issues became too much to handle at the end.. Because after all that work I did make something that I was able to have some fun with.. even if I couldn’t share it like I was hoping to :/

What Ended Everything

I don’t think it’s fair to blame all my problems on a single extension but I will say that it was not smart on my part to try and use something I had never used full cycle (dev w/ git -> deliverable .exe / HTML package).. I’m usually not the one to buy into the marketing hype but I was sold as soon as I saw this gif
I saw that late one night and ended up pulling the trigger right before the Jam started.. Not testing the tool (GMLive) adequately before jumping into a competition was a mistake.. should have / could have used a day before the Jam to create a small project that I had tested the creation of an .exe + HTML package In the end I’ve created a post on the page for the GMLive project in case my issue might be something larger (can contribute to the project) / obvious that I shouldn’tve done during development. After 3 days in the weeds, hunting down a bug that only exists when the extension I was using was turned off.. was enough for me to throw in the towel with < 3 hours left (I’m editing this post a day after the event and have spend 1-2 hours doing further debugging without any luck.. will get it eventually…1 week later still haven’t had the heart to hunt it down)

Theme Ideation

Had an idea pretty early on that a tower climb card game w/ small deck size + hard choices after each level (choose 1/3 cards to add to your deck but others are given to next level boss) would be something that I’d like to build. Main “interesting” gameplay mechanic was cards you passed on (being used be subsequent enemies) would get upgraded during harder levels making your decisions to “sacrifice cards to the tower” that much harder and more important during the actual gameplay.
Personal goal was to deliver 4/5 levels of increasing difficulty that would build/introduce card mechanics.. playing MTG since I was little this felt like something I wanted to take on and was up for (no matter the challenges of balance, design, etc)
Overall I was pleased with the theme and happy that I came up with an idea and stuck to it (still believe gameplay/general idea would have been enjoyable)

Wasted Time

Looking back at the time-lapse video + commits throughout the event its pretty clear that I got ahead of myself on the art side of the project. I don’t think it was a smart call to start messing with any artistic tweaks before multiple levels were built + tested in .exe/HTML versions (always problems). Of course hindsight is 20-20 but the LD before my mantra was “Don t waste time play testing or trying to be an artist”. Unfortunately I think I did both.. too excited about making a card game + distracted by the fact I made something pretty on accident Should honestly write the mantra on a whiteboard in my room before the Jam starts.. creating cool looking shit is great but that’s really not me.. should get help on that front in the future if I want things to look pretty..

Custom IDE Experience

I’ve been working on a custom IDE / GM Studio companion application to allow me to edit / compile my projects outside of GM. I’d say that 95% of the time I was using my IDE and the other 5% was spent dealing with GM Studio complaining about memory access issues + strangeness with accidentally creating 2 scripts with the same name or having an object deleted but file not being updated I will definitely be making stylistic changes to the IDE (was not built for multiple resolution so using on a laptop was pretty silly) to increase usability + functionality when editing larger projects; had initially shrugged off implementing proper TreeView structure for objects/scripts in “Groups” since the directory structure was “good enough”.. turns out it would have been nice to use and abuse groups and the project grew.. IDE did not handle that and was not going to swap to C# mid Jam and implement XML parsing In the end the ghetto solution I’ve got pre-Github roll up is workable and was enjoyable to use during the Jam but is very much incomplete in terms of the full fledged experience I was hoping for. Big things to knockout in the future are; (1) changes in IDE look the same as changes in GM (num spaces / tabs?), (2) usability changes for viewing in different resolutions / allow the frame to be adjusted as needed (found myself just wanting to click through scripts and read contents within the IDE.. dynamic “Inspect object” section might be nice), (3) Build tree structure from file.. this is all GM Studio 1.4.9999 seems to care about so we should do the same (crawling directories was nice + worked but… would avoid lots of headache if the content of that was guaranteed + confirmed by IDE rather than having to open GM to complain about something)

Engine Building

I felt slow during this phase of the compo. Think I should have focused on 2/3 cards only early on and created the basics for gameplay on multiple levels ASAP. When I went to bed not competing the Initial Battle phase that was written on my whiteboard I think I was in a bad spot. Not a terrible spot but definitely not where I should have been (especially if I was on a team.. cant imagine showing up in the morning with a half working engine that looked like shit).. Should have pushed harder for that base engine / been more focused on limiting the scope of the MVP Because of the things that were taken on unnecessarily early, I think that the battle logic code is all over the place.. right now I’m afraid to look at the code but am certain the logic for battling morphed and morphed into something that was going to be cleanly handled by 1 object into 2 objects juggling responsibilities inside of a STEP function that was probably calling multiple alarms.. Maybe its not that bad… but I think code review post mortem would be a separate post entirely


LDs are awesome and a great way to test yourself! I’m glad I pushed myself to build something that made me uncomfortable (felt like a much larger ask than the text / platform games I usually throw together for these things). While I didn’t turn anything in I’m still sitting on a codebase that I’m hoping will be workable and understandable when I revisit it with a clearer head. I’ll definitely be competing in the next Ludum Dare and will put it on my calendar now so I don’t find out about it a few days before..