EveHeader

Well I got the general case solution working, and I got all of the code I’d already written for the entity behavior copied over to where it needs to be, and I built it all and it all runs more or less. So I guess now I’m on to debugging and improving it, creating more animations, and creating the alternate versions of this entity. It’s all a lot of work, but I knew it would be: The problem at this point is mostly just that it’s been real hot and I’ve been having trouble keeping my motivation going.

But, you know, my motivation has flagged plenty of times during this project, and it still keeps on chugging along. As long as I get a bit of work in every day, it will continue to move forward. Yes, I’d prefer to get in more than a little, but sometimes it’s going to be hard.

That’s just how it is.

So, this week will be mostly creating new animations to flesh out this entity, implementing them, and fidgeting with the code to make the behavior better and more naturalistic. Hopefully productivity will pick up, but even if it doesn’t progress will get made, just perhaps very slowly.

It’s been really hot, I don’t have air conditioning, and I feel like taking a break. Yes, I know this is ironic after last week’s post. My phone tells me it’s supposed to be like 10-20 degrees cooler this time next week so hopefully that will be conducive to writing something new and wonderful, as well as getting all the other crap I need to be working on done.

Here’s the now-customary consolation music. Amongst other things, establishing this tradition is helpful both for keeping me writing music and for ensuring that I don’t skip out on too many posts in a row.

EveHeader

Another week on programming this entity’s behavior. A few days in and I was getting close to having it all working when I ran into the dread disease programmitis, bane of programmers everywhere. No I’m not talking about carpal tunnel syndrome. No, I’m not talking about getting a sore butt from sitting in a computer chair all day! I’m talking about the general use case.

Well, to make a long story short, it was pretty easy to create a generalized state machine AI behavior, but it was a lot more difficult to break all of the state code out into individual files, requiring me to separate all the variables used out into each of those classes rather than keeping them all in one central place in a cluttered but easily comprehensible way. It was also a lot of work taking the most general functionality, such as tests to see whether one entity can see or hear another and the code to navigate a path, and extracting that into an EntityTools utility class that I can use for all future entity behaviors.

In other words, all the traditional ways that programmers get sidetracked and waste a ton of time.

Is this time going to be a waste? Dunno! Pretty sure I could have at least done this in a better order, such as finishing getting the entity working, then extracting the general-use code out into an EntityTools class, then generalizing the state machine AI into a reusable behavior. That would have been the smart way to do it, probably. Oh well!

As things stand, if I can focus it should still come together pretty fast and be working within a matter of a day or two. That’s a big ‘if’, though, with the temperatures this week dancing up around the high 90’s and 100’s of degrees and me stuck in a tiny room with no air conditioning. Well, I’ll try to make steady progress, and maybe if I get lucky I’ll even eventually start making fast progress too.

Three years ago this month I started this blog. It was a hot Summer day like this, because that’s how years work, and I’d had a few solid shots of vodka for no reason in particular, but that probably contributed substantially to Problem Machine actually coming into existence.

Three years ago. Fuck me, am I right? Writing more-or-less weekly updates has been a part of my life for three years. I’m 32 now, as of approximately one hour ago, or twelve hours before this article’s time of publication. Some things have changed. I’ve moved twice, I’ve settled into a kind of routine, I’m set up in my own place and live here largely through my own work rather than the generosity of others (though, at all times, the line between the two is never as clear as we’d like to believe). And, for the last couple of years, I’ve been working on EverEnding, which it now occurs to me is exactly the kind of delightfully ironic title a writer with a nasty sense of humor would give a pretentious vaporware title that never manifests. That degree of existential smugness simply cannot be tolerated, which is another reason to finish the game I suppose.

Lots of things haven’t changed, too. I still don’t really feel like I’ve earned a place in the world, though I may have made peace with a growing belief that I don’t think most people ever do. I’m still so incredibly isolated, in some ways more so, finding it difficult to learn to want to engage with the world outside my head. I’m still broke, I still fight to tamp down an unearned sense of arrogance, I’m still essentially non-existent as far as the world at large is concerned, I still feel anxious and depressed frequently enough to trip up my motivation, I still try to push myself to work harder, I still often forget to push and end up spending much of my time doing barely more than nothing.

