Path: utzoo!attcan!uunet!samsung!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!agate!usenet From: deadman@garnet.berkeley.edu (Ben Haller) Newsgroups: comp.sys.mac.games Subject: Re: anywhere I can get a good LIFE program? Message-ID: <1990Oct3.181911.16439@agate.berkeley.edu> Date: 3 Oct 90 18:19:11 GMT Sender: usenet@agate.berkeley.edu (USENET Administrator) Organization: Stick Software Lines: 51 In message <1266@doctor.Tymnet.COM>, carl@doctor.Tymnet.COM (Carl Baltrunas) says: > I know that there's a really fast LIFE program that runs on the Amiga (no > flames please)... it does it by using the blitter chips to do bit arithmetic > on the cell arrays and then displays the result. > If you try to do the work one cell at a time, you can't possibly handle a > large array in reasonable time... maybe you could implement is software > what the blitter chip does in hardware using some XOR or other functions :-). Yes, it is possible to implement Life using logical instructions such as XOR. And, in fact, that is the fastest way to implement it. I believe the fastest Life program I have ever seen for the Mac is called LAZ-Life or some such name. Unfortunately I couldn't find it on my HD, so I'm not sure this is the one I mean. Oh well. There is a program that can do a whole screenful of 2 by 2 dots and actually be fast. The problem with using logical operations is that a really nice thing for a Life program to do is keep track of how long a particular cell has been alive, and display longer-lived cells with different colors. A good example of this is the little Life demo in the MacEnvy cdev. A little ago I wrote what I believe to be the fastest possible code for the 68000 to do Life (although it probably could be faster, I just don't know how it could be...) while keeping track of cell ages. It displays direct to screen in 1-bit, 8-bit or 32-bit depths, and it's quite fast - a screenful of dots (3x3 or 4x4, can't remember) updates several times a second. This may be released in conjunction with the After Dark screen saver program put out by Berkeley Systems, although I can't, of course, say for sure if or when it will be released. It will allow editing, saving and restoring of Life documents, etc. Note this is *not* the Life screensaver that has already been released for AD, it is much nicer. Well, enough leaking. All the above was intended only to contribute to the discussion of Life algorithms, not as a press leak or anything. The point is, you can use logical operations to calculate Life, but you lose the (possibly important) information of how long a cell has been dead/alive. An important aspect of how fast a Life program is on the Mac is whether it uses Color SlowDraw to go to screen or whether it goes direct to screen. I believe LAZ-Life goes direct. Mine certainly does (when have I been known to use SlowDraw?? :-> ) But unfortunately, Life is just not a fast algorithm to implement. One final thing: LAZ-Life keeps track, I think, of an "active rectangle" which things are happening inside of, and only calculates inside that rectangle. So it lets you have a *very* large grid, and still goes fast unless you're actually using the whole grid. My Life doesn't do this, although I may implement this later...maybe not...it's a nice feature, though, for sure. But you get one glider going off to never-never land, and it stretches the whole active rectangle and slows the whole thing down. Maybe an "active region"...maybe that's what LAZ-Life does. I don't know. I'm blathering. Time to stop. Later... -Ben Haller (deadman@garnet.berkeley.edu)