Faster SVG Game of Life
I recently had the honor of having an image of my black and white Game of Life published in Architectural Design’s “Programming Cultures: Art and Architecture in the Age of Software.” Honestly, I’m not quite sure why I’m in there, but I was flattered nonetheless. I found the content quite interesting and I recommend that issue to you if you’re inspired by the possibilities of computer-generated architecture.
Liz and I moved back to Texas last week, so I had three days to ponder everything you can imagine as we drove through the Southwest in separate vehicles. (As an aside, it is amazingly beautiful from roughly Yuma to El Paso right now due to all the rain they’ve been getting. It’s a nice roadtrip this time of year.) Of course, I got to thinking about the Game of Life and an interesting article I read years ago about a very fast hardware approach to image convolutions. I’ve never been particularly happy with the speed of my SVG Life implementation, but, as is typical for many developers, I never really had the time to explore how to speed things up…until today. The good news is that with a minor tweak of my Bitmap object and an adaptation of the hardware technique, my implementation is about ten times faster. Even better, Opera and Firefox run about twice as fast as IE 6.
And here’s the old version for reference:
The code is still in a little bit of a rough state right now, but I’m happy with the results. I’m pretty sure I could squeeze out a bit more speed, but I guess that will have to wait for another weekend…and hopefully before the next roadtrip.
Enjoy!
October 3rd, 2006 at 1:11 pm
Hi Kev!
Really nice! From your post, don’t you think we (us SVG people), should start re-looking our view of Opera and Firefox. Your homepage still suggests ASV. It will be great if it could say Opera, since they are committed to a future with SVG.
Just another note. Have a look at http://www.emiasys.net/ (they are the guys doing Renesis) I downloaded version 0.2 and was pleasantly surprised. It’s only 1.2Meg and integrates lovely into MS (for those who still use it
Just note that Renesis supports SVG though oject tag or iframes and not with the embed tag.
Cheers,
Jacobus
October 3rd, 2006 at 3:55 pm
Hey Jacobus,
Yes, I think now is definitely the time to show your support for the work being done to bring SVG to various target platforms and user-agents. I haven’t had the time familiarize myself with all the options out there, but the little work I’ve done in Opera and Firefox is quite encouraging.
I’m sure some folks are disappointed to lose features they already have in ASV, but when I compare what ASV was like at 2.0 and what are options are now, I can tell you Opera and Firefox are coming along wonderfully. But, as with any software vendor, it’s our responsibility to let them know they are doing great work and to encourage them in areas where their implementations are weak. That’s the only way ASV got to where it was…um…two years ago.
I have been following the various incarnations of EmiaSys for years now. I plan to give their latest viewer a look soon, as time permits.
Thanks for your feedback!
-Kevin