How it works:
You create a new terrain with terrain_create(width, height); width/height would usually refer to the pixel resolution
You can remove parts of the terrain with terrain_unset_point, terrain_clear_circle, terrain_clear_rect, terrain_clear_line.
You can check for collisions with terrain_get_point, terrain_collision_circle, terrain_collision_rect, terrain_collision_line.
Features:
-Small memory foot print. Uses 1 bit for 1 point (pixel).
-Pretty fast.
-Make holes for rectangles, circles and lines.
-Check collisions with rectangles, circles and lines.
-Liero style example included.

EDIT: New update:
New scripts terrain_fill_rect, terrain_fill_circle, terrain_fill_line
You can also save the terrain to a file with terrain_save and load a terrain from a file with terrain_load
The example is also updated and has more features including a mini gun (ctrl to shoot. bullets destroy terrain). You can save the level by pressing F12 and load the level by pressing F11 (this will save both an image of the surface and the terrain file)
...and it's a .zip file instead of .rar
Edited by 39ster, 28 June 2009 - 09:54 AM.