Why Minecraft is a Technical Feat | Explaining the Engineering Behind an Indie Icon

공유
소스 코드
  • 게시일 2024. 04. 17.
  • Join the Discord: / discord
    Have you ever wondered how Minecraft works? It looks like such a simple game, but anyone who has tried to reproduce it, as I have, quickly realizes that this is anything but a simple game. In this video I take a brief look at some of the many technical issues that this game had to overcome in order to become a worldwide hit. I go through various points including: mesh generation, cave generation, biome generation, light calculations and more.
    I hope this video informs you a little bit more on why Minecraft is not a simple game, but actually a fully featured engine with many moving components.
    ---------------------------------------------------------------------
    Sources:
    Dwarf Fortress Gameplay: archive.org/details/Dwarf_For...
    Old Biome Generation: minecraft.gamepedia.com/index...
    Perlin Noise: en.wikipedia.org/wiki/Perlin_...
    Perlin Worms Info: libnoise.sourceforge.net/examp...
    Perlin Worms Video: • Perlin Worm
    Map at the end of video: www.planetminecraft.com/projec...
    Lighting: minecraft.gamepedia.com/Light
    Mesh Generation: 0fps.net/2012/06/30/meshing-i...
    ---------------------------------------------------------------------
    Website: ambrosiogabe.github.io/
    Github: github.com/ambrosiogabe
  • 노하우/스타일

