Cube Game

c# unity game


I worked with Unity for about a week to create a Cube World-inspired terrain generator, character controller, and building system. I became acquainted with Unity, its architecture, shader programming, mesh optimization, and more with this project.

A sample game screenshot

It features infinite terrain, chunking, mesh optimization, cloud generation, a custom character controller, a building system, structure generation, and terrain that looks surprisingly like basic Cube World terrain. The motivation for this project was to create something even slightly similar to Cube World's beautiful terrain, which I personally consider to be the golden standard for voxel terrain.


In about a day, I threw together a basic chunked terrain generator and mesh optimizer.

Early chunked terrain generation

Early mesh optimization

As you can see, only voxel faces that face air have their faces rendered. The following is a demonstration of chunks being generated and optimized in real-time.

After, I worked on a basic infinite terrain generator using primarily Fractal Brownian Motion with basic coloring.

I spent a few days working on structure generation and terrain generation to match that of Cube World. It took a while to figure out how some shapes were generated, and how color blending works on grass, but for the terrain components I have, I think it is relatively similar to Cube World. Below is a screenshot of building in action.


I decided not to take this project any further. I would love to eventually turn it into a real game, but for now, I think it is best left as a fun experiment and tech demo.