jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Fri Jul 04, 2008 5:19 pm Post subject: |
|
|
shadows for dummies:
1) draw your sprites as hardware accelerated rectangles
2) first draw the shadow at x+displace, y+displace being x,y your sprite position and displace a const to adjust: draw your shadow drawing the sprite specifying black/half transparent as each vertex's color
3) draw your sprite at x,y
Considerations: if you need a basilar 2d environment then disable z-buffer...BUT z-buffer can give you layers organization _for free_. If you wasn't speaking of 2d shadows but of 3d ones, then you have a looooong way to walk. If so, start learning algorithms, not code: A nice place to learn this kind of algorithms is www.delphi3d.net (quite out of date, but full of interesting and easy to understand articles) |
|