Advertisement Jump to content
Sign in to follow this  
oneMoreThing

shadows in 2d

This topic is 1835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there some ways to implement 2d shadows?

For example, how to draw the shadow of  a dragon flying in the sky?

how to compute the location of the shadow?

how to create and animate the shadow?

Share this post


Link to post
Share on other sites
Advertisement

I guess it depends on the type of game you are working on (i.e. where is the camera and the relative positions of lights and objects) but it can be done. For example, this article on gamedev explains a technique to implement soft shadows in 2D. 

Share this post


Link to post
Share on other sites

Is there some ways to implement 2d shadows?

For example, how to draw the shadow of  a dragon flying in the sky?

how to compute the location of the shadow?

how to create and animate the shadow?

For a simple solution, using a semi-transparent circle/oval, that gets smaller the "higher" an object is, and gets bigger it comes lower to the ground. As to where it would show up on the ground, I would keep it at the same location under the object; meaning, if the object immediately dropped onto the ground, the shadow would be right under it.  That would keep it simple at least.

 

I do something like this, but my objects stay at the same height in this image:

SmokeTrails.png

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!