Path: utzoo!attcan!uunet!snorkelwacker!apple!portal!cup.portal.com!ts From: ts@cup.portal.com (Tim W Smith) Newsgroups: comp.sys.mac.games Subject: Re: anywhere I can get a good LIFE program? Message-ID: <34516@cup.portal.com> Date: 4 Oct 90 00:51:15 GMT References: <1990Oct3.181911.16439@agate.berkeley.edu> Organization: The Portal System (TM) Lines: 23 There are two kinds of fast life programs. The first kind tries to be fast on a fixed size array. The other kind tries to be fast on a very large unspecified array (i.e., it only keeps track of live cells). What's the fastest anyone has seen for the second class? I've done it in O(N log N), where N is the number of live cells, but I'm told that it can be done in O(N). If anyone wants to write a life program, I can post some code that does does the "fixed array via logical operations" method. It is implemented for clarity rather than efficiency (although the bit manipulation is done in assembly), so you will want to tweak it, but it is a good starting point. On a Mac II, it can do about 350,000 to 400,000 cells per second. This might be an example of where graphics that use separate bit planes for each bit of a colored pixel (e.g. the Amiga?) would be nice. By computing each new generation into a new bit plane, you would not have to lose history information if you wanted to color code cells. Tim Smith