I need to finish my art requirement list and for that I need to finish any features where I am still unclear about what art assets I need. For example, I have a pretty good idea of what tiles I need now that my floor/wall/door sprite logic is done. But I don’t really know what my mobs will have for their mech parts and how the animations will work. First, I need to fix quite a lot of things about sprite part layouts.

Of course, I can preview all my changes in-game, but that is really tedious and it’s tough to get mobs to do exactly what I want consistently. In fact, it will be almost impossible for certain key animations, especially for bosses. So what I need is to be able to preview each state in the editor (which I can select):

And this gives me the primary version for the mob (or anything using animators, like props):

I can also add a quick scale selection for my animation preview, since I’m working with pixel art and everything is tiny:

For example, one issues is that having directions messes up the layering of sprites (“legs” are above “torso” in the above gif). That is, I want some sprites to be above or below, but depending on the direction. Currently, they have just one value. So I need to add the other for when they are flipped:

And this works fine (I added debug arrows again, since this is getting messy):

Now, I want to ideally reuse some of the part setups between mobs, but I really don’t want to manually re-enter every single value. It’s much after for me to write a quick copy-paste routine for the entries:

(I cannot really share common properties between mobs without over-complicating the logic a lot with overrides and custom values and editors for it all. May be in a future expansion of the animation, I could consider this. Plus some sort of multipliers.)

As I am making this I am realizing my sprite arrangement still has ambiguous cases. I have way two variables doing different “directions”. In fact, I need some helper sprites for my preview just to visualize all the cases:

In-game the mobs actually move and aim at the player. This means the mobs also need a flag that describes if they are moving left or right. This is not the same as the facing direction I have, because mobs can “walk backwards” — aim right, but move left. This does cause a certain amount of weirdness for my layouts. Basically, moving left and aiming right means “flipping” parts, but not “flipping” sprites. My stuff is symmetrical, so I don’t need to also swap the parts left/right.

In the end, I get the four cases arranged:

There’s no difference (yet) between “moving” left or right, because I haven’t done the animation yet. But, in theory, they should obey the correct direction.

Next I want to add angles/rotations to this logic. The main sprite has a default angle:

And the part can add additional rotation (offset) to that angle:

And this gives me a rotated part:

This whole thing took a lot of time to do and I did in parallel with animations, which I will cover shortly.

MicroRogue DevDiary #56 – Mob part setup
Tagged on:         

Leave a Reply

Your email address will not be published. Required fields are marked *