shadows shadows Barok (MIS) (OP) 2 Oct 03 22:34 on several games i've seen, the are around a sprite is a darker shade, in the shape of the sprite that's on the ground tile. does anyone know how to do this? RE: shadows binarycoder (Programmer) 3 Oct 03 06:09 I am not sure but maybe you create a Shadow Sprite?? RE: shadows qbasicking (Programmer) 3 Oct 03 21:29 They probably drew the sprite pixil by pixil. They probably used something like this.FOR x = 0 TO 10 'lets use round numbers FOR y = 0 TO 10 IF sprite%(x,y) THEN PSET (spx%+x,spy%+y),sprite%(x,y) PSET (spx%+x+2,spy%+y+2), shadow%(POINT(spx%+x+2,spy%+y+2)) NEXTNEXTwhere they have a tabel made of the shadows for all of the colours RE: shadows Barok (MIS) (OP) 4 Oct 03 23:30 binarycoder: maybe it could work, but have you ever played quest for a king by sjzero? (demo) it utilizes shadows like this: it shows all the sprites. then below them is them upside down, except, say below the sprites is a grass tile with all these shades of green. the shadow is basically the same grass tile but with deeper shades of green, like a real shadow. (you don't really see real shadows all black or grey. it's just a deeper shade of those colours.) i'm guessing it's palette manipulation, and was just wondering if anyone knew about how it worked. RE: shadows qbasicking (Programmer) 5 Oct 03 17:15 Try this in screen 13a% = POINT (x%, y%)IF a% > 31 AND a% < 183 THEN PSET (x%, y%), a% + 72ELSEIF a% < 32 AND a% > 14 THEN PSET (x%, y%), a% + 1ELSEIF a% > 182 THEN PSET (x%, y%), 0END IFThe colours 0 - 14 are oddballs you will have to assign shadows to them, but the ones above will be dead-on, this is using the default palettes for screen 13. RE: shadows Barok (MIS) (OP) 6 Oct 03 00:04 heh, i never really thought of that. I just remembered that the palette i'm working with is a gradient (e.g. say colour 20 is a very dark green, colour 40 would be a very bright green.) i'm trying to make a very flexible engine in pure qb, and thought that shadows would be a nice touch (wonder why i keep wanting to type real-time shadows?) RE: shadows Barok (MIS) (OP) 6 Oct 03 00:16 the only thing that would be a problem i guess would be the rotations. I mean, i don't want to waste space making dozens of upsidedown tiles, so i suppose that it would work better if i use sin and cos tables to rotate. then again, i'll probably use them for spell effects and particles anyways, and i guess if i make tables, the slowdown won't be bad, so i guess that'll work.