When I was young, I always wondered why some games seem more real to my eye and others not. Why some of them gave me a false impression of depth and solidity and others seemed like the characters were floating. It didnít take me long to understand that shadows were the trick.
In this tutorial I present 2 easy implementations of shadows and I explain step by step how to implement my favorable.
I hope you will find it useful.
Neat example. Very simple and to the point. Also, the look of your game gives me pleasant nostalgic feelings.
I do have a couple of suggestions:
Instead of using the RGB coefficient to make the shadow black, I would make the sprite itself black.
For the transparency, I wouldn't do this on a per-object basis. I did this in an earlier game not knowing better. The result was that overlapping shadows would be darker than what one might want. Instead, put the shadows on their own layer and change the transparency of the entire layer. That way, you don't get those darker overlapping spots, and you don't have to worry about shadows casting over higher points.
Even in simple tile games the addition of subtle shadows may improve the overall look and feel tremendously. I like the example given by Daniel Cook, from lostgarden.com:
The trick is to add subtle shadows to indicate depth to otherwise very flat looking art:
In fact, regarding the RGB coefficient, I would have to do this for each animation sequence and every frame in it. Too much work for me. One could also automate the whole process and use the same animation of the original active coding all the process.
Now regarding the transparency, this is awesome. It never crossed my mind that this problem would appear. I will have to update the article and give you som ecredit then
If you are ok with that ofc.
Credit is fine, but credit it to Raxasoft Games.