Oh man, I have been busy for the past week. Had to do so many tasks and had no time or energy left for the game. Ah, well. Back to my definitely reasonably not overscoped project with a realistic deadline.

Last thing I was doing was animations and left in the middle of it. So I should finish that and for something easier I can do a hovering bot:

This is just an animation of every part to offset up and down on a sine wave — pretty straightforward, but immediately looks like they are floating. I should also do effects for animations, and this is a good candidate. First I need to define an effect for each animation:

Then I can create the appropriate effect and bundle for it, in this case, hovering:

And I can then have some little (temporary) hover jet “exhaust” sprites (white points are debug indicators for effect sprite corners):

One issue obvious in the above gif is that effect render above the mobs. This is deliberate for stuff like bullet impacts, but I don’t want this for effect that happen “under” the mob. In other words, I want a readable options for where the effect should happen:

Then I can specify the proper render sorting offsets in my effect world object:

And this renders it correctly (impact – above, exhaust – below)

I am also adding rotation to my sprites, so they can point in different directions. In this case, the jet points left or right if the mob is actually moving:

And this looks fine (barring some issues):

I also want to add similar effects for walking, but these are going to be ground stomps instead.

I made a quick expandable editor, so I can modify the bundle without needing to select it every time:

And the effect editor within the bundle editor, since it contains most of the “interesting” properties:


There an issue here however that there are 2 separate steps in each walk loop — left and right foot — but there’s only one effect (bundle) and offset. I can’t specify “place alternative effects on opposite sides” easily or at least modularly/reusably. What I need is for each animation to specify multiple effect bundles:

I don’t want to have two different effect bundles, so instead I added an extra timer delay offset (marked “O” above) that specifies a delay for the effect. Then they each run every other step, but one is offset half a step.

Thankfully, everything’s nicely encapsulated, so this isn’t too hard to change and just means a list of updatable effects instead of just one. And this works:

(In-game, the effect would appear below the mech.)

Now just to add these to every mob…

Anyway, shorter post, but I’m getting back into it.

Related Posts

MicroRogue DevDiary #58 – Animation effects
Tagged on:         

Leave a Reply

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