Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!agate!garnet.berkeley.edu!deadman From: deadman@garnet.berkeley.edu (Ben Haller) Newsgroups: comp.sys.mac.programmer Subject: Re: Graphics/Animation Problems (long) Keywords: video, game, color Message-ID: <1991May4.234227.15300@agate.berkeley.edu> Date: 4 May 91 23:42:27 GMT References: <1991Apr21.073551.14802@santra.uucp> <1991Apr27.193509.19020@agate.berkeley.edu> <23841@unix.SRI.COM> Sender: root@agate.berkeley.edu (Charlie Root) Organization: Stick Software Lines: 44 In article <23841@unix.SRI.COM> mxmora@unix.sri.com (Matt Mora) writes: (in what perhaps should have been a personal letter, but since it wasn't I'll reply...since everybody else keeps asking me too... :-> ) >how about posting (or mail it to me so I can include it in the UMPG) >some of the actual direct to screen drawing code you have. >Or is it only available for a nominal fee? I know you mentioned something >about your sorce code was for sale for $25. The only program I've done so far that's available as shareware (and, therefore, that source could conceivably be available for) that does direct to screen drawing is Solarian II, and in fact the source to that is not available. However, this is dodging the question. In actuality, I don't post actual code because of a few reasons: o I would have to write the code, since Solarian II's code is not acceptable for general distribution, being poorly written and uncommented in large measure. o I would have to deal with all the questions and such that my post would generate (like I don't already... :-> ) o Most of all, I feel that direct to screen stuff is very touchy, and should not be attempted by people who don't know a lot about Color QuickDraw, GDevices, the cursor handling, etc. Anyone who can't write code based on the (fairly explicit) hints that I give shouldn't be anywhere *near* doing direct to screen stuff, IMHO. o A final reason: the point of writing direct to screen code is either to implement functionality that QuickDraw simply *cannot* do, which is very rare and very complex (since QD does everything easy...), or is to achieve significant speedups over using QuickDraw. To achieve a significant speedup, one needs to write fairly optimized assembly that is specifically geared towards the imaging being done. Any post I might do would be almost useless for anything beyond the (reasonably simple) details of how to set a pixel to a color without QuickDraw. This isn't a major point, since most people are stuck at the how-to-write-to-screen-memory-safely stage, but it is a minor point. -Ben Haller (deadman@garnet.berkeley.edu) "Jamaica...Afriki..." - Alpha Blondy It's fascinating the mundane things that pass for song lyrics... or .sigs...