Downwell, I think, generates an entire level each go. Not so much put a bunch of bricks here, or there, but more like choose a random pre made layout.
Basically you design a bunch of levels, and save (as json).
The built in save would work well for this.
Probably need the browser object as well to download the data.
You would make an editor, and game made out of the editor.