I've been coding a bunch of critters and other things for my metaroom, and working with them is making me wonder something.
A few critters had sprites only facing one way. What I wound up doing was making copies of the individual images facing the other way before throwing both into the sprite file. However, I'm aware there exists a CAOs command, mira, that flips the sprite around in-game.
What I'm wondering is the advantages and disadvantages of each method. Mira is obviously a bit easier to implement, but does it take up more processing power over having images facing both directions in the sprite file? Is there any hidden benefits to using one method over the other? Stuff like that.
MIRA does come with a few disadvantages. For one thing, since it forces the engine to "create" the flipped sprites on the fly, I doubt it's much more efficient for the game itself than just creating the mirrored sprites by hand.
However, there is one obvious drawback to using MIRA: an agent will not appear on any in-game cameras while its sprites are mirrored. For example, if you use MIRA to change the direction a critter faces, that critter will be visible on cameras whenever it is not mirrored, but randomly disappear any time it turns around.
I did not initially notice this issue myself, and used MIRA a lot more frequently before the problem was eventually pointed out to me. I try to use the command more sparingly now, although I do still use it. Being able to "cheat" your way out of drawing mirrored sprites can be very useful in certain situations. I have used it a few times for agents that have a lot of sprites, particularly when I was concerned that they might exceed the 255 sprite limit if I were to include flipped versions*.
* You can, of course, have more than 255 sprites in a sprite file. But the number 255 is used as a special marker to indicate the end of a loop sequence when using the ANIM command; so if you say "ANIM [253 254 255 256 257]", it will reach 255 and then flip out, assuming that it is supposed to continually loop starting on frame 256 of a two-frame animation!
I'm not aware of any other drawbacks to using MIRA, and your mileage may vary as to whether or not the camera detail bothers you. There are definitely some circumstances when it will be more or less noticeable; and of course it becomes a moot point for agents that are invisible to cameras by default.