Log In  

Cart #x_ray-0 | 2022-11-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

A simple example of an x-ray effect using bitplane masking.

Using bitplane have the advantage of having both values (skins and skeleton) in a single sprite, but you're quite limited in the number of available colors.

How it work :

There only one sprite in the sprite sheet, but as you can see, the palette have redundancy.

To be concise, by removing the first bitplane, we're essentially shifting all odd numbered colors to the even color right before them, so color 1 become color 0, color 3 become color 2 and so on.

P#120376 2022-11-09 12:07 ( Edited 2022-11-09 13:41)

Very good!

This could be the basis of a fun game with a medical theme.

P#120394 2022-11-09 20:04 ( Edited 2022-11-09 20:04)

Oof ! I was gonna get around to this. Beat me to the keyboard, @choo-t. Ah. Very well done. Gold star.

As for ideas, while I wasn't thinking of a medical theme. I was thinking of writing the code for using the lens like for a room that APPEARED empty but actually hid keys and switches and stuff.

Maybe even monsters !

Sort of like looking through that magical stone in that last movie, "Spiderwick Chronicles."

P#120396 2022-11-09 20:45

@dw817 Yes, that's the spirit ! Right before this cart I was toying around the idea of colored lenses to reveal secrets, my crude implementation simply used a long string (way easier than marking art) :

You can try it here (use different click combinaison to change lens behavior).

Could be useful for a point&click or and escape-room type of game.

P#120402 2022-11-09 22:01

[Please log in to post a comment]