I've used a similar technique for shadows by copying the sprite then setting the sprite colour to a semi transparent black (0,0,0,200) and it works ok
Quote: "1. Is it possible to create a sprite the same shape as another sprite (transparent png) but completely filled in one colour?"
Yes, you could use a shader which just draws the sprite colour and not the colour in the texture so that only a flat colour is drawn with alpha. this would give you a shadow sprite that you can set the colour of.
Code for that shader would be...
uniform sampler2D texture0;
varying mediump vec2 uvVarying;
varying mediump vec4 colorVarying;
void main()
{
gl_FragColor = vec4(colorVarying.rgb,texture2D(texture0, uvVarying).a);
}
Alternatively, you can use CreatImageColor(),resizeimage() and then SetImagemask() to give you an image which is a solid colour but preserving the alpha values in the original image.
Create a solid colour image (CreateImageColor()) and resize it to be the same as the original sprite (ResizeImage()) then use setimagemask() to copy the alpha values over to your solid colour image. Of course you could just do this in a paint package too.
Quote: "2. Is it possible to blur the edges of a sprite so that it looks more shadow-like? I'm no expert with shaders - I haven't got a clue!"
Simply put yes you can. Again, its not too hard to write a shader which will blur the original image so the shadow edge is less well defined. if your not too experienced with shaders then that might be a bit daunting.
In the shader you can take advantage of mipmapping and use the "bias" input in the texture lookup and it will do the blur for you with only a single texture lookup!! Its a cool trick
Another method without using shaders is to copy your original image and resize it to a quarter of the original (anything 0.1-0.4 works well) then use that image on the shadow sprite...The shadow sprite is set to be the same size as the original but due to the image being smaller, some blur is introduced due to the image size being smaller. No shader needed for this method and it works well enough. You could just resize the solid colour one i described above to give a similar result by making it 0.25 x its original size.
I personally would use a shader but either method works well.