Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Creating Life in an HTML5 Canvas

DZone's Guide to

Creating Life in an HTML5 Canvas

· Web Dev Zone ·
Free Resource

Bugsnag monitors application stability, so you can make data-driven decisions on whether you should be building new features, or fixing bugs. Learn more.


This is really cool; this guy going by the handle "mrkmg" wanted to teach himself HTML5, Canvas, and Webworkers, and what better way to do that than to write a virtual life simulator?

Called "ColorPond", this little life simulator generates pixels of different colors that behave in different ways. Resources are dark blue and purple, and "materials" are lighter blues. Producers are green--they consume resources and produce materials. Consumers are red, they eat the producers and the materials produced by them. So, basically, he's simulated plant life and animal life at a microscopic scale.

Click through to read his write up, and check out the code on GitHub (beware, the author himself says that ColorPond only really works on Chrome, I tested it on Firefox and it was indeed pretty slow and kind of glitchy).

Monitor application stability with Bugsnag to decide if your engineering team should be building new features on your roadmap or fixing bugs to stabilize your application.Try it free.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}