Posted on Dec 30, 2018
I worked with Jake Lem and Thy Tran to apply the knowledge that we have learned in Computer Graphics course to create our personal take on the classic Minecraft game. Major concepts include GPU-CPU communication (vbos) with OpenGL, C++ code organization and optimization, game engine and game design. We used Git to manage and share our code.
Our theme is Japanese painting, so we went for a ink color scheme with bamboo trees. My roles in the project were creating the terrain with Fractal Brownian Motion noise algorithm. I also worked on multithreading for quicker terrain expansion, player swimming motion, sound effect, and setting up the pipeline for post-process effect like the Worley Noise water shader.
For removing blocks, I just marched along the look vector of the ray from the camera point and if at any point there's a non-empty block (I used floor to find the bottom left corner coordinates), then I just set it to empty. Similarly for adding block, I also casted a ray, but this time I had to check for face intersections since simple checking if box is empty does not tell me where I need to place the new block.
I implemented an OpenGL shader first to test my FBM. At first I had a lot of difficulty trying to get it to be smooth and not as noisy, but all it took as dividing by a large number before inputting into the noise function. I also added cosine interpolation for smoother result instead of using mix.