Basic sprite images and masks

Again, working on a plug-in for my own personal enjoyment, ran into something interesting/confusing...

I have the plug-in I am working on, Plug-in A. I wanted to copy the graphics another plugin, Plug-in B, uses for one of its ships. However, when I load Plug-in B with EVNEW, all I see are the rleD images, and nothing pops up for their corresponding rle8 masks. I thought it could be a problem with EVNEW. I decided to copy the rleD pic anyway, copy it into my Plug-in A, and try to use it and see what happened...

... and it seems to work just fine. I haven't really worked on plugins since EV/EVO days, but I was under the assumption you always needed a sprite and its corresponding mask. But then I look at the EVN Bible and it says, for BaseMaskID that it is "ignored if the base image is an rleD/rle8 resource". Does that mean that I don't need masks? But, then, why does EVN apparently have all the masks like it should? (which EVNEW loads no problem... assuming there was a problem at all)

So, do I need masks? Or no?

An rlëD resource contains both the sprite and its transparency information. When you create it, you need to supply the image and mask, exactly as you would have made them for the previous games, which your editor then compiles into a single rlëD. This approach is more efficient, because the masking calculations are being done in advance rather than at run-time, and the resulting resource is also smaller than a pair of PICTs.

rlë8 is just a second copy of the same mask-and-image combination, except in 256 colours (i.e. 8-bit) rather than thousands. The consensus seems to be that it can safely be ignored. (If rlë8 resources look like masks to you, that indicates that EVNEW is not rendering them correctly, which I recall hearing was the case.)

Note that the mask still needs to be pure black and white. 16-bit gradual transparency is not supported.

@david-arthur, on 14 February 2013 - 05:18 PM, said in Basic sprite images and masks:

Note that the mask still needs to be pure black and white. 16-bit gradual transparency is not supported.

However, you can still attain partially/completely transparent/translucent sprites through the shän resource. This is how the Vell-os ships were made somewhat transparent in the wings.

Log in to reply