Real terrain |
Top Previous Next |
This month I have decided to write the code for a real time terrain editor which allows you to edit a terrain by pushing or pulling any of its vertices. This means that you can easily create roads, valleys, hills, mountains, and so on in your terrain-based levels. Just take a look at the screenshots below to see what can be achieved in only a few minutes.
You will be happy to hear that the coordinates of the terrain are saved automatically at exit and loaded automatically as soon as you run the demo again. This means that you can keep the result of your work and actually use the modified terrains in your games, provided that you integrate the level loading code that comes with my demo in your projects.
To use the demo run the realterrain.wdl script, move the mouse over the terrain and then click or right click any area; you will see the closest vertex to the (red) target being moved upwards (right mouse button) or downwards (left mouse button).
You can use the "WSAD" keys to move the camera around and "Q" and "E" to increase or decrease its height. You can also move the mouse pointer towards one of the edges of the screen to make the camera scroll in that direction. Don't forget to check out the two different types of brushes, which can be turned on and off by clicking their pictures from the upper left corner.
If you ruin the terrain completely simply delete the level1.sav file from the demo folder and you can start playing with it again. Have fun!
|