How to Program Voxel Worlds Like Minecraft with C# in Unity

A comprehensive guide to blocky mesh building for procedurally-generated worlds updated for Unity 2020+.

3.85 (1712 reviews)
Udemy
platform
English
language
Game Development
category
instructor
How to Program Voxel Worlds Like Minecraft with C# in Unity
9,981
students
18.5 hours
content
Jul 2022
last update
$84.99
regular price

What you will learn

Build a cube-based geometric world like that generated in Minecraft.

Navigate and manipulate discrete values in 3d space.

Build and skin meshes from scratch using C#.

Save and Retrieve Serialised Data.

Build and manage a voxel data structure.

Why take this course?

All New Content Added for Unity 2020+

Did you know that there is not one single cube used in Minecraft? Have you ever looked at Minecraft and wondered, "How did they build it?" - a great thing to ponder, it is.  If you haven't and think that programming a whole bunch of cubes is child's play, then think again. On the surface Minecraft looks as though it would be a simple world to recreate in Unity. Start placing cubes around a scene and see how far you get before the frame-rate grinds to a mind-numbing halt.  So wonder and fret no longer, as this course reveals the secrets of programming and rendering procedurally-generated voxel worlds, like Minecraft, with C# in Unity.

In this course, Penny teaches all the invaluable skills you will require to build a blocky world from scratch using her internationally acclaimed teaching style and knowledge from over 30 years working with games and graphics.  But hold on tight as you'll be taken on a journey across the computer graphics realm as it is taught to post-graduate university students. Through detailed descriptions and hands-on workshops examining all you need to know about 3d data structures, building meshes from scratch, using noise algorithms to generate terrain features and caves, and texturing blocks you will be programming your own world in no time.

Learn how to program and work with:

  • voxels

  • custom built polygons and meshes

  • vertices and normals

  • UV mapping

  • texture atlases

  • parallel processing and the Unity Job System

  • Unity's MeshAPI for parallel mesh creation

  • Perlin noise

  • infinite terrain generation

  • loading and saving data

Contents and Overview

After getting a little experience in why it's such a bad idea to build a Minecraft type world using cubes, you'll start following along with Penny, exercise after exercise, toward the end of building your very own and unique blocky terrain.

You'll begin by dissecting a cube and examining its fundamental parts from vertices, to normals, to texture mapping.  Armed with this knowledge, you will then begin writing code that redefines the cube and makes it far more efficient to draw as a terrain component.  You'll then bring these pseudo-cubes together to form chunks, to optimise rendering performance. Once you've worked on creating a solid world of chunks you will then learn about smooth noise and a little fractal geometry will be introduced to assist you in carving out realistic landscape features including caves.

With terra-firma to stand on, you'll next add a player character and start exploring the new world.  To prevent you falling off, you will also start working on the logic to build the world around you in real-time, out to infinite boundaries.

When you are done with exploring, it will be time to start digging and building.  It's in this part that you will learn how to add and remove blocks at the click of a button to further mould the terrain to your liking. 

Finally, you'll cover the dynamics of adding flowing water, falling sand and start working on the logic for creating your very own biomes.

What students are saying about this course:

  • Hi! I wanted to thank you and compliment you for the Minecraft Unity course. I've been a (web) programmer for 20 years. After so long creating somewhat boring work I'm excited to make games. My interest is in creating procedurally generated, complex worlds. Learning about Minecraft, therefore, seemed like a good idea.

  • Love the amount of detail Penny goes into! Not too little, not too much, she manages to hit the sweet spot that gets you a deep understanding of what's going on, coupled with the ability to jump in with confidence and start doing things yourself. VERY pleased with my course purchase, and look forward to more by her!

  • Clear, concise, introduction and extension of concepts required to efficiently generate Minecraft style worlds, including Perlin noise and fractal Brownian motion.

Screenshots

How to Program Voxel Worlds Like Minecraft with C# in Unity - Screenshot_01How to Program Voxel Worlds Like Minecraft with C# in Unity - Screenshot_02How to Program Voxel Worlds Like Minecraft with C# in Unity - Screenshot_03How to Program Voxel Worlds Like Minecraft with C# in Unity - Screenshot_04

Reviews

