Log In  


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

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.

7


Very good!

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


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."


1

@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.



[Please log in to post a comment]