Well, I keep on getting distracted, but the distractions are all part of the project itself. There’s a distinction between the process of making a game and the process of making the game engine, the game editor, the game tools, even though these are a prerequisite – and, clearly, I’m more willing and able to focus on those right now than I am on making the game itself. I think this is okay for the time being: Part of what I wanted to do with project is to let myself go where my enthusiasm guided me to go, and clearly right now that’s in working on the tools. Now, whether that’s just because I’m more intimidated by the idea of working on content stuff, well that’s an open question. Eventually I’m going to run out of tools to work on, so I’m not stressing out about it. Yet.
Anyway. What are these tools he keeps talking about?
Well, first, I’ve got a somewhat working version of the room creator I was talking about last time. I got the solution to the point where it did maybe 80% of what it was supposed to and then tabled it, since I didn’t want to get sidetracked for too long with nothing to show for it.
You can see that some of the logic is there, with it placing the walls and some of the tiles connecting the angles correctly, but there’s a couple of tiles that are incorrect and some that just aren’t getting placed. Part of this is just the order tiles are getting placed in right now: Since each tile has to fit with each other tile, the tiles that get placed first don’t have to meet as many constraints as the ones that get placed last, and often end up being incorrect. Obviously I have to iterate through the placement more than once, but how do I know when I’m done? How do I know which tiles I still need to match with and which are now outdated by the new placements on the second loop? This is probably a problem that’s been solved, so maybe I can look it up. That may be another reason why I set the problem aside – it didn’t seem urgent to solve any more, now that the remaining issues were relatively small and easy to describe. Most of the time, at least when it comes to programming, a sufficiently detailed description of the problem contains a solution.
After getting that sort of working-ish, I focused on creating the entity editor. Once I can build levels and place entities, I basically have everything I need to create a game. However, there’s a huge range in what constitutes a level and what constitutes an entity, and some big decisions need to be made in order to meet those simple requirements. Up front, though, I had a pretty good idea what an entity was supposed to be: I want an entity to be an object with, most of the time, a position, dimensions, and behaviors in the game world. With a bit of shuffling UI around, I came up with this entity editor:
The top bar is a toolbar where I can drop any entity I want to use more than once and save it for later. The top-right is an editing window where I can rewrite any of the entity’s scripts, and the bottom right a selection window that I can use to look at and edit any of the entity’s properties. What is going to be interesting as this progresses, I think, is that any one of the entity’s properties could be a script, could be a script that rewrites another property to be a script, could be a script that copies another entity into a variable which gets used by another script to spawn versions of that entity, and so forth. What I want here is a system that eradicates as many barriers as possible between creating, editing, and scripting entities. To begin with, I used an XML-based scripting language since that saved me a lot of the trouble of parsing the scripts, since I could just use Haxe’s built-in XML parser. However, I’ve decided instead to roll my own scripting language – after some misadventures in using a very full-featured Haxe parser, which I guess we’ll just consider research now, I decided that my needs were simple and specific enough that I should really just make my own.
While I initially considered making a new simple animation system, I decided that too much good work had gone into the EverEnding animation system to discard it completely. However, the rendering paradigm I used for that project was completely incompatible with the standards used in OpenFL – one of the big reasons I wanted to step away from that project for a while, since bringing it up to those standards was a huge logistical pain in the ass. This was, therefore, an excellent opportunity to work on something that could benefit both projects. The necessary approach was so different that, in the end, I had to fork the class, but when it comes time to work on EverEnding again I can work on integrating both versions together in a way that captures the strengths of both. For now, I have a fast and efficient way to render every entity I want to the screen.
Aside from this stuff has been some minor progress in other areas, like making decisions on what the tileset should look like, fixing bugs in the collision code, and making a rough character sprite for use in testing. However, if you’ve been following the project, you might have noticed streams abruptly ceased a couple of weeks ago, which is rather contrary to my original concept of the project as something which I worked on entirely on-stream. Unfortunately, I came to a point where a few aspects of my life and this project came into conflict with one another: As I alluded to in my Problem Machine blog post a couple of weeks ago, I tend to have sleep patterns which could be generously described as ‘erratic’. I’ve been trying out ways to restructure the way I live and work in order to help address this issue, and one of the biggest changes I’ve made is to try to get a few hours of work done immediately after waking up, before taking a shower or eating breakfast or anything. So far I find this approach tremendously beneficial, starting my day off on a good precedent and ensuring that even if later on I do end up feeling fatigued or depressed I still have a few good hours of work done, relieving much of the pressure to do work that was keeping me up later and later at night. Unfortunately, while it’s a bit stressful to stream myself work, and it’s a bit difficult to get used to waking up and working right away, the idea of waking up and streaming working right away is just too much to countenance at the moment. With time, this may be something I can approach – it may be helpful to get away from my conception of streaming as something where I need to have a constant running commentary, for instance. Or maybe I can just eventually get to the point where I’m more comfortable vocalizing my thoughts immediately after waking up. At the moment, though, trying to do two things which aren’t readily in my nature at the same time just felt like too much. Hopefully, in time, the dev streams will return. In the meanwhile I’ll probably continue streaming gameplay a few nights a week, though this past week I have been remiss due to fatigue.
That just about does it for this month’s update. Next, I plan to finish this scripting system, fix the remaining issues in the room generation code, and probably start building out the first few rooms and entities and some more finished looking art. I think by next update we may be able to start getting into actual content, rather than tools – but who knows what rabbit holes I have left to fall down?