I Made Minecraft in 24 Hours

Sam Hogan February 27, 2020
Video Thumbnail
Sam Hogan Logo

Sam Hogan

@samhogan

About

Making games i think

Latest Posts

No results found. Try different keywords.

Video Description

Can I make Minecraft in one day without the internet? So I was bored and decided to bust out the good ol' unity game engine and see how just hard it would be to create the classic blocky voxel sandbox game. To make it interesting and really test my skills, I wasn't allowed to access any external resources/tutorials/code. → Download for some reason: https://trickshotlabs.itch.io/minecraft-ripoff → Download the source: https://github.com/samhogan/Minecraft-Unity3D → Twitter: https://twitter.com/SamHGames -----MUSIC------ → "Funky Monkey" & "Out of Pentatonic Scale" by Antti Luode → "Mirrorball" & "Emotional Wilderness" by https://www.purple-planet.com/ → "Break Out" & "Blam" by DST - nosoapradio.us I started off with basic terrain generation, using cube gameobjects arranged in a grid, whose heights are varied by a perlin noise function. This, however, led to not great performance, but luckily I knew of a way to significantly optimize things. This was using terrain chunks - which is what the actual minecraft does as far as I can tell. This meant using voxel data to only build faces of blocks that are facing air blocks. And because the voxel data is 3D, it's possible to have much more interesting procedural terrain generation, like caves, overhangs, trees, etc. It's super fun to play around with the different noise functions and see what type of terrain is generated. I ended up doing some simple stuff which looks pretty good: A base layer of simplex noise at a large scale + another layer at a smaller scale that is multiplied by yet another layer for terrain variety. This is the height map. Then 3D simplex noise cuts pieces out to create cave systems. Procedurally generating trees and water were both a little tricky. For trees, I used a perlin noise value at each chunk coordinate to determine how many trees would be in each chunk. Then, a random number generator seeded with the chunk's coordinates was used to build the specific trees. This way, the exact same random numbers are produced each time for a specific chunk, and the same trees are generated. Water had to form around the terrain, so you don't have weird stuff like finding water when you did straight down. What I ended up doing was creating a separate mesh for the water. To build it up, just loop through each xz coordinate in the chunk, for each starting at the max y position and move down through the voxel data, checking if land exists. If the water level is reached before the first land block, build a square at the water level. There's some boring stuff cut out of the video, like optimization. I did things like add an object pool for reusing terrain chunks and add a timer to load chunks one at a time instead of all at once. The performance is still not great, which is mostly due to all the noise function calculations. This could probably be fixed with multithreading, but there's no way I could figure that out without internet help. I finished this project off when an inventory, a skybox, and some graphical improvements. The total elapsed time from start to finish was about 14 hours, and the total time I spent actually working on it was around 11 hours. This was minecraft in 24 hours with #Unity3D. ---- Other Minecraft Programming Challenges ---- → "Coding Minecraft in One Week - C++/OpenGL Programming Challenge" by Hopson - https://www.youtube.com/watch?v=Xq3isov6mZ8 → "Minecraft in Unity 3D [Flashing Images] - One-Week Programming Challenge" by Shane Beck - https://www.youtube.com/watch?v=qdwUkYrHosk&t=884s → "Coding Minecraft in ONE DAY (Timelapse) | Unity3D" by TechBox - https://www.youtube.com/watch?v=MAdtV4rqyN0 → "Creating Minecraft In 5 Days" - https://youtu.be/hJqIRYowfrQ hey notch can I get my piece of that minecraft $ ???

You May Also Like

Build Your Minecraft World

AI-recommended products based on this video

Loading...
acer Nitro V 15 Gaming Laptop, Intel i9-13900H Up to 5.4GHz, GeForce RTX 4060, 15.6" 144 Hz IPS Display, 64 GB DDR5, 4 TB SSD, Wi-Fi 6, Backlit Keyboard, Windows 11 Pro, Gaming Mouse, 256GB UFD

acer Nitro V 15 Gaming Laptop, Intel i9-13900H Up to 5.4GHz, GeForce RTX 4060, 15.6" 144 Hz IPS Display, 64 GB DDR5, 4 TB SSD, Wi-Fi 6, Backlit Keyboard, Windows 11 Pro, Gaming Mouse, 256GB UFD

(2,753)
$1,899.99
FREE delivery Tomorrow, Jun 12Arrives before Father's Day
Loading...
Funny Cute Mouse Pad with Wrist Rest, Dumpster on Fire Ergonomic Mouse Pads Wrist Support for Desk, Mousepad for Wireless Mouse Gaming Laptop Work Home Desk Accessories Office Supplies Decor