It’s not bad. It could be better.

It’s been so helpful having Problem Machine. It’s an anchor to hold me in place and a map to tell me where I’ve been. It’s a mind-dog I have to take out on mind-walks once a week, which is a pain in the ass but is good for me. I still want to turn it into more. Four months ago I wrote about my plans for the future and I haven’t done any of that shit, none of it at all. I don’t know what to do about not doing that. Something, presumably.

I just need that nudge. That hot Summer day, that birthday, that shot of vodka, that fear of mortality, than loneliness, that unearned arrogance. I need some yet unlearned alchemical recipe which, once combined, will open the road into my future. I need more error and more trial. I need to seed my world with possibilities, with disasters and with adventure, to knock myself out of orbit, to be in the right place at the wrong time and/or the wrong place at the right time.

I need a problem machine.

EveHeader

I started working on all of the behavioral programming stuff, then I got completely sidetracked for a couple of days when I realized that I didn’t have any centralized document with all of my story content in plain language. Up until now I’d gotten by pretty much keeping all that stuff in my head, and occasionally writing down bits and pieces of it, more often than not in the form of stories which were more metaphorical than accurate to the reality of what’s supposed to be going on in the story. This, I realized, was making it difficult to append to the story and to plan out how I was going to tell it, because I had no centralized resource to refer back to to make sure I wasn’t contradicting myself. It took me several hours to write it all down and it ended up being more than 3,000 words, which is a pretty good sign I should have done it sooner. It’s still somewhat subject to revision, but revisions should be more along the lines of expanding and going into more detail about unclear concepts than changing the specifics (unless I come up with a really good idea, of course).

After that I went back to programming the behavior of these entities, and I found that both my production planning using Trello and the detailed story breakdown of the last week or so of work came in very handy, since I immediately found myself breaking down all of the behavioral specifics that had been confounding me into a set of relatively easy-to-manage behavioral states. Thus, rather than trying to think of the behavior of these enemy types as an impenetrable wall of if-then statements, I can parse this behavior much more readily as a set of simpler behaviors that switch to other simple behaviors based on the input. So, for instance, I can have a patrol state that does nothing except walk forward, and then have it switch to either an idle action state at random intervals, a turn around and patrol the other direction state if it hits a wall or the edge of its patrol radius, or a pursuit state if it sees the player. At that point, all I have to do is write the 5 or 6 lines of code that control each state and the entity should work.

I have the basic version almost up and running, but the code to handle when and how to attack is still a bit tricky since it deals with the specifics of positioning which vary from attack to attack. All of the movement stuff is pretty much there, though it will inevitably require some debugging, and I still need to generate the timing info for things which rely on a timer (attack recovery, patrol delays, alert time, etc.) I think I can finish up the basic behaviors tomorrow, at which point I go back and do all the prototype animations needed to fully animate those behaviors – after that, I go back in and add all the code in for another version of this enemy, such as the scout or rider variants, and then I make the animations for them – and so on, and so forth, until they’re all done.

Making future enemies should be quite a bit easier after this, since I think these will be by far the most complex of any non-boss enemy in the game. Even for cases as intricate as this, in the future I’ll have these guys as a template to work from, so I expect any future problems to be quite a bit more approachable.

chess

It’s useful knowing what team you’re on. Red vs Blue, Shirts vs Skins, Us vs Them: In game design, we try to make that difference obvious on first glance, we make the shapes different, tall and thin vs short and bulky, add distinctive hats, make everyone on one team red and everyone on the other team blue. It’s convenient, a visual short hand, telling us who is a friend and who’s an enemy.

Convenient shorthands can be dangerous. Our friends aren’t always our friends, our enemies aren’t always our enemies, and very seldom is the division clearly demarcated. And yet, many people want to believe that that isn’t the case.

Many people still see the world in black and white.

