Posted By
|
Message
|
Del Duio Born in a Bowling Alley
Registered 29/07/2005
Points 1078
|
24th February, 2009 at 02:30:36 -
Okay this is silly but what exactly does the XOR ink effect do? Does it randomly switch the RBG values for the sprite? The effect seems to be different every time I mess with it, whereas some effects like monochrome will always deliver a black & white sprite.
Thank you!
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
|
OMC What a goofball
Registered 21/05/2007
Points 3516
|
24th February, 2009 at 02:41:52 -
XOR is a mysterious feature from the depths of the Clickteam gnome-filled basement.
If logical XOR has anything to do with it, it likely takes the opposite color on the color wheel and adds the opposite of the overlapping color.
So yea, no clue.
Edited by OMC
|
Cecilectomy noPE
Registered 19/03/2005
Points 305
|
24th February, 2009 at 11:05:02 -
take a look at what XOR means. its a logical bitwise operator that means one or the other but not both. im not exactly sure how they use it as an ink effect but im pretty sure it has something to do with the source bitmap and the destination.
on a white background all it means is that it inverses the colors. take a bitmap and inverse it in mspaint. then take the same bitmap in mmf (on a white background) and add the XOR ink effect. its exactly the same. drag that active over a background that isnt white and see what happens. the color depends on what the destinations color alread is.
n/a
|
Del Duio Born in a Bowling Alley
Registered 29/07/2005
Points 1078
|
24th February, 2009 at 15:16:19 -
The reason why I was curious is because one of the times I was messing with it it gave my sprite an AWESOME invisibility effect, and hasn't since hahah.
Back to the drawing board, thanks for the response.
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
|
Sketchy Cornwall UK
Registered 06/11/2004
Points 1971
|
24th February, 2009 at 18:47:44 -
XOR is quite hard to explain.
It is a bitwise operation, and works by comparing the binary code of the two colors.
Because of this, a tiny difference in RGB components between two colors can have a huge impact on the end result, making it largely unpredictable. I have no idea why clickteam bothered to include it.
Example:
Color 1 = 255,0,0 (bright red)
The red component = 255 = 11111111 in binary
Color 2 = 128,0,0 (dark red)
The red component = 128 = 10000000 in binary
Now compare the individual bits of the two colors.
If they are the same, output "0".
If they are different, output "1".
11111111 (color 1 = 255)
10000000 (color 2 = 12
01111111 (output = 127)
Repeat for green and blue components.
n/a
|
aphant
Registered 18/05/2008
Points 1242
|
24th February, 2009 at 19:47:26 -
Originally Posted by Sketchy XOR is quite hard to explain.
That's an easy to understand explanation. Except, there is no 12 value. Stupid smilies.
|
OMC What a goofball
Registered 21/05/2007
Points 3516
|
24th February, 2009 at 20:13:24 -
Originally Posted by SketchyXOR is quite hard to explain.
It is a bitwise operation, and works by comparing the binary code of the two colors.
Because of this, a tiny difference in RGB components between two colors can have a huge impact on the end result, making it largely unpredictable. I have no idea why clickteam bothered to include it.
Example:
Color 1 = 255,0,0 (bright red)
The red component = 255 = 11111111 in binary
Color 2 = 128,0,0 (dark red)
The red component = 128 = 10000000 in binary
Now compare the individual bits of the two colors.
If they are the same, output "0".
If they are different, output "1".
11111111 (color 1 = 255)
10000000 (color 2 = 12
01111111 (output = 127)
Repeat for green and blue components.
Nice explanation. I knew it used the bitwise operation somehow, but didn't think that it probably took the binary version of the color's RGB value.
|
|
|