Henry Dai​ 
​Gameplay Programmer
  • Home
  • Professional Projects
    • Hero Academy 2
    • Orcs Must Die! Unchained
  • Individual Projects
    • Skeletal Animation System
    • Procedural City Generator
    • Town
    • Simple Miner
  • Team Projects
    • Gravitas
    • Cult
    • Avian Apocalypse
  • Résumé
  • About Me
 
×

Simple Miner


Picture
Overview
  • Tech: C++, OpenGL
  • Development Time : 8 weeks
  • Engine: Own C++ Engine
  • Features:
    • Seeded Terrain Generate
    • Data Save / Load
    • ​Vertex Lighting
    • Bow Arrow
    • Voxel Ray Trace
  • Github Link
  • Download Here
  • ↓ To Video ↓​

Goals

The goal of this project is to replicate the basic features of Minecraft. In this project, players modify and interact a generated world using blocks. The changes to the world are stored in real time and can be loaded back when needed. All of this is done while still maintaining 60 frames per second.
Picture

  Features

Perlin Noise Generated Terrain
This project uses Perlin Noise algorithm to generate a smooth, continuous terrain. Since Perlin Noise provides a non-repeating, and reproducible result, we can easily reproduce the same terrain by using the same initial parameters. The parameters can be stored and used as a seed to generate the same terrain later. 
Data Save / Load
Data Save / Load
To ensure that the ‘save and load’ functionality executes smoothly during gameplay without affecting the frame rate, the system has to prioritize the tasks based on distance from the player, and only handle one chunk of data per frame. Each chunk is stored in binary format, applying run-length encoding (RLE) compression technique. Since the characteristics of the order of blocks in a chunk create long series of blocks of the same type, RLE works well for compressing the chunks.
Vertex Lighting
Vertex Lighting
The lighting uses vertex color of each surface based on its light value. There are 16 light levels in this project. When a block is exposed to the sky, its light level will be equal to the current skylight level. The light level is reduced for the blocks that are not directly under skylight. These blocks have a light value one less than that of the brightest air block immediately next to it.  
Bow and Arrow
Bow and Arrow
Players can fire an arrow when they select the bow icon from UI. Holding down fire causes the arrow to fire further and faster. The arrow can eliminate the pumpkin lanterns and the floating pumpkins that randomly generate in each chunk. Fired arrows will remain where they land
Voxel Ray Tracing
Voxel Ray Tracing
Since this project take place in a voxel world, a fast ray trace algorithm can be used. This project adapts the algorithm explained in the paper - "A Fast Voxel Traversal Algorithm for Ray Tracing" by John Amanatides and Andrew Woo. The camera fires a ray trace every frame in the facing direction. This ray trace checks the edge of each block it passes through. When the next block is solid, an outline is drawn on the block to indicate that the player can interact with it.
Basic UI
Basic UI
The icons displayed on the UI depict the blocks and tools available to the player. The highlighted UI element determines the block that will be placed or tool that will used when the player uses right-mouse button. The scroll wheel is used to switch between the different icons on the HUD.
Code Snaps    [Github Link]
  • TheGame.hpp
  • TheGame.cpp
  • Chunk.hpp
  • Chunk.cpp
<
>
 

  Video Trailer


↑ To Top ↑
©2016   Home | Professional Projects | Individual Projects | Team Projects | Résumé | About Me
Home
About
Contact
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • Home
  • Professional Projects
    • Hero Academy 2
    • Orcs Must Die! Unchained
  • Individual Projects
    • Skeletal Animation System
    • Procedural City Generator
    • Town
    • Simple Miner
  • Team Projects
    • Gravitas
    • Cult
    • Avian Apocalypse
  • Résumé
  • About Me