I Made Minecraft in 24 Hours

preview_player
Показать описание
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.

-----MUSIC------
→ "Funky Monkey" & "Out of Pentatonic Scale" by Antti Luode

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 ----

hey notch can I get my piece of that minecraft $ ???
Рекомендации по теме
Комментарии
Автор

"Mom can I buy minecraft?"
"No"
"Fine. I'll do it myself."

soulplexis
Автор

N... n... no Stack Overflow?
Watch out guys, he must be some kind of god.

EnergiaRocket
Автор

"Only looked up two things"
His search history:
"How to code"
"How to code a Minecraft knockoff"

nikolai
Автор

The graphic is so cool, i love how the dynamic shadow looks like

julakentitycraft
Автор

Love that the character is just casually a bean

kelpeee
Автор

This man made a better Minecraft than all those fake blocky games on Mobile.

NJAEpic
Автор

This is much better than all Minecraft clones flash games

mareksamuel
Автор

Everyone who makes an mc clone always has moon gravity and instant mining. I think these are pretty important to what makes mc, mc. It's enjoyable to navigate the world in mc. Very smooth

overratedprogrammer
Автор

Let's just talk about how amazing it is, that he did this within 24 hours. That's insanely impressive.

TheRealGuywithoutaMustache
Автор

" Rome wasn't built in a day "


This madlad:
" *but Minecraft was* "

GalaxyCat
Автор

2010: Making a Minecraft castle in 24 hours!

2020: Making Minecraft in 24 hours.

audaciousattempts
Автор

This is actually really fun, cool, and amusing to watch despite the fact that I failed every IT class I took (unless we were specifically programming)

xsalixartz
Автор

The no Stack Overflow thing is a bit evil, even pros don't code by themselves.

btarg
Автор

“Left click to place a block, and right click to remove one” bruh, that’s evil.

Whatismusic
Автор

Me: Only one day? That cant be so difficult
Sam: And no Stack
Me: He is to powerful to be kept alive

ZforZine
Автор

This is exactly how Minecraft would've started.

Casketkrusher_
Автор

When you can’t get Minecraft
“Fine. I’ll do it myself”

roaringthunder
Автор

Therapist: Dirt cave isn’t real, it can’t hurt you
Dirt cave:

nicolaphilbin
Автор

Sam: Did I forget anything
Viewers: No
Crafting: ...

zachary
Автор

Mom can I have minecraft
Mom: We have minecraft at home
MINECRAFT at home

seanssongs