Uniblocks Voxel Terrain, a cube-based infinite voxel terrain engine.
Asset store link | Video demonstration
Screenshots:
Features:
- Infinite procedurally generated terrain
- Fast realtime loading and saving of terrain, efficient terrain storage on disk
- Multiplayer features: streaming terrain data from server, synchronizing voxel changes
- Support for custom non-cube voxel meshes
- Fully compatible with Unity’s built-in physics engine, including standard colliders, raycasting, etc.
- Fully compatible with Unity’s built in lighting, including dynamic shadows and custom shaders
- Easy scripting using the event system (OnMouseDown, OnBlockPlace, etc)
- Clean, simple and well-documented code (all C#)
- A Block Editor window for easily adding and editing blocks
- Example code demonstrating some common gameplay implementations and terrain generation
Infinite, procedurally generated terrain
The terrain is generated procedurally at runtime. The engine comes with a simple perlin noise based terrain generator algorithm, which you can expand/modify or swap out for a custom one. Multiple worlds can be stored on disk.
Fast performance
Uniblocks supports modifying blocks at runtime with no lag, as well as fast streaming of terrain data from disk at runtime.
Multiplayer
Built-in multiplayer functionality allows you to stream voxel data from a master server and synchronize voxel changes between players. The multiplayer solution uses the standard Unity networking and comes with in-depth documentation, making it easy to modify or port to a third-party networking solution as needed.
Custom meshes
Up to 65535 block types are supported. A block can use either the standard cube shape, or a custom mesh of any shape and
size, as well as different collider types (cube/custom mesh/trigger).
Easy scripting
The engine comes with a game-ready block scripting system. Simply attach a custom script component to a block type, override an event function (exactly as you would with the standard Unity functions such as OnTriggerEnter, OnMouseDown, etc), and execute custom code within that function. Uniblocks comes with events capturing camera look, mouse clicks, mouseovers, collisions, as well as placing and destroying blocks, and you can add your own events easily.
Various basic functions for converting between voxels and world position, voxel raycasts, etc, are also provided.
Clean, simple code
The source code is fully accessible and easy to modify. All code is heavily commented, and the individual parts of the engine are neatly organized into separate modules. An in-depth user manual and scripting reference are also provided.
Universal
Uniblocks is designed to be compatible with many different types of games. The events scripting system allows you to easily implement different gameplay features, and some example gameplay features are provided. Lots of performance options allow you to accommodate a wide range of systems.
Demo
Web Demo (note: WebPlayer performance can be significantly slower than a standalone build)
Standalone Demo (better performance, save/load enabled)
(controls: wasd+space = move, left click = destroy block, right click = place block, 1-9 = switch active block)
[Android Demo](Dropbox Android Demo.apk)
(controls: drag bottom left of the screen to move, drag bottom right to look around, tap the screen to break blocks, double tap to jump)
Documentation
https://www.dropbox.com/s/p9nfjw4dalq8v66/Uniblocks 1.4 Documentation.zip?dl=0
Warning
Anti-aliasing not supported with forward rendering path. Water not included.
Please feel free to post any questions here, or contact me at rawlionworkshop@mail.com