8. Programming Topics

Introduction & Basic Snippets
This section covers the public API of Voxel Play – the API is a set of functions and events you can use to integrate your gamelogic into Voxel Play. The...
Thu, 21 Apr, 2022 at 11:51 AM
Methods
In Voxel Play you can disable or enable events using the env.captureEvents property. Disabling events is useful to avoid recursion if you call an API inside...
Thu, 16 Dec, 2021 at 7:38 PM
Events
The following events are exposed by VoxelPlayEnvironment class. Also check out the VoxelPlayPlayer class for additional player related events and methods. ...
Thu, 18 Nov, 2021 at 7:31 PM
Coding your own terrain generator
Although you can always use the OnChunkBeforeCreate and OnChunkAfterCreate events to supply or modify the chunk voxels (check Events section), Voxel Play al...
Tue, 5 Oct, 2021 at 8:31 PM
UI & Console API
The console is shown pressing F1: The console is useful to interact with the engine in many ways. Type /help to show a list of basic commands or /k...
Tue, 4 Dec, 2018 at 1:06 PM
Player API
The Player API implements the IVoxelPlayPlayer interface which provides a basic interface. If you wish to provide your own player component, you can impleme...
Mon, 10 May, 2021 at 5:45 PM
First Person Controller API
The following properties and methods are exposed by the Voxel Play First Person Controller component. You can access these methods through VoxelPlayFirs...
Sun, 27 Jun, 2021 at 7:36 PM
Chunk structure
All chunks in Voxel Play are represented by the VoxelChunk class. Make sure you have read the introduction of what's a chunk and understand the chu...
Mon, 21 Oct, 2019 at 9:38 AM
Voxel struct
The Voxel struct defines any voxel in Voxel Play inside a chunk. It's defined as a partial structure so additional fields can be declared in another fi...
Sun, 29 Aug, 2021 at 2:15 AM
Save-game file format
Current format 14: Game can be saved either by scripting or using the console command /save. The file format is binary. Chunk data is RLE compressed to...
Thu, 20 May, 2021 at 6:10 PM