This game plays so good, it plays itself.

Welcome to the first post of 2014! I’ll been working on the autoplay system (for the “How To Play” segments and the attract mode) for Gonna Catcha since the last time I posted. And since it’s also been a while since I uploaded something on my Youtube channel, let’s make it a twofer; here’s a short video of it being tested:


As I was coding this, I realized that creating the autoplay system would have been a lot easier if I was using Game Maker 8.1 instead of GameMaker:Studio to make this game. That’s because games made with Game Maker 8.1 could be coded to be dynamic at runtime. That is, you could add, remove or change graphics, sounds, rooms and even code while the game is running.

So what does dynamically-generated game assets have to do with the game playing itself? Well, the assets of interest in all of this are timelines, a series of code snippets that are run at assigned steps in time. Once a timeline is assigned to an instance and is set to run, it will automatically fire off the code snippets at their predetermined times. If I was using Game Maker 8.1, I could record player input to a file and then save it to the disk. Later, when I want to play the input back for demo purposes, I could read the data from the file, translate it into a dynamically-generated timeline and let Game Maker (and my player input code) handle the rest.

Unfortunately, due to cross-platform incompatibilities, the ability to dynamically add and change game assets at runtime had been restricted in GameMaker:Studio. In particular, most of the dynamic coding functions are gone. Fortunately, the all of the dynamic timeline functions survived the cut; well, all of them EXCEPT the function that allows you to ADD new code to a timeline. Without this function, this function, it is impossible to created new timelines with new code from scratch on-the-fly, pretty much destroying the above method of creating an autoplay system with a surgical strike.

In light of that, I tried to think of other ways to do this. First, I tried to record the player input into a human-readable format then manually translate and hardcode it into a timeline. However, this method was too tedious and took way too long to do, and if I wanted to re-record a play session, I would have to retranslate everything from scratch. Next I tried to build the timeline from scratch, but it was also too tedious since it was too hard to predict NPC movements, even though the random seed was fixed.

In the end, I decided to create my own timeline system. It’s not as through or functional as GameMaker:Studio‘s native timeline system, as it can only take control of the player characters, but it’ll do.

Copyright © Quadolor Games. All rights reserved.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.