In the past week I've been focused on finished up the final pieces of the game content to turn it from a fancy engine into a real game. There were a few issues with the sound system that needed ironing out and the cutscenes that explain the story and premise hadn't even been touched. In an effort to turn the beta into what will eventually become the demo of the commercial release, I want to get at least some of all of the pieces of the game up and running.
Fixing the Glitch
The first thing on the list for this week was to finish the fixes to the audio system from last week. In order to make important things like chronostasis and pause work with the audio, I had to update the engine that my game runs on. Luckily that transition went extremely smoothly. The new engine only caused four immediate errors, and once those were resolved the audio issues vanished. There are still a few sound effects that need to be created, but the system works in all of the cases that I tested, so I was ready to move on to the next piece.
Before moving on though, there were some other errors from updating the engine that needed to be resolved. It seems that the guys over at LibGDX really ramped up their handling of JSON files, but unfortunately the way it was handled before masked the issues that these changes caused. It was really a mess before, with everything having to be type checked and cast from objects, and the new system handles things very well, with special JSON objects and functions to retrieve children as certain types. Instead of causing syntax errors though, these changes just meant that all of the old JSON code silently stopped working. After certain features simply stopped working, and the cause was isolated, all was well and the game was back up and running.
Setting the Stage
The airlock is the perfect place for disposing of spent clones.After the sound issues were resolved, it was time to take on cutscenes. This was something that I had never attempted before, so I was curious to see how this would play out. In theory it seemed simple, some controller that runs a timer to hand out events as they come in, and a set of classes to execute each of the events in the scene. It turned out to be exactly as simple as I thought it was, which is always nice. The scenes are loaded in as a collection of scripted events, with a timer telling them when to start and how long to run. Each event is tied to an object that takes the JSON data and executes that logic on whatever is indicated in the loaded data. A few issues with the scripted events crept up due to bad copying and pasting, but once I got past that it was smooth sailing.
With the engine in place, it was time to try and actually script a scene. It works out pretty well, and I have what will likely end up as the final version, sans sound effects, of the second scene in place in the new beta download out this week. The scene shows the player's body being dragged into the ship's airlock after his first run, which should give the players a sense of what is happening between runs and why everything gets reset. It was pretty easy, though a bit tedious, to script out and the actual data file that holds the scene's data is only a few kilobytes. I need to finish off the map of the player's house in order to script the first scene, but I have high hopes that it will go just as smooth as everything else.
With all of the changes made this week, the game is extremely close to being done with the open beta period. Once the remaining introductory cutscene is scripted and it's map is finished, and a few more of the sound effects are in place, I will package that up as the demo of the commercial game and sadly there will be no more updates posted for free. The good news is that means the commercial release is not far off.