Rotate Piece vs. Multiple Layers to Simulate Rotation


Pieces can be rotated through the Can Rotate trait or by sequencing through layers showing the piece in various rotations. For a game using a hex grid and pieces that can be rotated having six valid facings, I was wondering about the advantages and disadvantages of each method.

  1. With layering the module designer will need six separate images for each piece vs. one for the rotate.
  2. Rotating pieces might cause some unexpected distortion vs. layering.
  3. With layering it’s probably easier to display text and symbols on the piece right side up regardless of the rotation.
  4. I would guess referencing the rotation (facing) would be no more difficult in one vs. the other.
  5. Layering will have more images in the module.
  6. Rotating will require runtime calculations to transpose the image.

Is there much of a performance difference between more images vs. runtime calculations?
Are there other considerations?


I think you won’t notice any performance difference - it’s not a particularly taxing graphical operation these days.

Just as you’ve described it, layering might allow you more control of the image displayed at each angle, in exchange for (a) more images in the module and (b) probably slightly more work setting it all up.

But both would “work”.

1 Like