Dawid
December 30, 2023
The performance is just terrible, to much information is omitted and instead you are forced to copy the code.... I'm disappointed the I can't refund the curse anymore
Jonathon
September 3, 2023
So I hit this mid way through the course without saying anything so Im going to add that this course starts off very strong, Learning alot of how voxel generation works. Mid way through the course We kind of go off the deep end with code but with extra time and effort I did figure out what was happening, the ending feels a little underwhelming for the tree generation is cut off because consistency over chunks, and there are some optimizations that can happen but, I have enough knowledge to figure some of this out on my own. Overall a good strong course. Would love to see some more of the end content filled in.
Dave
July 10, 2023
Enjoyed the course. I liked that it's been updated using a more recent Unity version, with newer functionality to improve performance of the world building. A few lessons, I needed some help from the Q&A sections - things that weren't addressed in the video, or optimizations (or another way to do something being done in the video). But overall, the explanations were clear, and I learned a lot of new things about generating voxel worlds. Not enough in the course to create a full game, but it's a good starting point.
João
June 13, 2023
Realmente é muito bom, ela ensina bem sobre o conceito da geração de mundo procedural e também na genialidade por trás do Minecraft.
Jelly
May 27, 2023
I love the course! For the positives: It has been easy to follow, lots of great concepts and it is everything that was promised. For the negatives: There is so much repeated code! Part of learning programming is if you have to repeat a line of code, it is time to refactor. Especially with the uvBlock array. Creating a simple function to calculate the uv sprites by position in the sprite sheet would be a lot easier for a beginner to understand than that beast of a multi dimensional array. Especially if you were to change your sprite sheet with different dimensions. Although there is value in leaving some of the refactoring to the student after the course is done, there are some things that end up being a potential buggy nightmare. Addressing it earlier in the course might also be good, if some parts are specifically not refactored due to potential performance issues. This is another great course from Penny (I also took the amazing Shader course) but would like to see cleaner code, not just to get it done.
Torrey
February 18, 2023
Not for beginners. She is just showing what she knows, but going way too fast for new people to follow along without pausing or rewinding every 15 seconds. She seems nice, but this isn't geared for an introductory level.
Christopher
November 10, 2022
So far so good. She types a lot faster than me but the information is sound and the pause button is a good constant.
Dirk
October 30, 2022
I write the program code during the course so that I can internalize it all a little better. The course is presented a bit too fast for that. But I think the content of the course is very good. The voice is calm and easy to understand. I'm only in Section 6 but looking forward to all the rest.
Mehmet
October 24, 2022
You use job system and then say, "if you are new to this, you can go ahead and read the documentation." what is the point of the course if you're not gonna explain what you do and why you do?
uPa
October 4, 2022
En el momento de empezar a crear chunks se dan por conocidos conceptos muy avanzados y se pasan completamente por alto sin detenerse a explicar nada.
José
September 13, 2022
This is a FIVE STARS course, very recommended. You can learn a lot of interesting topics. The instructor KNOWS how to teach. ALTHOUGH, it is not perfect: the code needs to much "clean code" (lots of copy-paste, lots of publics variables, to much responsibility for one class, etc).
Michael
August 5, 2022
I may revisit this later, but I was hoping for more in depth explanations regarding the coding section for the intermediate topics of dictionaries and such, rather than just skipping over all of it. Those advanced enough to understand all of the code concepts probably already know how to do it in a better way. The lack of a large section regarding optimization seems like a pretty big miss, considering her cheer regarding the number of people that have paid for the course in my opinion. I still gave two stars because there is a large amount of well structured information to be found here.
André
July 15, 2022
The explanations are very good and slow enough for me in the beginning of the course. More I can´t say, because I am watching the first lectures. I hope it stays like it is in the moment.
Tomas
June 9, 2022
Amazing course! It has so many bonus features I did not expect and everything is very well explained! Creating the course must have taken crazy amount of time. Totally recommended :)
Bernd
September 25, 2021
I write this review after having completed the full course. The good parts: Penny has a great voice and is easy to understand for a non-native speaker. I really liked listening to her explaining the content of this course. It really motivated me to come back to this course and work on it every day. I really appreciate that Penny took the time to update the course for using the C# Job System plus Burst Compiler to get a performance boost. This serves as a good entry into how to to create and manipulate meshes within the new Unity Dots tech stack. Especially since the official documentation is a bit lacking. It shows how committed she is to provide high quality educational content. Penny gives the learner little challenges for applying the learned material on his own, before showing how it's done. I really appreciated this "interactive" approach. Just following someone writing code in read-only mode can be quite boring. The not so good parts: Sometimes there is too much speaking the code out loud while it's written. There is not so much value in this, when I can see the written code. While on the other hand some more detailed explanation here and there could have been added. But usually links to more in-depth resources are provided. Some of the code is written a bit sloppy, poor naming of variables for example. I am aware this is not a course on writing clean and elegant code but in the end you have a running example which is quite messy. I would definitely recommend some refactoring before using the code as a base for more explorations into Voxel Worlds. Overall I really enjoyed this course and learned some valuable new Unity skills.

Charts

Price

How to Program Voxel Worlds Like Minecraft with C# in Unity - Price chart

Rating

How to Program Voxel Worlds Like Minecraft with C# in Unity - Ratings chart

Enrollment distribution

How to Program Voxel Worlds Like Minecraft with C# in Unity - Distribution chart

Related Topics

1305343
udemy ID
7/27/2017
course created date
11/17/2019
course indexed date
Bot
course submited by