Drill and EVA Suit

Hey Folks! Work continued today on tools for the crew, adding the handheld drill and beginnings of an EVA suit.

The drill was pretty quick to knock-out, as I was able to reuse a lot of the effort from the laser torch setup yesterday. It's the blue tool with LEDs next to the laser torch, near the bottom of today's screenshot. Neither has in-game functions yet, but they are otherwise setup to be used when I get to that. (E.g. they have mass, price, and stats, but no in-game interactions apart from pick-up)

I briefly considered adding another tool, but I decided that probably the most important tool still missing is an EVA suit. Not many derelicts are going to have hospitable atmosphere (or temperature control, for that matter), so our crew is going to need a way to debark their cozy ship safely.

Unfortunately, this touches on a system that I've been putting off for a little while now: the character appearance system.

The last thing I did here was add Emily's portrait sprites, including swappable parts and animations. I even added code to save/load the same appearance for a character, so they can be recognized later. However, there are still some missing pieces here.

For one thing, the clothes appearance of the crew, what we see when we're looking at them top-down, is always random. Even if you save a game and restore that save, the clothes get randomized. This isn't ideal, since it's the primary way we identify crew apart from their name labels. If your dude is all in orange, and your other dude is in brown, the first thing you'll look for when searching the ship are those orange and brown blobs of color.

So clothing persistence is probably coming due.

Further to that end, if we're going to allow the player to don an EVA suit, these clothes are going to have to change appearance when they do. Again, we could possibly live without this, but it'd stink to have to open a menu or something to see if said crew is wearing a life-saving suit or not. Ideally, you'd just look at the crew to see if it had an EVA suit/helmet on.

So we need some way to change the clothes mid-game.

Clothes also come in a variety of configurations, from full suits (EVA) to piecemeal (shirt, jeans, shoes). Some of these layer, some won't.

So clothes have rules about which parts they occupy and how they can be worn, and how their appearance layers against other clothes.

While we're at it, what happens if we lack clothes on a body part? Are all of our crew going to have the same skin/hair color? Regardless of the portrait the player chose?

Crew should probably have some base layer corresponding to no clothes, and it should use sprites based on the portrait they selected.

Finally, these clothes, as well as the tools I made, should probably apply effects to the crew when equipped vs. carried. This is a lot like NEO Scavenger, so I might just reuse that system.

Anyway, one can see how something seemingly minor can actually imply a lot of related work. But I think at least a part of this was work I'd need to eventually do anyway. Applied effects, mid-game changes, and persistence, at the very least.

So that's where I am now. I've started mocking-up a few sprites for unequipped clothes, as one might find them on the floor. These are on today's screenshot to the right. And part of the day was spent experimenting with meshes for layering clothes. I think I've got an idea that will work here.

Basically, the existing crew mesh is a collection of flat quads for each part. Just swap the texture on that quad, and off you go. (They're 2-sided, for anyone who's curious. So surface normals have correct lighting on backfaces.)

If I'm going to apply clothes as a layer over some base sprite, the outer layer needs to work from both sides of the sprite. And I think I can achieve this without too much effort if I just create a new double-sided sprite for each body part, but kind of "pull" the middle of each side up a bit, giving it a tiny Z dimension. Sort of like a really, really flat pillow.

I've tested this on the head so far with a helmet, and I think it'll do the trick for now. Nothing pretty, but it gets the job done without a lot of new mesh/animation work. I'll start hooking it up tomorrow to see if it works.

Comments

ra1's picture
ra1

Why don't you make their skin just another type of "clothes" at the lowest layer, that they cannot take off and doesn't show up in the inventory? No reason to build a separate system for the base sprite.

dcfedor's picture
dcfedor

I probably wasn't clear about it, but that's basically what I'll do. The sprites we see now are the base sprites, and they'll be set permanently by the choices made in portrait appearance. Probably some combo of skin tone and underwear.

Then, there will be an outer layer (or two) for each part that holds the sprite for the clothes.

The only reason I'm bothering with a new system for clothes is that outer layer part. Since we will have variable flesh texture exposed, there needs to be a way to show both the permanent skin layer, and the clothing layer.

Dan Fedor - Founder, Blue Bottle Games