Life

Dan Ingalls Dan.Ingalls at disney.com
Wed Dec 1 18:02:19 UTC 1999


--============_-1268051155==_============
Content-Type: text/plain; charset="us-ascii"


>	Does anybody have an implementation of life for Squeak?
>
>	The point is: I've done one, using BitBlt, or Form, or Canvases or
>something like one of those (I don't remember which). The cells where
>directly pixels, and I used pixelValueAt: aPoint (I think) to access it.
>I tried this approach becouse I think that it'll faster to access, and
>ofcourse faster to draw on the screen... but it's still slow.
>	My intention is to make an infinite life field (without bounds).
>	So... does anybody have a fast implementation of this?

I don't know if this is what you want, but here's s port to Squeak of my BitBlt Life program that first appeared in the August 1981 isue of Byte magazine.

To run it, execute...
	    Display restoreAfter: [(Life new size: 400) run].
This will run noticeably faster if you set your display depth to 1.

It does a 400x400 generation in 43ms on my 250MHz G3.

Enjoy
	- Dan

--============_-1268051155==_============
Content-Type: text/plain; name="BBLife-di.cs"
 ; x-mac-type="54455854"
 ; x-mac-creator="522A6368"
Content-Disposition: attachment; filename="BBLife-di.cs"
Content-Transfer-Encoding: imap_stub

0,1882,2,2908,71,

--============_-1268051155==_============--





More information about the Squeak-dev mailing list