Shadows in Isometric

BlitzPlus Forums/BlitzPlus Programming/Shadows in Isometric

bazziman(Posted 2003) [#1]
Hi, I'm developing my own orthogonal (usually called isometric( eninge)...what's the usual way of adding dropshadow to such engines?




Ross C(Posted 2003) [#2]
hey, you could use write pixel fast methods, since it looks like the shadows won't be to big. Try and store the images under the player in an array, since readpixelfast is slow. Read the value from the array, then meet it halfway with the value of a black pixel. Should be fairly easy. Just half the red, green and blue value. Then write this information to the screen buffer. There is code in the archives for seperating the red, green and blue value from the number given when using readpixel fats, and they is code for combining it again to be used with writepixelfast.


turtle1776(Posted 2003) [#3]
Jokers method is probably too slow for lots of shadows all over the place, unless you are running the game on a pretty fast machine (test it to be sure). Other options are:

(1) go with static 'shadows' that are really just part of the building/tree sprites; or

(2) do your iso engine using 2d-in-3d, so you can use hardware-enabled alpha blending available in 3d to blend the shadows with whatever the shadows happen to fall upon. This looks more realistic, but may be more than you want to deal with.

For an example of #2, check out the 'Alpha Effects' demo in my Extended Blitz 2D library. Here's the link:

http://www.blitzbasic.com/bbs/posts.php?topic=21685


Ross C(Posted 2003) [#4]
sorry for the confusion, i was only refering to shadows that move, like the players. I didn't mean to imply that all shadows should be done this way. My post was a bit vague :S


bazziman(Posted 2003) [#5]
ACtually I was wandering about the shadows for the buildings and the trees...Even my humble amiga could do that (extra halfbright mode)...

perhaps a 'checkered' schadow as part of the buildings/trees would be best...still this would leave me with problems in the drawing order....


Andy(Posted 2003) [#6]
Why not just use a chessboard pattern shadow and adjust the y coordinate to fit the height of the tile it is on... Unless the shadowcasting object is moving slow, it could possibly work ;)

Or maybe divide the shadow into smaller rectangular pieces, and do as above...

Andy


Ross C(Posted 2003) [#7]
Depends on the resolution tho. It will look good on 1024x768 or above but any lower and it might look a bit funny tho. Good idea tho, and super fast


bazziman(Posted 2003) [#8]
Actually checked shadows (or see thru) is what I use a lot...I have some excellent clouds made that way...let me post a piccy..hold on!


bazziman(Posted 2003) [#9]
here it is...

www.vandewerk.nl/images/skydemo.png