SSH #36 — Rigor Vitae

In which we breathe new life into Sector 80's inhabitants

LucienSaturday @ Second HalfAtom Feed
Saturday @ Second Half #36

Happy Saturday!

Join Second Half Games on Discord

Last week, Harry took us all on a tour of the gorgeous garbeaches of Florida IX!

This week, we've been working on making enemies. Not in real life, but in our video game. You know, MEANWHILE IN SECTOR 80.

Cycles: The Enemy Sprint

Here at Second Half Games, we use a process called "cycles" where we pick a major topic every week for everyone on the team to work on. We make a plan on Monday, do it during the week, then talk about how it went on the following Monday.

I can tell what you're about to say. You're going to say "those are Sprints" or "that's Agile"; you probably believe in "delivering shareholder value" and "achieve quarterly OKRs" and — ... and — ... uhh — ...

Sorry! I think my brain short-circuited. It's important that we don't use the S word here at Second Half. We're much happier for it. They're Cycles. They go in a big document we call The Cycloplan. It's a good process, sir.

Everything we did this week was part of the cycle known as Enemy Sprint III! Read on, my fellow human, and see what that included.

The Crabs are DeprecatedLaura

For several months, we've been using a standard "crab bot" frame that Eryn built as the foundation for all of our enemies:

There is only one step, and it IS crab.
There is only one step, and it IS crab.

They've served us faithfully! These bots were our first fully modular enemies with detatchable parts, a built-in power source, and our patent-denied polymorphic Slap-Any-Part-On-It AI.

That said, the crab bots have some critical flaws:

  1. They're low to the ground. This makes them hard to shoot, gives them clearance problems, and makes their silhouette awkward.
  2. They have a very limited range of motion to emote and signal state. With only four joints and stubby legs, their center of mass can't shift much!
  3. They don't have enough fun parts to shoot off!

As part of Enemy Sprint III, Laura made a bunch of new enemy blockouts to experiment with!

Come visit the new KILLER ROBOT SHOWROOM, only here in KELLOGG, IDAHO!
Come visit the new KILLER ROBOT SHOWROOM, only here in KELLOGG, IDAHO!

The new enemies are already a hit with the team! They're a lot of fun to build with and I'm excited to see how they feel once we texture, rig, and animate our favorites!

Behavior TreesLucien

I've written a decent chunk of the code for MS80. That's included rendering, physics, editor tools, asset pipelines, and a bunch more. Games take a lot of different kinds of code!

...but I have to come clean. Up until this week, I honestly had no idea how to build good enemy AI in a game.

We've been sorta skating by with a handful of rat's nest state machines but it's been a constant pain point whenever we need to add new features to our enemies. Given the number of parts and situations that enemies can be in, the state of things was crushing my soul.

This week, a friend of mine mentioned Behavior Trees. I'd heard about them, but whenever I hear a Proper Noun Programming Term, all of my muscles tense up. Someone once whispered "Dynamic Programming" in my ear and I reflexively jumped out the window.

This time, after picking the shards of glass out of my skin, I sat down and actually tried making a bonafide Behavior Tree™.

Man discovers fire
Man discovers fire

Yeah, alright, they're really good. It's easy to do sequences of actions and to add new stuff. There are some shortcomings with regards to transitions and dynamic prioritization but those things are solvable.

Our implementation isn't anything special. We compose them with code instead of doing it visually. I wrote a couple little debugging tools for inspecting the state of the tree:

good enough for government work
good enough for government work

The result is that we've now got enemies with much more interesting behaviors! Here's the new BT-based robot agent using one of Laura's early enemy blockouts:

Early days, but I'm giddy at the promise!

how is robbot formed?Harry

Since the dawn of time, we've been missing an answer for one of the fundamental questions of the (game lore) universe: why is Sector 80 full of angry robots that stand around, waiting for their chance to kill you?

This week, Harry has gotten that all sorted!

It's a wonderful tale of political intrigue, corporate espionage, star-crossed lovers, and a surprising number of impromptu musical performances. We're trying to land Lin-Manuel Miranda for that last part but he hasn't been returning my calls.

Nobody at Second Half is under NDA; we keep things secret for the love of the game.
Nobody at Second Half is under NDA; we keep things secret for the love of the game.

What? Did you think I was going to actually tell you about it? Nope! It's not time yet. In the writing biz, they call this "suspense" and it means you'll have to keep reading these newsletters.

Besides writing, Harry has also been starting to rig up encounters involving locking the player in a room with a bunch of enemies. Two robots enter, one robot leaves!

Chicken tenders for dinner.

Looking Ahead

We played Oxygen Not Included as a team on Friday. ONI is one of my favorite games and it's extremely relevant. Everyone seems to have had a great time! It also seems to have one shot at least one member of our team. Whoops.

My colony got this far!
My colony got this far!

Harry named all of his duplicants after elements. When Chlorine dug into a giant pocket of Chlorine, we all agreed that he had brought this upon himself.

Next week, we're gathering in person for Second Half IRL 2025. I just made that name up. It makes us sound like a big coporation hosting a big public event. We're not. We're five people working out of my garage, but, like, remotely. In any case, I'm excited!

See you all next week!