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?
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))
NEXT
NEXT
where they have a tabel made of the shadows for all of the colours
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.
a% = POINT (x%, y%)
IF a% > 31 AND a% < 183 THEN
PSET (x%, y%), a% + 72
ELSEIF a% < 32 AND a% > 14 THEN
PSET (x%, y%), a% + 1
ELSEIF a% > 182 THEN
PSET (x%, y%), 0
END IF
The 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.
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?)
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.