This is an extension of the Isosurface Demo @pspeed wrote a few years back. This demo allows you to edit the terrain directly using brushes of various shapes, save the chunks and change the materials.
It is currently a WIP. I intend to use this in a game I am developing, and will commit any changes/fixes necessary in order to make it a “fully working” demo.
You may do with it as you wish. I care not.
- When using brushes to add terrain, negative sides of the shape are displaying the incorrect material.
- When using brushes to remove terrain, positive sides are showing the material selected.
- Provide a better way of saving chunks than just serializing the density array to persist the materials.
- Add collision support.
- TAB - Enable / Disable Cursor (to use the GUI)
- WASD - Move Camera
- Q / Z - Elevate / Lower Camera
- LMB - Place Terrain
- RMB - Remove Terrain
To enable chunk saving, change the following boolean in Main.class
public static boolean SAVE_CHUNKS = false;
If you want to reduce the render distance, edit the corresponding field in:
com.jayfella.terrain.config.VideoConfig // ... this.renderDistance = 10;
If you change the seed in
Main.class and have chunk saving on - don’t forget to delete the savegames directory.