Terrain Generation with Canvas and JavaScript
Somethinghitme.com has an oldie-but-goodie post from 2009 titled “Terrain Generation with Canvas and JavaScript” that talks a little bit about the algorithms used and links to a working 2d terrain generator (with a shadowmap generator as well). Worth a look if you’re working on generating procedural terrain.
(I came across the post via the game Make No Wonder, a cool exploration and resource management game by Matthew Hollett you should also check out)