Implementing terrain collision shapes
We've already learned about setting up collisions for tilesets and actors, but there is a third type of collision that we can use in the design of our games.
Terrain collision areas enable us to set up arbitrary areas within our scene that actors can collide with. This feature can be helpful if there are large areas of tiles that do not have collisions defined, but it is also very useful when a scene has not been designed using tiles; for example, a background may consist of a single artistic image onto which collision areas can be placed using the terrain feature.
Let's implement a practical example, so we can see how it works.
Currently, our monkey can run all the way to the edges of the scene, and when it gets there, it just bumps against nothing but the imaginary edge of the scene. Rather than modify the tiles' collision shapes in the Tileset Editor, we're going to draw custom terrain shapes over the green pillars that we placed at the extreme ends...