top of page

Simple Miner

Project Overview

Procedual Generation

Procedural map generation based on Perlin Noise, featuring grasslands, dirt, beaches, snowfields, rivers, oceans, and various vegetation according to different kinds of terrain,

Pocedual Generation

Code of Procedual Generation for Each Chunk

Hidden Surface Removal

Maintains around 600 FPS even with 100 million blocks by culling 99% of faces using backface culling to optimize performance. For each block, I only put verts in vertex buffer when the neighbor block is air.

Hidden Surface Removal

Code of Hidden Surface Removal for Each Block

Voxel Based Light

Every time when the player place a chunk, the block will use block iterator to check all the nearby blocks (16x16), and rebuild the chunk with light attenuation (16 initial intensity, -1 when iterate each block), and set the brightness in shader according to the light intensity.

Place GlowStone to the World

Voxel Light propagation

Process Light When Chunk is Dirty (Place/Remove Blocks)

Place / Dig Block

I used super fast raycast vs 3D block, and based on that, to improve the performance, I also used block iterator to acceleration the intersection process.

Place Block to the World

Code of Block Iterator Class

Raycast by using Block Iterator

Map Streaming

I used multithread to load only one chunk (32768) blocks every frame according to the players world position, and deactivate the chunk out of the max radius of the player.

I also used distance fog to cover the loading of new chunks.

Map Streaming and Fog

Code for Map Streaming

Screenshots

  • LinkedIn
  • YouTube

© 2025 by Jiabin Portfolio. All rights reserved.

bottom of page