home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!darwin.sura.net!dtix.dt.navy.mil!uranus!tecsun1!afterlife!mssmith
- From: mssmith@afterlife.ncsc.mil (M. Scott Smith)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Arcade-style animation...
- Message-ID: <1993Jan27.232803.20061@afterlife.ncsc.mil>
- Date: 27 Jan 93 23:28:03 GMT
- References: <1993Jan25.094256.12845@rulway.LeidenUniv.nl> <34994@goofy.apple.COM> <1k6pol$bvn@agate.berkeley.edu>
- Organization: The Great Beyond
- Lines: 55
-
-
- Maybe I'm missing something.. But isn't it quite possible to find out the
- base address of a video card -- most video cards, Apple and non-Apple alike?
-
- I hope so, because I've been doing this the past several months in a game
- I'm writing and it seems to work fine so far on a variety of platforms.
-
- I wrote routines that scroll the screen to the right and left as well --
- and they seem very quick. I'm not using any "scrolling" features of a video
- card; all you need to do to scroll a screen is move the bits around in the
- right places -- the only limitation might be speed, but this doesn't seem
- to be a problem either.
-
- I might not be doing everything safe, and I'm sure my routines will "break"
- under certain circumstances, but -- a lot of programs write directly to the
- screen and work fine. System 7's one of them.
-
- Now I've got a few questions for the experts..
-
- I wrote a library of functions to handle "sprites" (for lack of better word;
- pictures, whatever) -- I have one program which transforms high-level
- graphics created with paint programs, etc., into the low-level bits that
- I need to plot directly on the screen. I then wrote a program that takes
- the output of this program and writes a C function out of it -- this function,
- when called, basically "stamps" the picture on the screen.
-
- I should note that it stamps the picture on screen much, MUCH quicker than
- can conceivably be achieved with any of the Quickdraw calls. It is very, very
- fast.
-
- But, since I will most likely have lots of graphics in any program I have,
- is this a good approach? That is, what effect will be representing graphics
- as C _code_ instead of data in a data file or the like?
-
- Already, with a few graphics, the program is HUGE (in terms of numbers of
- lines; I don't think the size of the object code is much greater than if I
- kept the bits in a PICT resource or something) -- how will this affect program
- execution?
-
- Oh well.. Maybe I'm talking about something else, but if anyone needs
- help with direct-screen graphics, I could probably help out a bit. (But I
- don't want to divulge *too* many of my secrets! :) I've labored hard to
- find out how to do this stuff!)
-
- Later,
-
- M. Scott Smith
- (mssmith@afterlife.ncsc.mil || umsmith@mcs.drexel.edu)
-
- P.S. I've found that working low-level is less of a headache than working
- with all the Quickdraw calls, when looking for fast animation, etc. The
- Quickdraw graphics calls are ideal in most circumstances, but they couldn't
- handle the kind of animation I'm looking for.. It would be nice if some of
- this stuff was thoroughly documented somewhere, so it wasn't as much of a
- mystery.. But I s'pose it's safest to stay with Quickdraw most of the time.
-