I don’t want to trivialize real-world violence by making a video game analogy here, but the same kind of convenient shorthand we use in game design to denote friend and foe is easily harnessed towards darker ends. It’s so easy to frame a worldview in us vs them, and even easier to draw that line along racial boundaries, leaving the heroes and villains color-coded for our convenience. It’s utterly stupid and evil, but I can still understand the appeal.

I don’t think the thought process is as simple as “they look different, therefore they are an enemy”. There’s a sophisticated dance of explanation as to how everything is someone else’s fault, carefully musical-chaired around until the blame falls on the desired group of undesired people. I don’t think it’s a simple problem, but I do think that it exploits a simple hole in the mental defenses of the average human being: We hate being confused. We hate nuance, and complexity, because it means we don’t know what to do. It means we’re lost.

It’s so much easier to believe that we’re a soldier in a war. It seems so simple. And for there to be a war, there needs to be an enemy – and for there to be an enemy, there needs to be a line of division, some clear point of difference between One Of Us and One Of Them. There are lots of lines people like to use, sexual orientation, gender expression, religion, nation… but race is the most convenient, the most easy, the most popular, because it means the enemy comes color-coded. Red vs blue, black and white, and like chess pieces we each have our role to play, like chess there is a strategy, a master plan.

Once we recognize that, though, once we understand that there are many people who see those of other races as an enemy and will resort to violence to win their war, what do we do next? Can we wage war against them ourselves? Who would we even be fighting against? Obviously something must be done, but to frame it as a war is to doubly inflict the logic of violence, domination, and supremacy upon ourselves. The war can’t be waged on those we see as separate from ourselves, but on the lines that divides us.

We’re not playing a war game, here. We’re playing war solitaire. And we’re losing.

EveHeader

I’ve kind of been bouncing back and forth between making animations for this entity, trying to refine and build out the behavioral code, and going back and building out a production schedule. Animation-wise, I created a looking-around idle animation, a crouch animation, an attack animation, and a very rough jumping animation. I redid the running animation a bit as well because I decided I didn’t like the motion of the arms. I’m just now realizing that I’ve neglected to make anything for the entity turning around, which is why I should probably try to put together a list of what I need before I put this much time in, but whatever.

MaskCrouch00 MaskIdleLookAround00 MaskRun003 MaskAttack00

The behavioral code is starting to come together to the point where I can probably get something at least semi-functional up and running tomorrow, at which point I can see about getting all of these animations implemented into the entity itself. Upon reflection, some of the variations of this entity would probably be better represented as altogether new entities, and I’m starting to question the assumptions which had me fold them all into one meta entity in the first place, but I can hash all that out as I go, though it may be a bit confusing at times.

I’ve been feeling like I haven’t been putting in enough work, but have also been having a hard time focusing enough to put in more hours. I think there’s a number of reasons for this, but a big one is confusion as to what exactly to do next, so I’ve started trying to break down a complete task list for the project so that I can start scheduling out what needs to be done. I popped open the Trello outline of the project I created a couple of years ago, and found that many of the assumptions I’d made while making it were no longer useful. I’ve been deleting entries that seemed to be backwards in their approach and replacing them with new ones aimed more directly at breaking down the specific challenges I expect to deal with regarding the construction and polishing of entities and levels.

Next week should be more of the same, on all fronts. As mentioned, I still need to make a couple more prototype animations at least for this entity, and once those are done I need to start in on the other versions for different variants of the entity. The behavior is starting to come together, but even once I get it running I’m probably going to need to spend a while tweaking it before I really like it, and there, again, I’m going to need to start adding stuff on for the different variations. And, finally, for the production break-down I’m going to break it down more and more until I can’t possibly create smaller or more approachable tasks. Once that’s done, I can see about scheduling them out, one after the other, until I have some kind of a timeline for creating the game.

When in doubt, it’s useful to attack a problem from several different angles at once. I think I can get all this figured out.

 

 

Follow

Get every new post delivered to your Inbox.

Join 5,729 other followers