댓글 • 2.8K

  • @GamesWithGabe
    @GamesWithGabe  2 년 전 +2784

    To those of you who are about to comment about the horrible audio balance. Yes, I already know it's messed up. Thank you for the feedback and now you don't have to comment haha.

    • @nothingisreal6816
      @nothingisreal6816 2 년 전 +26

      Top notch (no pun intended) video :)

    • @circledsquare2770
      @circledsquare2770 2 년 전 +6

      lol, looks like youtube decided to recommend your video to the masses recently

    • @macreator9497
      @macreator9497 2 년 전 +4

      I wanted to use the horrible audio balance to get track name hehe

    • @nothingisreal6816
      @nothingisreal6816 2 년 전

      @@macreator9497 Which one?

    • @Paulkjoss
      @Paulkjoss 2 년 전 +31

      You should reupload or upload another version coz you’ve been recommended and this looks interesting but its kinda unwatchable - jth 👍

  • @The_Horizon
    @The_Horizon 2 년 전 +15606

    this gives me even more respect to the people who built the simulation we live in

  • @The_Horizon
    @The_Horizon 2 년 전 +13108

    On top of that, the game is made in java, which really isn't meant for preformance-optimized video games

    • @altaykarabukaev3736
      @altaykarabukaev3736 2 년 전 +573

      another comment from the same verified youtuber

    • @Assassin_Droid
      @Assassin_Droid 2 년 전 +217

      Rip performance

    • @Assassin_Droid
      @Assassin_Droid 2 년 전 +61

      By the way, when new video?

    • @seal4080
      @seal4080 2 년 전 +9

      @@Assassin_Droid ^^

    • @nighteule
      @nighteule 2 년 전 +407

      Yep, especially back when Minecraft was being developed. Java's performance has improved over the years though, to the point where it can match or even exceed native performance in some workloads

  • @DrUrlf
    @DrUrlf 2 년 전 +2194

    Although I prefer the new lighting system I kind of miss the old sunset, when you saw the light levels updating like a wave that swept across the world. Had something menacing and made you hurry up as night was about to come.

    • @unrealgaming528
      @unrealgaming528 2 년 전 +215

      Whenever I see the old lighting system I always think of old minecraft PE and how terrifying it was to be outside when it was getting nighttime

    • @Ben.N
      @Ben.N 2 년 전 +36

      With I still had my old PE world 😔

    • @michaeltagor4238
      @michaeltagor4238 2 년 전 +48

      @@unrealgaming528 I never touch survival in minecraft PE cus it's THAT scary even in creative when you see the night coming

    • @LARAUJO_0
      @LARAUJO_0 2 년 전 +20

      I think that still happens if you turn off smooth lighting in the settings

    • @mysticmechanic141
      @mysticmechanic141 2 년 전 +26

      You just unlocked a very old memory in me! i remember back in like 2011-2012 playing on PE version actually being able to see the area getting darker as night came, and back then nights were dark! ohh good memories

  • @Sk1erDev
    @Sk1erDev 2 년 전 +4713

    As a full time Minecraft modder, the game is astonishing

    • @Nugcon
      @Nugcon 2 년 전 +19

      Skier be pogging tho

    • @daniyil4843
      @daniyil4843 2 년 전 +25

      How can I become a full time modder

    • @Falaxuper
      @Falaxuper 2 년 전 +186

      'full time modder' LOL what an amazing world we live in

    • @XanTheDragon
      @XanTheDragon 2 년 전 +58

      Agreed. Having to deal with the code yourself really gives you that look into how intricate some of the bits and pieces are. World generation still stumps me to this day, and it's a core component of my own mod.

    • @drumboarder1
      @drumboarder1 2 년 전 +26

      The hell is a full time modder

  • @habibishapur
    @habibishapur 2 년 전 +5544

    As a programmer, I feel like this is a great video to explain to non programmers what coding really is. While its easy to get bogged down in the details of a programming language, It's so difficult to illustrate the overarching feeling of how a programmer must approach a problem. This video does that in a very illustrative way.

    • @seizera7586
      @seizera7586 2 년 전 +92

      And being made on java and as a Java developer its so much more of a feat

    • @noxmore
      @noxmore 2 년 전 +6

      True.

    • @botondnovoth1027
      @botondnovoth1027 2 년 전 +26

      Well, there is that fact that if you didn't create a copy of Minecraft you are not really a programmer...

    • @etodemerzel2627
      @etodemerzel2627 2 년 전 +3

      @@botondnovoth1027 That's a great idea.

    • @marsimplodation
      @marsimplodation 2 년 전 +7

      that's exactly what I thought. I could kinda predict the points he was about to make and still I have no Idea how to actually solve these problems, mostly because I never tried haha

  • @cucginel1941
    @cucginel1941 2 년 전 +1147

    when i was little i was amazed and convinced that notch himself built every single minecraft world by hand

    • @AbdusSalam-ll1yp
      @AbdusSalam-ll1yp 년 전 +73

      Did you look up to notch as a god? 😂

    • @yyhhttcccyyhhttccc6694
      @yyhhttcccyyhhttccc6694 년 전 +55

      abdus you mortal cant even imagine notches power...

    • @hiimapop7755
      @hiimapop7755 년 전 +36

      @@AbdusSalam-ll1yp Considering how a portion of the young playerbase early on thought of Notch as God in minecraft, I wouldnt be surprised if that was the case.

    • @ooooggll
      @ooooggll 년 전 +45

      As a kid I knew that movies were essentially a set of images people had to make. I thought it was pretty crazy that for Minecraft someone had to "draw" each and every picture that could ever be shown on your screen at once. For every world, every position, camera angle, every block you could've placed. Then they would've had to figure out which image to show next depending on which buttons you pressed. Then I learned how programming works

    • @quantdev
      @quantdev 년 전 +7

      @@ooooggll Lol thats exactly what i thought as a kid

  • @beernutsonline
    @beernutsonline 2 년 전 +455

    I'm 54 years old, but god, I still love Minecraft! Starting a crisp world in an old version is pure joy!

    • @codediporpal
      @codediporpal 년 전 +9

      Ha. Same age. Currently in a minecraft binge. Seems to happen every few years.

    • @enkaphalin1111
      @enkaphalin1111 년 전 +1

      Ah, minecraft. I wonder where it will be when i go into my late thirties
      Started back when you could play the alpha build on your browser. Been 10 years since

    • @godw1ll99
      @godw1ll99 년 전

      @@codediporpal same, currently binging all the mods 6. last binge was baconetwork where i took over the whole server..., before that tekkit remastered 1.12 i think and before that tekkit 1.7 i think. crazy how far the game has come and yet i still feel like there is so much more to go. sure ive played plenty of other packs in between but i wouldnt consider them binges.

    • @godw1ll99
      @godw1ll99 년 전

      @@LeReubzRic good enough. ryzen 7 3800x with 6800xt.

    • @godw1ll99
      @godw1ll99 년 전

      @@LeReubzRic the crazy thing is my other pc with a gtx 950 and an fx8350 gets almost the same performance. amd gpus are severely unoptimized fore minecraft.

  • @Cyclically
    @Cyclically 2 년 전 +685

    One correction I want to say about the video, since I've worked with and researched voxel terrain generation before (specifically, an optimized implementation of opensimplex noise). The method you described in the video is a very basic 2D perlin noise heightmap which was used by the earliest versions of Minecraft, except... the method in which they use those 2D noise heightmaps is a little bit different.
    More specifically, stacking layers of noise at different scales to create more variability in the terrain.
    By having multiple 2D noise heightmaps to set the shape of the world. One for overall elevation, one for terrain roughness, and one for local detail. For each column of blocks, the height was (elevation + (roughness * detail)) * 64 + 64. Both elevation and roughness were smooth, large scale noises, and detail was a more intricate one.
    Basically, with different layers of noise, you can do things like adding noise at different scales for roughness, or multiplying noise to get sharper terrain. This method had the great advantage of being very fast as there’s just 16*16*(noiseNum) samples per chunk to generate, but the disadvantage of being rather dull. Specifically, there’s no way for this method to generate overhangs, cliffs or canyons.
    So Notch switched the system over into a similar one based off 3D noise. Instead of sampling the “ground height”, he treated the noise value as the “density”, where anything lower than 0 would be air, and anything higher than or equal to 0 would be ground. To make sure the bottom layer is solid and the top isn’t, he just added the height (offset by the water level) to the sampled result. This produces a terrain with overhangs, cliffs and canyons, by only creating a cube if the point sampled is above a certain threshold.
    Another note I'd like to add is that Perlin noise had major issues where it produces artifacts along directions of the geometry. More specifically, it tends to align all of its features to the cardinal axes and to the diagonals, which was also something I could notice myself when I was messing around with it. So Ken Perlin addressed all the issues it had and made a newer and enhanced version called "Simplex noise". The word simplex refers to the generalization of a triangle to arbitrary dimensions. To put it simply, in 5:53 as an example, instead of an n-dimensional grid (as said in the video), it uses a grid of triangles instead. It is basically being faster to compute, scales up as needed (x or x,y or x,y,z etc.) and doesn't produce the visual artifacts.
    Now one disadvantage of Simplex noise is that it is patented (basically no one can use it without Ken Perlin's consent). This is where OpenSimplex noise comes into play, which is different in it’s implementation from Simplex noise as to not infringe on the patent, whereas simplex noise starts with a hypercubic honeycomb and squashes it down the main diagonal in order to form its grid structure, opensimplex noise instead swaps the skew and inverse-skew factors and uses a stretched hypercubic honeycomb. The stretched hypercubic honeycomb becomes a simplectic honeycomb after subdivision. This means that 2D simplex and 2D opensimplex both use different orientations of the triangular tiling, but whereas 3D simplex uses the tetragonal disphenoid honeycomb, 3D opensimplex uses the tetrahedral-octahedral honeycomb. OpenSimplex noise also uses a larger kernel size than simplex noise. The result is a smoother appearance at the cost of performance, as additional vertices need to be determined and factored into each evaluation.
    UPDATE: It’s been 8 months since I left this comment, and I’ve been itching to say that it isn’t just a single correction I wanted to point out, but some of the concepts (mostly the technical aspects of the terrain generation) explained in the video is either too simplified that it’s become inaccurate or it wasn’t even correct in the first place. And every technical aspect of the game that he wanted to bring out is common knowledge for game developers (Such as culling: 3:41) that there isn’t a single thing pointed out here that makes Minecraft a technical feat. I’m surprised by how these “full-time programmer coder hacker crackhead minecraft modder with 99 years of experience and has been developing their own terrain generation for centuries” can’t even notice a single thing wrong over how simplified this is, such as the noise terrain generation part - which was a topic I researched and worked on for fun in only a week, back in 2019. Not trying to downplay anyone or anything; this is a nice and informative video but I just wanted to get this out of the way.

    • @crazydoomy
      @crazydoomy 2 년 전 +12

      neko noise

    • @themalaysiandude3903
      @themalaysiandude3903 2 년 전 +8

      never heard of simpex thanks for the info the guy i totally not met in roblox 2 years ago

    • @happysmash27
      @happysmash27 2 년 전 +45

      Ah, but good news: Simplex noise was invented in 2001. Patents last for 20 years from filing date. And, according to Wikipedia:
      > Uses of implementations in 3D and higher for textured image synthesis were covered by U.S. Patent 6,867,776, if the algorithm were implemented using the specific techniques described in any of the patent claims, which expired on January 8, 2022.
      So the patent for Simplex noise actually expired just a couple months ago, in fact only a couple weeks from when you posted your comment!

    • @_veikkomies
      @_veikkomies 년 전 +2

      "where anything over than 0 would be air, and anything higher than or equal to 0 would be ground". So everything over zero is both ground and air? And zero is ground? What did you mean by that sentence?

    • @Cyclically
      @Cyclically 년 전 +9

      @@_veikkomies I meant anything lower than 0, it’s just an error. I edited the comment.

  • @bluesillybeard
    @bluesillybeard 2 년 전 +2144

    This is why my attempt at re-creating Minecraft has taken more than a year thus far, and I've barely got much of anything.
    I have basic rendering, and basic world generation, and that's it. 1.5 years of consistent work, and barely anything to show for it.
    A lot of people say notch wasn't a great programmer - and that's true about his organization (how the code is organized and how readable it is), but when it comes to the problem solving and creative part of it, he's pretty good.

    • @rainessandrai8240
      @rainessandrai8240 2 년 전 +73

      Are you sure about readable code? I saw comments about modding beta and people saying "don't even try it, code with newer versions"

    • @bluesillybeard
      @bluesillybeard 2 년 전 +245

      Yeah, his code wasn't great. His concepts and solutions were great, actual implementation not so much.

    • @morganlak4337
      @morganlak4337 2 년 전 +139

      Is this the first project you've attempted? Keep in mind Notch had experience, starting from zero makes this a much more daunting task

    • @bluesillybeard
      @bluesillybeard 2 년 전 +102

      @@morganlak4337 Yes, my Minecraft-like game is the first large project have started.
      I have done many smaller projects (graphing application, neural network to play snake, post-fix calculator), but none of them are anywhere near the same scale.
      Yeah, I think notch did have a lot more experience than me, which is definitely part of why it's taking so much longer.

    • @rubenayla
      @rubenayla 2 년 전 +14

      @@bluesillybeard Omg your projects are super cool! So interesting!

  • @theducktator4699
    @theducktator4699 2 년 전 +1482

    Minecraft in my opinion is a programming and mathematical wonders, people might thing that a game like minecraft would be really simple to make due to its appearances, but it really is a masterpiece

    • @hellterminator
      @hellterminator 2 년 전 +49

      The modern game is pretty OK (although it could be a lot better as demonstrated by OptiFine for example), but let's be real; Notch's version was an unoptimized mess that could only run thanks to modern computers being insanely powerful. I mean, the thing is written in Java for fuck's sake!

    • @eddnox
      @eddnox 2 년 전 +30

      Well, technically a game "like" Minecraft is easy to make, proof of this are the many cheap rip-off available in Google Play Store. And also the challenges some KRplusrs have done to "code" Minecraft in a set timeframe.
      But, and a big BUT, copying a game like Minecraft with every feature it currently has it's another story.

    • @TextiX887
      @TextiX887 2 년 전 +127

      @@eddnox And also, copying is easy but creating someting new from scratch is ridiculously hard.

    • @zyansheep
      @zyansheep 2 년 전 +11

      I remember back in my mod coding days, looking through files of vector code in forge and just being amazed at the time put into writing all of it.

    • @herscher1297
      @herscher1297 2 년 전 +2

      Thats not really true

  • @amunkus2773
    @amunkus2773 2 년 전 +6

    It's kinda sad that before this video went viral, it had mostly technical players discussing stuff but now there are people mostly meming around and talking about non-technical stuff. I am happy that your video went viral though, very much deserved Gabe. Keep the great work up, you're one of the most underrated tech channels I've seen. :)

    • @GamesWithGabe
      @GamesWithGabe  2 년 전 +1

      Thanks Trayambak! There are still some good technical comments, but they get buried pretty quickly unfortunately, but I appreciate the encouragement :D

  • @Nonsense116
    @Nonsense116 2 년 전 +618

    I'm a software engineer and Minecraft is the game that initiated my curiosity into the field. I've thought about and wondered how some of the problems were solved in a game that had such an influential impact on my life. Thank you so much on making a video about it!

    • @quickstergamestutorialsgam3899
      @quickstergamestutorialsgam3899 2 년 전 +13

      It gets even better if you look at the decompiled code of the first few Java editions. It really helped me understand voxels.

    • @alexmeem6230
      @alexmeem6230 2 년 전

      bit of a personal question, but what’s your wage like as a software engineer

    • @Nonsense116
      @Nonsense116 2 년 전 +2

      @@alexmeem6230 enough :)
      If you are curious you can find averages online. Make sure to also include your city. San Fran salaries skew the data. So "average software engineer salary [your city here]"

    • @jonnyy7928
      @jonnyy7928 2 년 전

      Minecraft is ultimately one of the big reasons I’m studying computer science right now. I’m not planning to go into game dev but playing thst game at 12yo for years ultimately sparked my interest in computers.
      It’s crazy how a game can have such and influential impact on our lives.

    • @LuaanTi
      @LuaanTi 년 전

      @@jonnyy7928 I'd say a big chunk of programmers got their start by being interested in interactivity in computers, including games. But of course, most modern games have nothing to spark that - they're too big and complex to make you feel "I could do that!", and by and large, you can't really modify them. Let's hope games like Minecraft and Factorio stick around and keep getting made. Learning works best when you can spark an interest and play around with modifying something and seeing what happens.

  • @epimolophant
    @epimolophant 2 년 전 +428

    I like showing this video to idea guys. Makes them realize that coming up with some random concept is nothing compared to the enormous amount of work required to actually put together a viable product.

    • @glowerworm
      @glowerworm 2 년 전 +47

      "Hey I have an amazing idea for an app! How about I tell you the idea, and you code all of it, and then we split the profits 50/50?"

    • @DSiren
      @DSiren 2 년 전 +26

      @@glowerworm their face when you tell them they'd be lucky to get 5% is always priceless. App ideas aren't like engineering ideas or innovations - the concept is often the smallest modicum of work for apps, whereas in engineering (and science) there are many cases where established thought processes and norms of those in an industry serve to shackle their innovation and delay the next leap in technology. I mean seriously, how hard is it to think of an idea where "a game where you get ingame currency for tapping the screen which you can spend to get more base income and more money from tapping the screen"? Barely any and yet that's the premise of at least 4 multi-million player apps which have probably made their developers millions of dollars.

    • @eclipse369.
      @eclipse369. 2 년 전

      ​@@glowerworm id be ok with me @ 10-15%, you get 90-85%, after the first 1mill id be willing to lower it to like 3-5%
      id be willing to hash all details out lol :P
      thats how it should be, id retire after the first mill anyways (40 years sustainable $ for family with zero income easily lol), work on w/e whenever - extra $ come in as result, no worries for life really - just chilln and fixing peoples stuff at my own leisure

    • @bakedbeings
      @bakedbeings 2 년 전 +8

      Ideas are easy, execution is a bastard.

    • @WaluigiPooper666
      @WaluigiPooper666 2 년 전 +5

      @@bakedbeings Not really, the process of turning an idea into a real thing is really hard, but also the idea is one of if not the most important thing, you don't see alot of really great ideas around, being creative is not easy, for example with a game, you would have to write/draw all of your ideas into a notebook, the exact way it is in your mind, and manage to explain to the programmer how to do what you are thinking of, it would take alot of time for the result to be close to what you thought, and thats why its better to do most things by yourself.

  • @Imaproshaman7
    @Imaproshaman7 2 년 전 +29

    I don't know why but this made me tear up at the end. I just love this game so much. Great job of explaining. This is amazing!

  • @deusexaethera
    @deusexaethera 2 년 전 +24

    It's funny how you say that voxels are the thing that make Minecraft work, yet the voxels are rendered as polygons.
    Cool video. I learned something about various uses for Perlin Noise, which I haven't had to work with before.

    • @themalaysiandude3903
      @themalaysiandude3903 2 년 전

      it is voxel just graphically rendered as vertex

    • @themalaysiandude3903
      @themalaysiandude3903 2 년 전

      but if you want almost(i think) voxel game, you should check out john lin's sandbox

    • @Sakrosankt-Bierstube
      @Sakrosankt-Bierstube 년 전

      @@themalaysiandude3903 Technically, no. The voxel rendering technique doesnt use vertices at all. You can also not render something as "vertex" o.ô Vertices are just the "numbers" which tell the gpu where the polygons should be drawn. A single polygon without anything (like normals etc.) has nine vertices. Three vertices for each point of a single polygon.

  • @brickman409
    @brickman409 2 년 전 +648

    It's always bugged me how people assumed that Minecraft was a simple game just because of it's 8bit inspired art style. This video does a great job of explaining just how complex it really is in a way that's easy to understand. Thank you for this!

    • @wtfduud
      @wtfduud 년 전 +16

      I remember back in 2009 people were complaining that minecraft should have been a free game because of how shitty it looked.

    • @stellviahohenheim
      @stellviahohenheim 년 전 +9

      @@wtfduud Those people probably never played Minecraft themselves, if they did they'll realize after some time you get used to the blocks and the game becomes very immersive

    • @suwietch7783
      @suwietch7783 년 전

      @@wtfduud minetest(came out around the same time and it's open source and have much more possibilities).

    • @suwietch7783
      @suwietch7783 년 전 +1

      @@stellviahohenheim minetest(came out around the same time and it's open source and have much more possibilities).

    • @shaydenprime275
      @shaydenprime275 년 전

      Noone asked

  • @TapL
    @TapL 2 년 전 +3254

    Solid video, now I can appreciate block game even more :L

  • @x86_architecture10
    @x86_architecture10 2 년 전 +4

    Note: Minecraft doesn't use perlin noise to figure out what height the terrain is, it actually uses it to calculate weather or not a block exists at a specific coordinate. That is what allows it to have overhangs.

  • @only_bits2719
    @only_bits2719 2 년 전 +20

    Can't believe I didn't realize that the reason the height limit of minecraft used to be 256 is because rgb goes from 0-255 and they use a height map. Great video!

    • @jasonl5164
      @jasonl5164 2 년 전 +5

      I mean, they could have stored it as a greyscale heightmap sure. RGB goes from 0 to 255 *for each color*. If it was an RGB heightmap he could have stored 16 million different values, as your typical RGB images uses 3 bytes (one byte for each channel). That's really the limitation: heights and light levels (16 from the sun times 16 from torches etc), biomes, etc were stored as a single byte. It was all an array of bytes. Blocks+blockstates were two bytes allowing for 4096 different blocks (* 16 states comes out to 65586 different values, which is the most that can be represented by two bytes). That's all changed slowly with time. Now with registries there are almost infinite amounts of blocks and biomes etc possible, as you won't run into that many in a single chunk so the bytes stored don't represent the blocks directly but entries into lookup tables that are unique per chunk. 16*16*256 is 65586: that's the most unique blocks you could possibly find in a chunk. So you can represent the blocks in that chunk with two bytes, using that value to lookup what block it is *in that chunk*
      With 1.18 extending height beyond 256 that won't fit into a byte anymore, so height is now stored as 9 bits (one byte plus an extra bit) which for storage is packed together sequentially and is a lot more involved to read than just getting the byte at value X. It doubles the height allowed. It could be doubled again with one more bit. With more than two bytes worth of unique blocks now possible per chunk they'll either have to increase the amount of bits used per block identification, or split the chunks (and their lookup tables) vertically.
      I've had way too much of a front row look at this as I've been working on VoxelMap for 10 years. It gets a lot more complicated to represent the map when you can't lookup a value in an array and match it directly to a block but instead have to take that value and look up which block it represents in that part of the world. Height going beyond 256 is going to be a PITA for storage as bit packing is not something I want to deal with so each height stored will take double the room. I really dread light going beyond 16*16 levels (colored lighting for instance) as that will blow up what I have to store for quick retrieval for the minimap and world map. How Minecraft itself stores that stuff to disk is getting increasingly abstract (which allows for limitless addons and new blocks and such). It's harder to deal with, but really skillfully done. It's getting to where I don't feel like dealing with it anymore though haha

  • @OperationDarkside
    @OperationDarkside 2 년 전 +575

    I tried re-creating Minecraft myself and it didn't seem that complicated at first, because all the techniques are known for a long time, but combining them as a single pers(s)on is quite the task

    • @killianobrien2007
      @killianobrien2007 2 년 전 +19

      Haha!

    • @herscher1297
      @herscher1297 2 년 전 +4

      Its a lot of work, but that goes for anything of value

    • @irok1
      @irok1 2 년 전 +33

      @@killianobrien2007 Google translated Haha! to Lol!...

    • @muuubiee
      @muuubiee 2 년 전

      How did it not seem complicated?

    • @OperationDarkside
      @OperationDarkside 2 년 전 +9

      @@muuubiee Because non of these concepts are ground breaking (lots of online tutorials) and I had a lot of sample material from other people doing the same. Hopson did the same, but decided to stop continuing the project.

  • @Drillgon
    @Drillgon 4 년 전 +2481

    Why doesn't this have more views? It's really high quality.

    • @GamesWithGabe
      @GamesWithGabe  4 년 전 +213

      Haha thanks man!! I really appreciate the positive feedback, and I'm guessing it's because I'm still a really small channel, hopefully it will increase in views over time :D

    • @spinachslurp9176
      @spinachslurp9176 2 년 전 +54

      @@GamesWithGabe algorithm choose you twice for me already. I think you could grow quite a bit if you made more of these kinds of videos

    • @GamesWithGabe
      @GamesWithGabe  2 년 전 +73

      @@spinachslurp9176 Thanks for letting me know! I would like to make more videos like this, they just take a really long time and I haven't coded any other big games other than Minecraft haha

    • @KingEngine97
      @KingEngine97 2 년 전 +37

      because maybe the music (of a song we all know in and out) is too loud while he is explaining, still good video

    • @deleted_handle
      @deleted_handle 2 년 전

      I agree.

  • @KatieDawson3636
    @KatieDawson3636 년 전 +3

    Would definitely watch a part 2 if you've got it in ya! Great work, loved the balance of tech, math, and logic! And I love how complex problems can have relatively "simple" solutions, like how the torch only needs to directly change the block its placed on and let the math just do the rest. Beautiful.

  • @drewperlman5485
    @drewperlman5485 2 년 전 +1

    This video was incredible. As someone who studied games programming in college, you just explained so many complex concepts in such a simple and engaging way! Kudos!!

  • @SKRUBL0RD
    @SKRUBL0RD 2 년 전 +45

    not just a ground breaking game, the #1 game of all time by play time, sales, and basically every metric.

  • @lucasfrost4064
    @lucasfrost4064 2 년 전 +699

    Nice video, only thing that bothered me is how you kinda confused "voxel rendering vs polygon rendering" and Minecraft voxels. Minecraft uses polygon rendering just like any other game, as you explained yourself shortly after. Great video nonetheless :)

    • @janbuhlmann497
      @janbuhlmann497 2 년 전 +21

      I think it's more about the question, how you get from voxels to a usable polygon structure

    • @viciousmagician4567
      @viciousmagician4567 2 년 전 +15

      Technically they use both

    • @connorjones1992
      @connorjones1992 2 년 전 +92

      @@viciousmagician4567 If I'm not mistaken they use voxels to store terrain data. It's all in the backend for data storage where the actual client side rendering is traditional polygon rendering. So they do use voxels, just not really in the visual render process.

    • @araa5184
      @araa5184 2 년 전 +8

      John lin's game is a better example of voxels

    • @Mart-E12
      @Mart-E12 2 년 전 +9

      Yeah what you see isn't voxels, but technicaly every block is still a voxel

  • @odw32
    @odw32 2 년 전 +1

    I think one of the most beautiful aspects of the game is how blocks are given very specific "composable" properties.
    For example: The premise of a trapdoor seems quite simple: It's a basement hatch, which opens and closes when you click it.
    But then you discover that it's a lock for a water stream, it responds to redstone signals, it makes mobs walk into holes, it triggers observers, it can catapult arrows, etc.
    From there on, it's just an infinite rabbithole of "emergent properties", of new things to learn.

  • @miladdy
    @miladdy 2 년 전 +9

    Very interesting video! For those that enjoyed this one, I highly recommend watching Henrik Kniberg's video on a 1.18 snapshot and "how stuff works". He talks a lot about how the new terrain generation was developed, the use of noise for biome placement, making good looking mountains that "make sense", how they made underwater caves and a bunch more stuff.

  • @darklions8885
    @darklions8885 3 년 전 +198

    The quality of this video is amazing.

    • @GamesWithGabe
      @GamesWithGabe  3 년 전 +6

      @DarkLions thanks! I want to make some more eventually :)

    • @davidgumazon
      @davidgumazon 3 년 전 +5

      @@GamesWithGabe Amazing Antvenom-level Quality content :D

  • @skii_mask_
    @skii_mask_ 2 년 전 +40

    I would love a sequel to this talking about other problems Minecraft had to solve with clever solutions.

  • @HumanAnalyst257

    Thank you for talking about this! I've always been in awe of the ingenious code behind Minecraft and It's so good to se that I'm not alone in lauding its significance!

  • @edriandumaguit563
    @edriandumaguit563 2 년 전 +7

    Thank you for your effort, you explained it really well, good job. Keep it up bro i really interested to see more of this.

  • @amagicmuffin1191
    @amagicmuffin1191 2 년 전 +545

    pretty interesting how minecraft is still a scuffed game optimization-wise even through all of this
    the optimization mod community is insane. sodium pog

    • @morganlak4337
      @morganlak4337 2 년 전 +79

      I mean occlusion culling is not that wild of an optimization. Difficult and important, but its the tip of the iceberg in terms of what can be done

    • @crackedemerald4930
      @crackedemerald4930 2 년 전 +14

      Minecraft java edition that is

    • @jamo8154
      @jamo8154 2 년 전 +18

      yh I mean Minecraft doesn't even have a native Level of detail system
      no wonder 16+ chunks runs so poorly (in terms of 1% lows)

    • @Mart-E12
      @Mart-E12 2 년 전 +12

      Yeah Optifine does a great job, and the poeple developping shaders are crazy good too

    • @DamageMaximo
      @DamageMaximo 2 년 전 +4

      optifine master of all mods

  • @TheDolphiner
    @TheDolphiner 2 년 전 +52

    Initially felt maybe a bit too simplified but I don't think that's a problem at all in the end. What I think is maybe worth mentioning along the same lines is the way various block updates work - even if e.g. lighting is this simple, you very quickly start working in millions of loaded blocks, so you make sure to only actually update the light level of the surrounding blocks, and their surrounding blocks, only as far as you need. If you then extend this concept to stuff like redstone, you can see how Minecraft seemingly manages to support hundreds of thousands of blocks at once, each with their own capability for some sort of logic - just by strictly controlling when that logic gets performed.

    • @Samsam-kl2lk
      @Samsam-kl2lk 2 년 전 +9

      redstone dust is actually a fantastic example of where mojang made a terribly inefficient algorithm lol. Unpowering a line of 15 redstone dust causes hundreds (if not thousands) of block updates due to the way the power level decreases.

    • @Ineksi
      @Ineksi 2 년 전 +4

      It's just a guess, but I think the light level has an easy cap to it - once the level stops changing (because it reaches a natural decrease cap, change = 0), you can stop calculating. Sand, water and gravel show very nicely that only the update at the spot is considered as far as it causes updates. Think of the torch bug in the mineshafts as well. So it's essentially just the update in the rendered area that does anything right at the spot, I'd think. Redstone is special as you can enable it to update blocks through own mechanics. On a second thought, the gravitational blocks do that as well sometimes, they're just not reversable.
      No argument about the wonkiness of redstone, though. On the other hand - it was a project started by one person, I really can imagine that the mass of detailed mechanics become very quickly very "interesting" to manage ;D

    • @crystaldragon471
      @crystaldragon471 2 년 전 +2

      Not to mention mechanics such as random tick, and even just managing chunk loading. Such things are perhaps simple to solve, but it is a problem that must be solved regardless. I think what is most fascinating about the game is, along the lines of what you are saying, the logistics of balancing sequences and performing logic at specified times. I've been fascinated with minecraft for that simple reason alone, and have always been optimistic about its development. I've long believed minecraft programming could be the basis for something much more complex, and it is clearwhen you look at the mods programmers develop for the game. Obviously, there is something so intrinsically malleable about the game and its voxel-polygonal rendering, when mods are being made to make cubes into more complex polygons to "round" edges. Add in shaders and textures, throw on 3d mode with some glasses, and it's nothing short of VR in my opinion.

  • @medium-rare-bear7155

    This video is severely underrated. Hats off to you my man, amazing video. Truly changes the way one sees this seamlessly simple looking game.

  • @atrupb
    @atrupb 2 년 전 +1

    i never thought minecraft was simple to make but i never knew this is how difficult it really was.
    great video dude, super interesting to watch

  • @BlackJar72
    @BlackJar72 2 년 전 +108

    Having invented my own Perlin Noise variant and successfully re-written much of the world generator in a mod, and later failing to make my own chunk mesher for something else, I can tell that chunk meshing is actually much harder than gradient noise like Perlin's. The concepts behind chunk meshing (which involves more than face culling) are actually quite simple, yet it's surprisingly hard to code right.

    • @ianmoore322
      @ianmoore322 2 년 전 +2

      Greedy meshing has me stumped and unmotivated. Even minecraft doesn't use greedy meshing

    • @BlackJar72
      @BlackJar72 2 년 전 +3

      @@ianmoore322 I screwed up my greedy meshing coded (probably careless mistakes and types) and it was too long to debug easily. I then realized then that since I was making a game based on indoor dungeons I didn't need meshed chunks, so I did writing a kind of greedy mesher that work in turning 2D arrays of heights into 3D rooms (not a chunk mesher but a room-mesher).

    • @truepennytv
      @truepennytv 2 년 전 +8

      that type of thing is my programming nightmare. A concept that is simple in my head, but complicated as all get out when you try to teach your laptop to do it. Super satisfying when you finally get it though!

    • @ThisNameIsBanned
      @ThisNameIsBanned 2 년 전 +6

      Its the kind of algorithm that you put in a library to re-use everywhere.
      Re-inventing basic need algorithms is not productive at all (interesting and educational maybe, but not efficient).
      If you have a proper library, you can then have people optimize that library for performance and get the benefits.

  • @FreeRoger
    @FreeRoger 2 년 전 +287

    Just discovered your channel, this video is a masterpiece. I've played Minecraft [pocket edition and then java edition] consistently since 2010, and i've always loved it because of the complexity that stems from a simple survival simulation. The code for the game is extremely flawed, but that is one of the things that makes it such a fun game to play, as there are many bugs and glitches to exploit. You just earned yourself a subscriber.

    • @GamesWithGabe
      @GamesWithGabe  2 년 전 +33

      Thanks @FreeRoger! I'm glad you liked the video, and I completely agree with you about the bugs in the game. I think another big reason it's such a fun game is because they actually listen to their community, but thanks again for the awesome comment :)

    • @vibaj16
      @vibaj16 2 년 전 +32

      Actually, IMO, Minecraft is surprisingly "bugless" compared to other games. There are very few, if any, truly game breaking bugs, unlike many other games I've played. The developers also listen to their community far more than most other games of this size and popularity. Certain games (I'm looking at you, Scrap Mechanic) fail spectacularly in both respects (which could be majorly fixed by better developers...)

    • @ixinor
      @ixinor 2 년 전 +5

      @@vibaj16 hes talking about the release date of Minecraft of 2011 which featured many, many bugs.
      Now the bugs are features and mew bugs keep the game fun and interesting.

    • @realtimestatic
      @realtimestatic 2 년 전 +16

      I wouldn’t call Minecraft’s code extremely flawed

    • @FreeRoger
      @FreeRoger 2 년 전 +4

      @@realtimestatic You've clearly never seen the jigsaw code.

  • @jaimytourigny3027
    @jaimytourigny3027 년 전 +1

    I'm left hungry to know more, this look like the first chapters for a much longer journey, and now I expect you to deliver it whole.
    Just, DO IT!

  • @LuckySparkles
    @LuckySparkles 2 년 전 +1

    I remember back in 1.3.2 when I first begun playing Minecraft. I remember for a while, there being so many brightness glitches back in them days where a single overhanging or floating block would cause a maximum darkness shadow when there was no real reason for it, plus this would also allow hostile mob spawning in that shadowed area. I'm glad that's no longer a thing anymore. I've always loved Minecraft and it's mind blowing to see how far it's come over the years. :)

  • @nickleslicka
    @nickleslicka 2 년 전 +38

    Love this video! just one complaint, the music can get a little overpowering. At one point I had to strain to hear you talk.. Still, keep up the good work!

  • @Merthalophor
    @Merthalophor 2 년 전 +20

    It's funny that you mention rivers being used to separate bioms while flying over bioms where not a single river separates a biome, and bioms are separated without rivers lol

  • @BorntoBuild
    @BorntoBuild 2 년 전

    Fantastic video, Gabe. We're currently developing our own voxel engine for a little over a year now and it's fascinating to see how these solutions still hold up.

  • @Sanguinaryyy
    @Sanguinaryyy 2 년 전

    Amazing video, I knew about the perlin noise and perlin worms to generate the terrain but not the rest. Your explanations was great and I definitely learned a ton! Thank you.

  • @AupriProductions
    @AupriProductions 2 년 전 +6

    4:32 "The problems above" lol he obviously wrote that as part of a script and didn't consider that it wouldn't make much sense in a video that doesn't flow from top to bottom like written words. Great video though, just thought that was interesting

  • @arpita1shrivas
    @arpita1shrivas 2 년 전 +26

    underrated AND THIS IS A MASTER PIECE
    get this man a million views

  • @wehttam240
    @wehttam240 2 년 전

    great vid, love how easily you described the more technical features.

  • @sxz9869
    @sxz9869 2 년 전

    Incredible video right there its really fascinating how a game that seems so simple can actually be insanely complex

  • @Noobmaster_x69
    @Noobmaster_x69 3 년 전 +80

    Fantastic video! It gives a lot of intuition on how a game is made. And now it makes me even more appreciate the hard-work of developers working on such beautiful games. And BTW why the heck you have so less views! (You deserve more) Keep up the good work...

    • @GamesWithGabe
      @GamesWithGabe  3 년 전 +3

      Thanks Shreyas! I'm glad I was able to shed some light on the game creation process :)

  • @pauljs75
    @pauljs75 2 년 전 +28

    Some of the procedural terrain generation goes back older though. Look at some scenery rendering software like Bryce, and that's where fractal terrain generation (as we tend to know it now) first shows up in a way that is accessible on home computers.
    So Notch was looking at other stuff that already existed when putting Minecraft together, and came up with some of the clever voxel stuff to better exploit it in terms of gameplay features. You'd also have to consider that in the pre-Microsoft era it was also made to run smoothly in a Java runtime environment. So there was quite a bit of work to make it efficient enough to run on that platform. So that may also give some consideration of all the refactoring to the game engine after Microsoft changed it to some variant of a C programming language compiled software.

    • @zoeherriot
      @zoeherriot 2 년 전 +4

      To be fair - notch didn't come up with any of the voxel, terrain generation concepts at all - he borrowed an existing game engine concept (Infiniminer) and turned it into the game he wanted to make. Doesn't take anything away from his achievement, but he did not come up with the block style game mechanics nor the voxel rendering methods for minecraft.

    • @peacefulexistence_
      @peacefulexistence_ 2 년 전

      Minecraft is still written in Java, what you are referring to is Bedrock, aka the shitshow that runs on consoles, phones and Winblows 10

  • @computer__eyez
    @computer__eyez 2 년 전

    Masterful explanation. Visuals are amazing t breaking down such complex concepts. Thank you.More please. Subscribed!

  • @pedrohorace361
    @pedrohorace361 2 년 전

    This really healped my understand almost everything about minecraft and It was very insightful. Thank you!

  • @NicholasBrakespear
    @NicholasBrakespear 2 년 전 +67

    "So their game, Outcast, got left in the dust"
    That's a weird line. I mean, it was actually pretty well received at the time... and it's not like it was an isolated thing - Westwood played with voxels a whole lot, using voxels for Lands of Lore 3, and for Tiberian Sun. Oh, and then there was the Blade Runner game. Meanwhile, NovaLogic used voxel technology a whole lot for games like the Delta Force franchise, because while voxels tended to produce rather grainy, crunchy visuals... they were also vastly superior at creating landscapes with natural fuzziness and depth emulating rough terrain and grass, at a time when prefab grass or dense populations of sprites cost a lot in performance.
    In fact, this is a major selling point of true voxel engines to this day - they are much better at rendering detail, with the caveat that said detail will look pixelated, because it's a mass of volumetric pixels. Indeed, this is why Lands of Lore 3 and Blade Runner used voxels for its characters - the characters could afford to be more detailed than a 3D character, and more like a 2D sprite, but without losing the seamless 3D perspective changes.
    Minecraft is actually a real oddity in that it uses voxel technology for its underlying world structure... but not at all for its visuals; the performance benefits of voxel technology for displaying high detail environments and characters (at least in terms of older hardware limitations) are not utilised in Minecraft.
    Furthermore, while it's an ingenious creation that absolutely deserved its success... it's pretty janky, with the Java edition, to this day, struggling to run smoothly on high power machines, while the Windows 10 rebuild can run on a potato, with far greater viewing distances (demonstrating that some pretty fundamental things were holding the game back).

    • @lorelando7413
      @lorelando7413 2 년 전 +1

      This makes me wonder about an approach where you use a voxel engine to create the base image for some technology like DLSS and some additional creativity to use both the complexity of voxels and clarity of image.
      Should be great for raytraced lighting and reflections too.
      Then again, I am not a programmer and my imagination might be running away a little.

    • @Yggdrasil42
      @Yggdrasil42 2 년 전 +1

      Outcast was well reviewed but not a commercial success. Mostly because the voxel rendering was very CPU heavy and wasn't assisted by 3D cards like the Voodoo that were just coming out that same year. It looked amazing compared to games of just a year before but compared to the smooth and high framerate 3D accelerated games it just couldn't compete. The framerate tanked even on a new PC.
      I stood in line to buy Outcast and was disappointed that my PC had trouble keeping up. The framerate was low despite good specs. Twenty years later I played it again on a modern computer and it was great. Definitely recommended playing it to retro gamers.

    • @ThisNameIsBanned
      @ThisNameIsBanned 2 년 전

      @@Yggdrasil42 Graphic cards use a LOT of custom hacked code even for specific games to optimize their performance.
      So a graphic card that would be optimized for voxels would have a different architecture.

  • @DonnaPinciot
    @DonnaPinciot 2 년 전 +29

    I think you could maybe have toned the music down a bit, especially around 2:50, because it was kinda hard to hear you over it.
    Having lights be 'photorealistic' makes little difference, it's the fact that Minecraft's light is calculated when it's placed, and is saved and rendered as part of the world.
    For other games, while some light is pre-calculated, the vast majority of lights interacting with the scene are dynamic, shader-based lights, which must all be processed and reprocessed each frame. The more you have, the more your performance drops.
    Minecraft has the advantage in that its world is already voxellized, so adding light values to the voxels that then gets propagated from sources and saved, means they don't need to be updated again until something nearby changes.
    For all the talk about how dynamic Minecraft is, yes you can change everything about the world, but without that, it's remarkably static.
    You also do have the option to look at what's effectively Minecraft's source code, thanks to the various modding projects. You don't have to simply guess at the answers.

  • @jonathanwynands9786

    Great video ! I wish it was longer, and that we could have learned more about the other elements of the game! Great job ! 😁

  • @KlingonCaptain
    @KlingonCaptain 2 년 전

    Very informative. I really enjoyed this video. I'll have to watch it again for sure.

  • @ratboychase
    @ratboychase 3 년 전 +30

    its so weird seeing this video have so little views, its really good
    you also explained it really well, good job

    • @GamesWithGabe
      @GamesWithGabe  3 년 전 +1

      Thanks man! I really appreciate the comment, and I like your profile picture haha

  • @user-zo5xg5hh5f
    @user-zo5xg5hh5f 2 년 전 +14

    Such an underrated channel. You've did a great job explaining all of these major points in-depth, which is rare to find these days. Well done, Gabe!

  • @crazydragy4233
    @crazydragy4233 2 년 전 +3

    The fact that voxels were left in the dust was a crime tbh. They're amazing

  • @bkr.studio
    @bkr.studio 2 년 전 +1

    i dont think ive ever been happier about the algorithm handing me a video. minecraft was a huge part of my childhood, and buying the alpha version with euros as a preteen is something ill never forget lol. years later i'm a developer, and working on my first real game. would've never thought that little block game would have such a big impact on my life.

  • @InverseOfficial
    @InverseOfficial 2 년 전 +20

    amazing video, was thoroughly surprised when I saw how few views this had with the quality of the content. Only slight suggestion I have is to lower the music volume a bit but this is still incredibly well made!

    • @GamesWithGabe
      @GamesWithGabe  2 년 전 +3

      Thanks @InverseMusic! And yea I noticed the music was a bit loud after I already uploaded haha. It did teach me to watch my videos once through before uploading them though so I don't make the same mistake :)

  • @JMPDev
    @JMPDev 2 년 전 +43

    Great video covering some of the core rendering concepts.
    I would love to see more of a deep dive into the Update Loop of the game. Specifically how entities, blocks and chunks are updated with ticks and how that is adjusted based on player proximity to limit the otherwise unbounded time it could take to update all the things you've explored in an infinitely large world.

    • @GamesWithGabe
      @GamesWithGabe  2 년 전 +6

      Those more in depth videos may be coming out very soon ;)

    • @vast634
      @vast634 2 년 전 +2

      (based on my knowledge of the original Minecraft Alpha version) The game is generating the chunks at runtime when getting into proximity the first time, and dumping them onto the disk (some 3D array format) for later loading. Actor entities are just spawned in near the player. They cease to exist when leaving the chunk area.
      As long as they are within a active nearby chunk, they have all the data they need (collision "mesh") to move about. A very basic tick update-logic NPC ai. I suppose the logic ticks are decoupled from the rendering ticks. (otherwise the game would run into constant imprecision problems given its high performance requirements on different machines backs then)

    • @inferior2884
      @inferior2884 2 년 전

      IIRC update() is called chunk-wise, so all that's needed is chunk management

  • @coreylyman1232
    @coreylyman1232 년 전

    Very VERY well done my friend. I know this video is quite old but....all the points you touched on ARE STILL very valid. Bravo

  • @dreamsparkle42
    @dreamsparkle42 년 전

    this was fantastic thank you. i know a lot bout minecraft and have watched this humble game grow since alpha and seeing it from a different view makes me love it all the more and the music, after taking this hiatus from mc, it is like a cold drink on a hot day of refreshing nostalgia so again thank you for this

  • @BalintCsala
    @BalintCsala 2 년 전 +148

    Hey! I know this video is already a year old, just wanted to mention something:
    700k triangles isn't that much nowadays, as you said, each hero in overwatch gets 60000 triangles, but there are possibly 11 of them on screen at once (not counting the player character), which puts it at roughly the same triangle count. There's really no reason for Minecraft to be as GPU hungry as it is (even though still you are much more likely to be CPU bottlenecked), but due to how it's structured (e.g. it loads the vertex data of most objects to the GPU every frame, not leveraging the speed of the GPU in this regard) it just can't get better without a major rewrite (which hopefully happens now that it has finally updated the OpenGL version). Most of this is due to how it was made using very old technologies, such as OpenGL 2, which was already deprecated at the time.
    I wouldn't really call the game a technical feat, but it does deserve some praise on the idea.

    • @BalintCsala
      @BalintCsala 2 년 전 +31

      Also, this is a nitpick, but the game doesn't use perlin noise for the heightmap, but 2D simplex noise. For 3D it does use perlin noise, because Simplex has a licence on it beyond that

    • @core-experience
      @core-experience 2 년 전 +19

      Going by your logic, a ground breaking mathematic theory is not a feat because the mathematician didn't invent a new word processor to write his or her thesis on? These things you mentioned are tools, and just like hardware tools they improve over time with better alloys, more precise machining and such.
      The fact that Notch thought of the idea, and combined all the tools he needed, to make a groundbreaking game is a feat. Yes it has aged since then and needs rework but that doesn't change the fact that it is a feat and a very technical one in gaming industry on its inception.

    • @nixel1324
      @nixel1324 2 년 전 +33

      That's 700k triangles _per chunk,_ of which there are 625 with the default render distance. The full formula would be (blocks per chunk) * (amount of chunks) * (faces per block) * (tris per face), or (16*16*256) * (R*2+1) * 6 * 2, so with a render distance (= R) of 12, that's 491,520,000 tris.
      EDIT: of course, that's still a simplification. Not all blocks are cubes, but also air doesn't have any faces. Then there's glass, water and ice which have transparency, etc.

    • @BalintCsala
      @BalintCsala 2 년 전 +10

      @@core-experience never said it isn't a great feat, in fact my last sentence said that it does deserve praise for the idea. Putting together already existing stuff is just as innovative, as making parts of them work

    • @BalintCsala
      @BalintCsala 2 년 전 +23

      @@nixel1324 My bad there, didn't check the calculations and I missed that part. However I still don't think it is a technological feat to be able to render that much. Apart from basic face culling and not rendering geometry behind the player, minecraft didn't really do much in terms of optimizing geometry (e.g. It doesn't do greedy meshing, any form of LOD, octrees, etc.) and even comparatively week GPUs can run it at acceptable framerates. Remember when bedrock edition came out and everyone was shocked by render distances that went up to 128 blocks without much of a hitch

  • @gentworm2377
    @gentworm2377 2 년 전 +5

    This is fascinating, you make the best in-depth videos

  • @majortom7851
    @majortom7851 2 년 전 +1

    This is fantastic! I'd love to see a video on the new cave update and how they achieved that, since they no longer look like "worms" most of the time.
    Anyway great vid, thanks!

  • @AlanRodmell
    @AlanRodmell 2 년 전

    Fascinating video. Never appreciated how much work went into the game. Thanks

  • @mbcommandnerd
    @mbcommandnerd 2 년 전 +18

    This is incredible, thank you for explaining it so well! And we have a completely _new_ biome generator system in 1.18 now, which is far more complex than the 1.0-1.17 system was. Maybe you can make a video just about that, although that might be a little complicated to explain.

    • @peanut-sauce
      @peanut-sauce 2 년 전 +1

      Generation has changed many times between 1.0 and 1.17, I believe the most significant one was 1.7.

    • @osasunaitor
      @osasunaitor 2 년 전

      @@peanut-sauce But now for the first time biomes generate independently of terrain. First you get the random terrain, and then random biomes are added on top (or bottom) of it, according to a set of rules. This allows for the creation of cave biomes right under the surface biomes, for example. Prior to this, each biome was binded to a specific terrain type so both things had to generate together, making world generation much more limited.
      It is truly the most fundamental change in biome generation since the game's inception.

  • @pixelpastiche
    @pixelpastiche 2 년 전 +5

    *G R E A T* Video. Wonderful pacing with explanations that are clear and in depth without becoming tiresome or rambly. Thank you so much for the video

  • @ismael8926
    @ismael8926 년 전 +5

    Can we have more of this? Its great content, i would like to follow the rest of the Minecraft mechanichs to a technical level, since i intend to create my own Game and this has helped me so much

  • @vanomaly117v
    @vanomaly117v 2 년 전 +78

    Never before has a game started over 10 years ago and to this day still dominate its competition by keeping its playerbase happy with ACTUAL updates and ACTUAL CARE for their fans by not just making it about themselves. Edit: read it again. Guaranteed you understand more than the replies lol.

    • @danh9503
      @danh9503 년 전

      Plenty of games have kept up with consumer demand actually....Just look at GTA V for example...they constantly update new features etc.

    • @Adaephonable
      @Adaephonable 년 전 +4

      Never heard of WoW?

    • @Oscar-vs5yw
      @Oscar-vs5yw 년 전 +1

      @@Adaephonable no, no I have not

    • @capitalistball2924
      @capitalistball2924 년 전 +1

      @@Oscar-vs5yw Okay well at that point you literally just live under a rock

    • @axrah8406
      @axrah8406 년 전 +8

      @@Adaephonable hmmm yes Blizzard is certainly keeping the playerbase happy with actual updates and actual care for their franchises and not just incessantly ruining their franchises to please shareholders
      I mean just look at WoW player count, it's insanely high these days

  • @TrabberShir
    @TrabberShir 2 년 전 +4

    You actually made the lighting sound more complicated than it is by combining the sky and block lighting systems. Day/Night cycles would demand constant recalculation for what you described, but for a very small price in memory footprint, lighting can be baked into block data at generation or update rather than calculated at render time.

  • @merkgalifinakis1817
    @merkgalifinakis1817 2 년 전 +1

    I would love a series going into more aspects of the game!

  • @kevinxin1545
    @kevinxin1545 년 전

    Same with making videos. Before I started making videos I never really thought about the process. After I started I was met with a long list of problems. Cameras, lighting, audio, green screen, music, color grading… Until u start doing it u cant really appreciate how much work ppl put in doing it, and thank you very much for making such a high quality video.

  • @ultrapipi
    @ultrapipi 2 년 전 +11

    Loved the video, as a programmer myself I felt fascinated with everything you explain.
    I would give a 11/10 to this video but for me, the music in the background was too loud and distracting.

  • @noury3628
    @noury3628 3 년 전 +4

    Awesome video, keep up the good work! I’ll be watching for sure

  • @studiooriley
    @studiooriley 년 전

    Awesome video! Love the way you talked about the process of building the game. Very informative and helpful to aspiring game designers like myself!

  • @AustenWho
    @AustenWho 년 전

    This is AWESOME!!! Thank you for sharing this!

  • @Flaroon
    @Flaroon 3 년 전 +8

    u just got another sub bro u r amazing please make more content like this. love your voice btw

    • @GamesWithGabe
      @GamesWithGabe  3 년 전 +2

      Thanks for the sub P M! I want to do another video like this, I was thinking of "How a computer runs a program", but I'm not sure that would be interesting? Do you have any suggestions? :)

  • @Astra3yt
    @Astra3yt 2 년 전 +6

    Honestly with the new caves and mountains in 1.18, I'm amazed even more.

  • @HowlingGames
    @HowlingGames 2 년 전

    This was a very informative video, I learned some things I didn't about the the early stages of the game development that I didn't know about before. I'm glad I do know since this is my all time favorite game. Been playing it for 10+ years.

  • @alexs5814
    @alexs5814 2 년 전

    Thank you for this TED-Talk.
    Very informative and interesting.

  • @ItsSunnyMonster
    @ItsSunnyMonster 2 년 전 +34

    As a game developer, this explanation can't be more accurate. You deserve more views :)

    • @GamesWithGabe
      @GamesWithGabe  2 년 전 +1

      Thanks SunnyMonsterMC! I'm sure the views will come eventually :D

  • @ABHISHEKSINGH-nv1se
    @ABHISHEKSINGH-nv1se 3 년 전 +56

    oh my god i m crying with tears in my eyes with happiness i got watching this video. i always wanted to understand this all. you earned my sub. ready to create 2d game engine with your help.

    • @GamesWithGabe
      @GamesWithGabe  3 년 전 +6

      Thanks Abhishek! I'm glad that these videos are able to help :D

  • @everlastingprosperity9275

    Just went through the video, very informative and great editing. my only pet peeve was that the background audio could have been a little softer as it drew my attention away from paying proper attention to the presentation. great work!

  • @Rrek
    @Rrek 년 전

    New subscriber here. I like how you script your videos. They're very professional sounding. As for the audio balance, it was nostalgic. It reminded me of the Xbox 360 days when i didn't know how to turn down the music lol

  • @Leo-qe1uu
    @Leo-qe1uu 년 전 +3

    I cant even express with all of my words and actions HOW MUCH i love this game

  • @Survivalist_Redo
    @Survivalist_Redo 2 년 전 +13

    I don't really think this video has the quality a lot of the other commenters think it has, however while I don't think the quality is very high I do think this video has really good value.
    As in, the way this video expresses what is has to say isn't very polished, but despite that, what it is trying to say is still very valuable.

    • @birbies
      @birbies 2 년 전 +3

      The video is wrong in how it explains some parts, and when he called the algorithm to bake chunk meshes complex I almost laughed

  • @LARAUJO_0
    @LARAUJO_0 2 년 전 +1

    -Putting aside the fact you left logs floating at --0:23-- and --1:57--,- this is a really cool analysis

  • @DNAMobileGaming
    @DNAMobileGaming 2 년 전 +1

    My kids & I have been playing this again the last couple months, & it's crazy how far this game has come since 2011 when I first started playing it for Xbox 360. Back then the game was simplistic yet so much fun that I ran a 24 hour server from my 360 that was extremely popular to the point that we had a minecart system covering the entire world. We had lots of resources 5 huge villages including some underwater glass villages. This game back then was an eye opener & now playing it 11 years later still is crazy to see how much this game still holds onto people & memories in just over a decade. Plus my kids that are up to 5 years of age love playing it with me so there's that 😁.

  • @tristanwegner
    @tristanwegner 2 년 전 +7

    This was so interesting! Do you have a video that explains how Changes to the maps are saved, and how the data structures handles this?

    • @Ineksi
      @Ineksi 2 년 전

      Uh, that would interest me as well. Always wondered how the block positions are stored.

    • @peacefulexistence_
      @peacefulexistence_ 2 년 전 +1

      Not too detailed explanation, but here's a high-level overview:
      A chunk is generated, and a table of id block is made for the chunk (MC switched from numerical IDs). You also have various block states, which are just simple 4 bit values, and Tile Entities, which are used for more complex data and stored separately.
      A chunk is an area of 16x256x16 blocks.
      Those are then stored in region files on your disk.
      Tile Entities are separate, and store data such as inventory contents. They are serialized or deseralized from strings on chunk load/chunk save. This data is called NBT, and it's basically JSON.

  • @vagraadam
    @vagraadam 2 년 전 +8

    The height is not from 0-256, that would need 9 bits to store, it's from 0-255. That is an 8 bit unsigned image, the standard.

  • @nicksrandomness2774

    This is fascinating. I’ve always wondered how a game do simple, yet so complex could be created. I’ve never understood how the game could calculate where a block is, and it’s relation to the world. Great video

  • @hayatealt7040
    @hayatealt7040 2 년 전

    This is probably the single most interesting video about a games structure and feats that I have ever watched

  • @pmurph1
    @pmurph1 2 년 전 +3

    Thank you so much.
    I don't play a lot of minecraft and I'm a bit older than the (current) target demographic but every time someone calls Minecraft a "dumb baby game" or a "casual" game, I'm triggered. As an amatuer programmer with a love for hardware right now I've always respected and been in awe of the underlying skeleton of this game. I've watched entire youtube tutorials on logic gates done entirely in Minecraft.
    Now, instead of writing a 20 page essay or going off on a 6 hour rant and completely wasting my time, I can just send them this video.
    Great job.

    • @pmurph1
      @pmurph1 2 년 전

      Subbed and bell rung.

  • @Andrew90046zero
    @Andrew90046zero 2 년 전 +7

    I want to actually say something about cave gen in Minecraft 8:35. Because I have also tried looking into how Minecraft does it, but I don't think Mojang really says publically how it's done. It is possible to look at the source code, but even it is a bit hard to understand. It seems like Perlin worms may be the way it's done, and from the phrasing in your video, it sounds like you were also unsure, even after doing research. Which is understandable.
    What I do want to say about cave gen is that I did come up with a way to do cave gen that may be the true way they do it, or if it isn't, it's a better way to do it. Because from what I understand "Perlin Worms" is NOT a "purely procedural" form of generation. You can't just pick any point in the world and tell if there is a cave block (air block from cave). You have to generate the cave all at once, from start to finish. Which could cause issues if you generate a Chunk, and it causes blocks to be removed (for a cave) in places that have already been generated. So you could be mining and all of a sudden a cave just pops up in front of you.
    So you need a way to be able to generate a **LARGE** cave system that spans many chunks, but be able to generate it starting from any point in space. In other words, **no origin dependency**.
    I made this demo on this website that allows you to code shaders to make interesting effects.
    www.shadertoy.com/view/7lX3Rl
    And it shows what I'm talking about. Caves are essentially lines (geometry), and you can have an algorithm that determines if a pixel (voxel) or position in space is inside some geometry. Using the concept of grids that Ken Perlin used for Perlin noise, we can use discrete (but infinite) grids to generate random "geometry data" anywhere in space. And the lines (geometry) that are generated can be connected together randomly. And so you can pick any point in space and determine if a cave is there. Without needing to know where the cave "started".
    I don't know if this is how Minecraft actually does it, but I would think that it is.
    This concept can be altered to do different things as well. Cave wall diameter can be random. You could use Bezier or Spline algorithms to add curvature to the lines. You can use position distortion to add details to these lines, making it look even more organic. You could even have special data for the cave walls. Special random blocks that can show up on the sides of caves; Wall layers.

    • @GamesWithGabe
      @GamesWithGabe  2 년 전 +3

      I was very unsure of how cave generation in Minecraft actually works. I read some articles suggesting you could save the perlin worms data with the chunks to continue across borders, but that seemed a bit sus to me. I was going to research some methods about a purely functional style of generating the caves where you give a world position as input, and it returns whether that position is a cave. It looks like you've done some awesome tinkering already though, and I'll probably be exploring your shader toy in depth when I have some time. Thanks for the info! And the shader looks really intriguing 😊

    • @Andrew90046zero
      @Andrew90046zero 2 년 전

      @@GamesWithGabe Awesome! no problem.
      Theres probably countless approaches. Which I think is what's great about this subject. You can indeed get perlim worms to work, but it needs to be implemented differently. And a more purely functional approach might give you more artistic control in some situations.
      Like you are saying, they could generate large caves that are far away from the player, and save them to a separate temporary grid. And then, when a given chunk needs to be generated, they can just copy the data from the "cave buffer", if you will. So they are making a guarantee that caves aren't just gonna generate right in front of you. ¯\_(ツ)_/¯
      If you wanna get in touch with me in the future when you look more into it, if you wanna talk more about it. That would be cool!
      I am actually working on a game with a friend. And the game uses procedurally generated levels; especialy caves! Which is why I had made that shader toy thing to begin with. Because I also was trying to replicate minecraft caves.
      belowthestone.com/

    • @GamesWithGabe
      @GamesWithGabe  2 년 전 +2

      Hey Andrew! Sorry about the late response, I read this a few days back but haven't had time to respond. I checked out your game and that looks amazing! Congrats on the kickstarter too, it looks like it was well deserved :). Once I start diving into the procedural generation I may reach out to you guys if I have some questions, best of luck!

  • @arjunkamath1222
    @arjunkamath1222 2 년 전

    gr8 explaination, even the person with no technical background will be able to understand it, thanks to you !!

  • @FelineDeskFan13
    @FelineDeskFan13 년 전 +1

    From the second I clicked on this vid, that classic Minecraft music gave me an instant wave of nostalgia.

  • @MightyDantheman
    @MightyDantheman 3 년 전 +4

    It might be way too late now, but I want to learn more about how Minecraft's systems work. I'm trying to develop something similar (probably nowhere near as advanced), and I'm still stuck on some of the more basic parts. Perlin noise and terrain generation is simple enough, but I got stuck when it comes to biomes. It doesn't seem like Minecraft does the basic height map + temperature/humanity, at least not anymore, so how to they define the shape of the biome? In addition, how would you even find the border? Then there's also the issue of interpolation between biomes as to not have odd sudden changes in terrain generation, though I think that will be simpler to solve after figuring out biome generation.
    Edit:
    After rewatching this and thinking about things for a bit, I think I might have figured something out. I have yet to actually attempt it yet though.

    • @GamesWithGabe
      @GamesWithGabe  3 년 전 +3

      Hey MightyDantheman! Biomes were something I struggled with when I tried to recreate Minecraft as well. I never ended up with a solution though, so in this video I described what I could find on the Minecraft wiki, and from what I understand they did change up the method from using a temperature/humidity map, but they never described the new method. Hopefully you can come up with a good system though!

    • @auxencefromont1989
      @auxencefromont1989 2 년 전

      i think its just the a chunk by chunk check of the temperature x humidity perlin noise map, like that you get a perlin nois-y biome shape