Project Clockwork Dev Diary #1

Hello! First things first, this is my first entry for quite some time. I’m going to be writing about my development process here going forward, as I have recently started working on a project full-time. I’m a bit late in announcing this here, as I wanted to at least have something concrete to post, and what I ended up working on was something that’s not particularly exciting to look at. I will post a few GIFs of things I’ve done previously that are a bit more interesting, however!

Here is some prototyping I’ve done on what will eventually be a playable game:

Gears13.gif

Without wanting to give too much away this early on, I’m making a platformer where the levels are filled with gears and clockwork mechanisms. I’m creating it in a 2D engine, but as you can see above I’ve faked a 3D effect; there’s a reason for doing this that I hope will eventually be apparent!

One side-effect of this, however, is that there is a lot of data that goes into building the levels: they’re constructed from ‘sections’ which can be fully articulated, and each section has geometry data for all of the background layers (which are used to create the illusion of 3D), and each of the gears has a lot of data describing it. So far I’ve been entering all of this by hand, but it’s time consuming and fiddly.

As such, since working on the game full-time I’ve started making a level editor. Because of the nature of the platform I’m making the game for, it made most sense for me to build this within the game itself (otherwise I’d have to maintain two separate codebases in two separate SDKs whenever I add new level features, and I don’t really want to do that). There was a certain amount of UI design required to to fit a level editor within some fairly strict constraints, and once I did that I could start implementing it. Here’s a video showing where I’m at so far:

The panels on the right were fairly easy to implement; first thing I did was create data structures for containing each of the items that would appear in each panel, based on what needs to be editable for each feature of the level. I made them scroll up and down, and slide in and out when you move between menus. This is a little glitchy in places, and I may eventually fix it, but I wanted to focus on the functional stuff first. In general though, this was the easy part.

What was less easy was linking the items that were displayed in the editor with the level data. I spent quite a lot of time trying to figure out how to build a system that is able to take a list of menu items, and then look at the level data and determine how many of those it needs to display on screen, and also pull the existing value and display that. I think it might be just that I don’t have a lot of experience with building tools like this, so cross-referencing data structures is an unfamiliar area for me. The basics of it are working now, though, and hopefully the next steps will be a little more straightforward.

Speaking of which, my next plans are to implement the ability to change values (which, now that I’ve solved the problem of reading the data in the first place, should be fairly trivial), allow the saving out of edited level data, and eventually build controls for moving around the level. More on that: Soon!