Funny Cute Mouse Pad with Wrist Rest, Dumpster on Fire Ergonomic Mouse Pads Wrist Support for Desk, Mousepad for Wireless Mouse Gaming Laptop Work Home Desk Accessories Office Supplies Decor

(1,045)
7.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
500+ bought in past month
Loading...
MSI Thin 15 Gaming Laptop, 15.6" 144 Hz IPS Display, AMD Ryzen 9 8945HS, NVIDIA RTX 4060 8GB GDDR6, 32 GB DDR5, 2 TB SSD, with Windows 11 Pro, Office Pro Lifetime License, Mouse, USB C Flash Drive

MSI Thin 15 Gaming Laptop, 15.6" 144 Hz IPS Display, AMD Ryzen 9 8945HS, NVIDIA RTX 4060 8GB GDDR6, 32 GB DDR5, 2 TB SSD, with Windows 11 Pro, Office Pro Lifetime License, Mouse, USB C Flash Drive

(2,122)
1,559.99
FREE delivery Wednesday, June 11.
Loading...
acer Predator Helios Neo 16 Gaming Laptop,16" WQXGA IPS 240Hz 500 nits Display, 14th Gen Intel i9-14900HX, GeForce RTX 4070, 64 GB DDR5, 4 TB SSD, Backlit KB, Win 11 Pro, with Designed Accessories

acer Predator Helios Neo 16 Gaming Laptop,16" WQXGA IPS 240Hz 500 nits Display, 14th Gen Intel i9-14900HX, GeForce RTX 4070, 64 GB DDR5, 4 TB SSD, Backlit KB, Win 11 Pro, with Designed Accessories

(49)
$2,499.99
FREE delivery Jun 17 - 20
Loading...
acer Predator Helios Neo 18 Gaming Laptop, Intel i7-14700HX, NVIDIA GeForce RTX 4070, 18" WQXGA 2560 x 1600 165Hz Display, 64GB DDR5, 4TB Gen 4 SSD, Backlit Keyboard, Windows 11 Pro & MS Office Pro

acer Predator Helios Neo 18 Gaming Laptop, Intel i7-14700HX, NVIDIA GeForce RTX 4070, 18" WQXGA 2560 x 1600 165Hz Display, 64GB DDR5, 4TB Gen 4 SSD, Backlit Keyboard, Windows 11 Pro & MS Office Pro

(34)
$2,499.99
FREE delivery Jun 17 - 20
Loading...
acer Predator Helios Neo 16 Gaming Laptop, GeForce RTX 4070, Intel i9-14900HX, 16" IPS 240Hz 500 nits Display, 64 GB DDR5 RAM, 4 TB SSD, Windows 11 Pro, Office Pro Lifetime License

acer Predator Helios Neo 16 Gaming Laptop, GeForce RTX 4070, Intel i9-14900HX, 16" IPS 240Hz 500 nits Display, 64 GB DDR5 RAM, 4 TB SSD, Windows 11 Pro, Office Pro Lifetime License

(3,551)
$2,499.99
FREE delivery Jun 17 - 20
Loading...
The Book of Sheen: A Memoir
Best Seller

The Book of Sheen: A Memoir

(247)
$0.00
Available instantly
Loading...
The Road of Bones: The Ashen Series, Book One

The Road of Bones: The Ashen Series, Book One

(8,568)
$1.99
Available instantly
Loading...
The Summer Guests: A Thriller (The Martini Club Book 2)
Best Seller

The Summer Guests: A Thriller (The Martini Club Book 2)

(21,756)
$0.00
Available instantly
Loading...
Babies Around the World Eating: A Fun Book about Diversity that Takes Tots on a Multicultural Trip to Discover Yummy Food Around the World

Babies Around the World Eating: A Fun Book about Diversity that Takes Tots on a Multicultural Trip to Discover Yummy Food Around the World

(2)
8.36
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
Loading...
Dr.Althea 345 Relief Cream | Moisturizer for Soothing Recovery and Blemish Care with PDRN & Niacinamide | Korean Vegan Skin Care for All Skin Types, 1.69 Fl Oz (Ver.2 - Pack of 1)

Dr.Althea 345 Relief Cream | Moisturizer for Soothing Recovery and Blemish Care with PDRN & Niacinamide | Korean Vegan Skin Care for All Skin Types, 1.69 Fl Oz (Ver.2 - Pack of 1)

(9,898)
$26.50
FREE delivery Wed, Dec 31 on $35 of items shipped by Amazon
80K+ bought in past month
Loading...
LIGHTAILING Light for Lego-75379 R2-D2 - Led Lighting Kit Compatible with Lego Building Blocks Model - NOT Included The Model Set

LIGHTAILING Light for Lego-75379 R2-D2 - Led Lighting Kit Compatible with Lego Building Blocks Model - NOT Included The Model Set

(27)
22.94
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35