About the Shadow in 2D Game

Started by
0 comments, last by Jonoson 23 years, 8 months ago
here''s my problem... I want to make shadow for my unit. I used the Alpha-Blending. First I use DDSURFACEDESC structure to make my shadow surface which store the shadow pixels. then I run the Alpha-Blending function. But this type of making shadows made my game speed become very very slow. Does any one know a way to make shadows in 2D Game better than mine? and sorry for my poor english. but thanks anyway.
Advertisement
Most people, in 2d, either just use a solid black sprite, or they dither it 50%, which looks better the higher your resolution.

The dithered one would be transparent, which is a plus, but depending on the nature of your textures, they might shimmy.

But no, there''s no good, fast way to make shadows that deepen the background using directx. You''d have to use memory surfaces and use ASM routines to get all the speed you really want.


-- Goodlife

-----------------------------
Those whom the gods would destroy, they first drive mad.
--DirectX design team official motto
-- Goodlife-----------------------------Those whom the gods would destroy, they first drive mad.--DirectX design team official motto

This topic is closed to new replies.

Advertisement