Skip to content

jason-wilmans/XenkoVoxelExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Endless Voxel Terrain Example

This is a small example illustrating the basics of an endless terrain generation in the Xenko Game Engine. It has been made as concise as possible, to transport the basic idea.

It is based on the ThirdPerson template. It has mainly two parts: The visible voxel management in the WorldGenerator class and the terrain generation in the TerrainGenerator class.

Especially the terrain generation is nothing more than a simple placeholder for an adequate logic. But it illustrates the concept of a generator function, which returns a height for a given space in the voxel grid. Here it is a mixture of overlapping sine and cosine waves with different wavelengths and amplitudes.

Its output is used in the WorldGenerator component. It tracks the player's position and inserts and removes single voxels, so that they are only displayed, when they are in a square zone around the player.

Feel free to experiment with the code and have fun with it! :)

About

A minimum example of endless voxel terrain generation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages