Sarah Yoo

Voxel World

Built with: C++, OpenGL, OpenAL (for music and sound effects)

Git Repo

Demo

Features Overview

  • texture atlansing
  • back-face culling
  • spawning non-block geometries, such as grass
  • sorting transparent geometries
  • procedural terrain generation with simple noise
  • basic physics: falling and accelerating
  • AABB collision check
  • DDA raycasting
  • block placing and breaking
  • Implemetation of OpenAL for Sound Effects and Musics
  • Underwater effect and basic water animation

Introduction

Minecraft is my favourite childhood game, and my love for this game remains the same today. Its massive, dynamic world full of living creatures and unique game play fascinate me. So, I set out to create my own version of voxel world and learn the mechanics of my favourite game.

In this post, I explain how I built, optimized my voxel engine, and what I plan to update and improve in the future. I also explain how I implemented some game features, such as block placing and breaking.

However, this post is more like a documentation of what I've learned through the development of my voxel engine, rather than a simple overview of my side project. I expect this post to be long, and I recommend you to read the part you are interested in by clicking the content listed below:

Table of Contents

  1. How 3D Rendering Works
  2. The Secrete in Storing Many Textures
  3. Building a Basic Terrain System
  4. Optimizing Mesh: Rendering Only Visible Faces
  5. Procedurally Generating Terrain
  6. Boosting Performance with Back-Face Culling
  7. Structure Generation System
  8. Player and Blocks Collision Check
  9. DDA Raycasting and Block Interaction
  10. Future Improvements and Plans