Path: utzoo!mnetor!uunet!husc6!think!ames!ptsfa!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga Subject: Re: Need MORE HELP on GAME DEVELOPMENT on the Amiga Message-ID: <5038@well.UUCP> Date: 20 Jan 88 08:13:52 GMT References: <1617@ssc-vax.UUCP> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Organization: Speak Before You Think Enterprises Lines: 37 Keywords: Just one more question (or two)... In article <1617@ssc-vax.UUCP> dmg@ssc-vax.UUCP (David Geary) writes: >In article 4972, Leo Schwab writes: >> You should be able to get away with 8 colors on an arkanoid clone. >> Open a 4-plane screen (16 colors), then make colors 8-15 dimmer versions >> of colors 0-7. Then, when you want to render a shadow, set your >> RastPort.Mask value to 0x08, and draw a slightly offset rectangle... > >Leo's suggestion sounds good to me except that I will have a pattern on >the background that I want to show through. Should I copy a rectangle >from the playfield into a buffer, set the RastPort.Mask to 0x08, and >then render the rectangle I copied back on to the screen? No. You'd do something like this: /* * Example assumes that colors 8-15 are dimmer versions of * colors 0-7. */ SetAPen (RastPort, 0xffL); /* Set all bits */ RastPort.Mask = 0x08; /* Set high bit */ /* Draw shadow over whatever's there. */ RectFill (RastPort, x1, y1, x2, y2); >Another consideration is that the shadows for the boxes can all be rendered >with rectangles, but the baton's shadow is odd shaped. How do I >deal with that? [ ... ] You'd OR all the bitplanes in the baton to create a single bitplane shadow mask. Then you'd blit it into the most significant bitplane in your playfield. Poof! _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape ihnp4!ptsfa -\ \_ -_ Recumbent Bikes: dual ---> !{well,unicom}!ewhac O----^o The Only Way To Fly. hplabs / (pronounced "AE-wack") "Simplicity and clarity should be your theme in dress." -- A fortune cookie I got in LA's Atomic Cafe.