Tag: project rot

GameMaker Project Rot

My recent project, Genes, had a bug in it which didn’t really matter too much: Male creatures were supposed to seek the nearest available female, re-targeting every few seconds. And so too with females. But for some reason, the males were not re-targeting any longer once all the females had become pregnant.

I spent some hours trying to debug this before I released it, and I suspected something about the instance_change() method, which I used to change a female creature to a pregnant female, was to blame, but when I tried running a few tests to see what was going on in the code, it was apparent that the pregnant females were truly turning back into normal females after birthing, and also that the male’s re-targeting clock was resetting, and that they should have been seeing these females asĀ available but for some reason they just weren’t.

It wasn’t crucial to the Genes demo, since the female homing worked well enough to get the breeding cycle going, so I gave up and posted it as it was. Then, I updated GameMaker Studio on Saturday to 1.1.929, and re-ran the game and all of a sudden the males are exhibiting the correct behavior now.

I started reading through the changelog to see what might have fixed it, and noticed something else that was enticing to me: Blend modes have been added to WebGL!

I haven’t touched the project files for Karyote in since sometime late in September, when I finished working on the post-Ludum Dare compo enhancements for it. My great disappointment with the HTML5 build of Karyote was that the pretty color blends that I’d come up with for the Windows build weren’t able to be rendered.

This had really soured me on building HTML5 games. But now I could see if it would be worth while to release a new build.

I tried opening up the project to rebuild it, and GameMaker said it needed to do something to the files in order to continue, and when it did, the project was corrupted, and all my project assets were missing. :-(

Fortunately, I have backups.

I restored the project folder from a backup and tried opening it again, and this time it worked. That is, it didn’t corrupt the project this time, at least.

But when I ran the game, a number of things were still off. In the Windows build, for some reason, the player’s sprite isn’t drawn correctly. The script that composites the player’s sprite no longer correctly centers everything, so now the body is off-center from the tail and the particle effects. And the HTML5 build no longer renders enemies at all for some reason. You just start out in an empty universe with nothing every appearing apart from the player.

Worse, the player sprite seems to be drawn correctly in the HTML5 build. So, it appears that the runner is not behaving consistently, depending on the build target. Which means that despite promising to allow you to develop projects that you can build to whatever platform, you (still) really can’t, because the behavior will not be identical across all platforms. I can only hope that this inconsistency will be rectified soon. It really sucks to have a tool that advertises itself as giving you the capability to easily develop for multiple platforms with a single project, and not deliver on that.

I’m sure with a little investigation and a bit of time, I might be able to fix these issues. But as a developer it sucks to have to sink my time into tasks like this, rather than doing new development.

This is something I’ll need to look into further, but I have to say that it is dismaying not to have confidence in Game Maker updates. If an update can ruin a project like this, it makes me very nervous about upgrading. Any project that I’ve put serious amounts of work into, I don’t want to introduce bugs into because I updated the development environment. Of course, I also don’t want to be stuck on an old version of my development tools, either.

I don’t know what techniques programmers use to protect their project code from changes to the underlying framework or environment. I imagine a unit test suite would help, but it doesn’t seem feasible for GameMaker projects.

Apart from that, I am not sure what else professional developers who work in GameMaker do. If you have any suggestions, I would love to hear them.