Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!rochester!kodak!uupsi!sunic!news.funet.fi!funic!santra!hila.hut.fi!jmunkki From: jmunkki@hila.hut.fi (Juri Munkki) Newsgroups: comp.sys.mac.games Subject: Re: Games coprocessor for the Mac (was Re: Risk) Message-ID: <1990Dec8.051637.9968@santra.uucp> Date: 8 Dec 90 05:16:37 GMT References: <15722@reed.UUCP> <17578@hydra.gatech.EDU> <5963@uqcspe.cs.uq.oz.au> <17743@hydra.gatech.EDU> <10844@ur-cc.UUCP> <11467@goofy.Apple.COM> Sender: news@santra.uucp (Cnews - USENET news system) Reply-To: jmunkki@hila.hut.fi (Juri Munkki) Organization: Helsinki University of Technology, FINLAND Lines: 72 In article <11467@goofy.Apple.COM> rmh@apple.com (Rick Holzgrafe) writes: >In article <10844@ur-cc.UUCP> mek4_ltd@uhura.cc.rochester.edu (Mark Kern) >writes: >> Why do Mac games use quickdraw commands for their graphics? It would seem >> that it would be much faster to a) find out where screen memory resides on >> a particular machine. b) reserve that memory for the application. c) Use >> assembly language routines that write directly to the screen. > >All that gets you is a guarantee that your game will break sometime down >the line, on new hardware or new system software. It's hard to out-draw >QuickDraw (on a Mac's hardware, anyway!) QD is written in assembler, uses >excellent algorithms, and is optimized to hellandgone (wherever that is). QuickDraw is optimized for drawing in windows. If all you need is to draw a thin line and you also know that you don't need to clip, you can do a lot better than QuickDraw. About a month or two ago Ben Haller posted an article complaining about the slowness of QuickDraw. IMHO QuickDraw is ok for what it does and probably most parts of it are quite well optimized by now. The true reason to bypass quickdraw in games is that games usually only need a special drawing command that does something simple quickly. Project STORM (not released, but we're working on it) uses only explicitly routines that draw directly on the screen. This is because it redefines how the screen is used. Instead of modifying 8 bits at a time (on an 8 bit deep screen), it modifies just those bits that the game wants. This way you can have multiple independent bitplanes on the Macintosh. >It's true that trap calls are expensive; but you needn't make many for the >kind of stuff you're talking about, which would be mostly copying bitmaps >around. If you're still worried about trap overhead, you can (at run-time) >learn the actual addresses that the traps trap to, and call the routines >directly. (This technique also may break in some future system, but it has >worked for a long time. Things that bypass QuickDraw break regularly.) A technique that will not break in the future is to use QD bottlenecks to do the drawing. These should always be valid entry points to routines that are actually used. You bypass one level of quickdraw dispatching and the trap dispatcher. Couldn't be much faster than that, could it? (Of course this only works with QuickDraw) >A machine with hardware and software designed for arcade-style animation >will probably out-perform the Mac every time (just my guess; I'm no expert >in these things). If what you want most from your machine is arcade games, >you may well be better off with an Atari or an Amiga (or a Nintendo). The >Mac can do that kind of stuff, but it doesn't seem to be the Mac's strong >suit. I agree, but fancy graphics are not what makes a game fun to play. After all, I still like to play many Apple II games that work on my stone-age Apple II+. The 68020 and 68000 are many times faster than the 6502 in the Apple II. The programmers that used to write for the Apple II aren't writing games for the Mac. It's easier to write the game for something else. I think this is the main reason. The most positive new player in the game writers field is the guy who wrote Glider+ and Pararena. I think those games are steps in the right direction. These are simple and interesting games. (I don't find the time to play them-- I like writing stuff more than playing games.) If you want fast arcade graphics, you need a machine designed for it. Most Macintosh users wouldn't want to pay $300 extra just to get hardware support for 32 sprites. After all, the Macintosh uses only one sprite (the mouse cursor). If you want games that are fun to play, you need good programmers. ____________________________________________________________________________ / Juri Munkki / Helsinki University of Technology / Wind / Project / / jmunkki@hut.fi / Computing Center Macintosh Support / Surf / STORM / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~