dmg@ssc-vax.UUCP (David Geary) (01/08/88)
I am in the process of developing my own version of Arkanoid. I am using 1.2 version of Kickstart and Workbench on an A1000, and I am using the Lattice 3.03 C compiler. I have a few questions: 1) Should I use Intuition to open my screen & window, or do it on a lower level? How much overhead does Intuition take? Will using Intuition slow things down at all? 2) How can I put shadows underneath the boxes, paddle and ball? I could just draw black rectangles for the shadows, but I want the background to show through the shadows. I'd like shadows similar to the shadows that dropshadows creates on workbench. 3) I'll be using a simple spite for the ball. Is there anything I should know in advance about sprite/sprite-bugs? 4) I will be using bobs for the paddle and UFO's (floating triangles, spheres, etc). Anybody found any quirks associated with bobs? 5) How about using the Layers Library, and bypassing the use of bobs altogether? Would this be any faster? Seems like it would give me more control over what is really happening on the screen, but would be a little harder to implement. I'd really appreciate any responses I get from any of you out there in NetLand. If you have never seen Arkanoid, but know something about developing games on the Amiga, please send me a reply. Thankx. /**********************************************************************/ ...The dog up and died, He up and died, and after 20 years he still grieves... Mr. Bojangles, Nitty Gritty Dirt Band. /**********************************************************************/ -- *********************************************************** * David Geary, Boeing Aerospace Co., Seattle, WA * * (206)773-5249. --I disclaim everything I've ever said--* ***********************************************************
ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) (01/13/88)
In article <1606@ssc-vax.UUCP> dmg@ssc-vax.UUCP (David Geary) writes: >I am in the process of developing my own version of Arkanoid. [ ... ] > >1) Should I use Intuition to open my screen & window, or do it on a > lower level? How much overhead does Intuition take? Will using > Intuition slow things down at all? > For what you'll be doing, Intuition will merely be a convenience to open a screen. You should also open a window for a sole purpose of attaching a menu strip to it, as well as start/pause/quit gadgets et al. However, when actually rendering, use the screen's RastPort, not the window's. The window has a layer attached to it, and you'll take a small but noticeable (to me) performance hit, whereas you won't with a screen. You'll have to constrain all your drawing to on-screen, though. Given your application, this should happen automatically. >2) How can I put shadows underneath the boxes, paddle and ball? I > could just draw black rectangles for the shadows, but I want > the background to show through the shadows. I'd like shadows > similar to the shadows that dropshadows creates on workbench. > 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. This will set the high bit of all underlying pixels, bringing the color value into the range 8-15, which are the dimmed colors. Poof! >3) I'll be using a simple spite for the ball. Is there anything > I should know in advance about sprite/sprite-bugs? > Due to a bug in 1.0/1.1, which had to be preserved to prevent breaking anything, sprites are exactly one pixel off on the X axis. You'll have to correct for this internally. >5) How about using the Layers Library, and bypassing the use of bobs > altogether? Would this be any faster? Seems like it would give > me more control over what is really happening on the screen, but > would be a little harder to implement. > As mentioned above, using the layers.library imposes a performance hit, since it does clipping for you. Since I doubt you'll be moving off-screen, I don't think you'll need it. Further, I've heard BOB's are slower than if you do it yourself. Personally, I'd use BltBitMap(). That's how I did Marketroid (although I'll confess that performance with that was not what I'd hoped for). BltBitMap() also has the added advantage of your being able to play nefarious games with the system in a very controlled way (like the rasterized explosions in Marketroid; I used BltBitMap() there). Good luck with your project. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ 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") "Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor