17 April 2006

Software: SVG Conway's Game of Life

Between driving 2 * 650 km, amusing the kids and visiting my in-laws over the Easter break, I managed to put together an SVG version of John Conway's Game of Life. The interesting bits are:

  • Using SVG lines to create a raster by twiddling the lines' stroke-dasharray attribute.
  • Making the demonstration work for Firefox and Opera 9 was straightfoward, but I had no idea how to make it work for MSIE + ASV because MSIE does not support the DOM function createElementNS().
  • The demonstration ran like a dog until I spent some time optimzing the Javascript code. It's still not blazing fast but I can't think of any more tricks.

I picked up the stroke-dasharray tip from Kevin Lindsey and Martin Honnen showed me how to use ASV's SVGDocument properly. See the Yahoo! svg-developers mailing list for the discussion.