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

Поділитися
Вставка
  • Опубліковано 21 лис 2024

КОМЕНТАРІ • 2,8 тис.

  • @GamesWithGabe
    @GamesWithGabe  2 роки тому +2813

    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 3 роки тому +15707

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

  • @habibishapur
    @habibishapur 3 роки тому +5599

    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 3 роки тому +93

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

    • @noxmore
      @noxmore 3 роки тому +6

      True.

    • @botondnovoth1027
      @botondnovoth1027 3 роки тому +25

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

    • @etodemerzel2627
      @etodemerzel2627 3 роки тому +3

      @@botondnovoth1027 That's a great idea.

    • @marsimplodation
      @marsimplodation 3 роки тому +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

  • @The_Horizon
    @The_Horizon 3 роки тому +13185

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

    • @altaykarabukaev3736
      @altaykarabukaev3736 3 роки тому +579

      another comment from the same verified youtuber

    • @Assassin_Droid
      @Assassin_Droid 3 роки тому +222

      Rip performance

    • @Assassin_Droid
      @Assassin_Droid 3 роки тому +61

      By the way, when new video?

    • @nighteule
      @nighteule 3 роки тому +416

      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

    • @ESS284
      @ESS284 3 роки тому +395

      ​@@quickstergamestutorialsgam3899 Ahhh you're just showing that you don't really 'get' Java. "Even back in 2009" is a redundant statement, performance has improved over time not gone backwards after all. Where do you you think Minecraft would be without cross-platform and more importantly *mods*? Nowhere, and the mod's were possible in the early days precisely because the server and client were Java based. Deep functional mods from the start not cosmetics.
      Additionally, Bedrock was a choice, made many years after the game's inception, the other choice would have been to port the JVM to any target platforms (xbox and playstation mainly). Bedrock was created to mass market the game on primarily non X86 platforms. So it's pretty backwards to say "if the game was written in c++ from the beginning" when Notch wouldn't have been able to do so anyway and considering the fact that it's always run fine on decent PCs.
      Microsoft *could* have ported the JVM but they wanted to sell you the game again. Notch sold hundreds of thousands of perpetual licenses for 'Minecraft' the game also, I wonder if that factored in. (I bought one in 2010 or 11).

  • @DrUrlf
    @DrUrlf 2 роки тому +2231

    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.

    • @Ben.N
      @Ben.N 2 роки тому +36

      With I still had my old PE world 😔

    • @michaeltagor4238
      @michaeltagor4238 2 роки тому +50

      @FutureMii 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 роки тому +27

      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

    • @utpalsavaliya761
      @utpalsavaliya761 2 роки тому +4

      365th like!

  • @Sk1erDev
    @Sk1erDev 3 роки тому +4752

    As a full time Minecraft modder, the game is astonishing

    • @Nugcon
      @Nugcon 3 роки тому +20

      Skier be pogging tho

    • @daniyil4843
      @daniyil4843 3 роки тому +25

      How can I become a full time modder

    • @Falaxuper
      @Falaxuper 3 роки тому +186

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

    • @XanTheDragon
      @XanTheDragon 3 роки тому +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 3 роки тому +26

      The hell is a full time modder

  • @bluesillybeard
    @bluesillybeard 3 роки тому +2162

    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 3 роки тому +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 3 роки тому +248

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

    • @morganlak4337
      @morganlak4337 3 роки тому +141

      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 3 роки тому +104

      @@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 3 роки тому +14

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

  • @theducktator4699
    @theducktator4699 3 роки тому +1484

    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 3 роки тому +50

      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 3 роки тому +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 UA-camrs 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 3 роки тому +126

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

    • @zyansheep
      @zyansheep 3 роки тому +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 3 роки тому +2

      Thats not really true

  • @cucginel1941
    @cucginel1941 2 роки тому +1186

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

    • @AbdusSalam-ll1yp
      @AbdusSalam-ll1yp 2 роки тому +76

      Did you look up to notch as a god? 😂

    • @yyhhttcccyyhhttccc6694
      @yyhhttcccyyhhttccc6694 2 роки тому +57

      abdus you mortal cant even imagine notches power...

    • @hiimapop7755
      @hiimapop7755 2 роки тому +37

      @@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 2 роки тому +46

      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 2 роки тому +6

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

  • @Cyclically
    @Cyclically 2 роки тому +691

    One correction I'd like to point out in 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. While it definitely was used by the earliest versions of Minecraft, the method in which they use those heightmaps is a little bit different.
    To be exact, by stacking layers of noise at different scales to create more variability in the terrain. In a devlog by Notch himself, he had multiple 2D Perlin 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 a great advantage of being very fast as there was just 16*16*(noiseNum) samples per chunk to generate, but had the disadvantage of being rather dull - there was no way for this method to generate overhangs, cliffs or canyons.
    So Notch switched the terrain generation system over into a similar one based off 3D Perlin 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. Achieved 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 visibly notice myself when I was messing around with it. Ken Perlin addressed all of these 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 could use it without Ken Perlin's consent. So 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 it's 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, a little rant: I'd like to clarify more that it isn’t just a single correction I really wanted to point out, but that this video is just technically flawed because it has been dumbed down to entertain casual viewers to the point of clickbait.
    Some of the concepts explained in the video are either too simplified that it’s become inaccurate or wasn’t even correct in the first place. Every technical aspect of the game that he wanted to bring out are all 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 epic minecraft coder modder with 99 years of experience” couldn't even notice a single thing wrong over how simplified this is, such as the noise terrain generation part - a topic I researched and worked on for fun in ONLY a week, back in 2019 (when I was literally 12).

    • @crazydoomy
      @crazydoomy 2 роки тому +12

      neko noise

    • @themalaysiandude3903
      @themalaysiandude3903 2 роки тому +9

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

    • @happysmash27
      @happysmash27 2 роки тому +48

      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 роки тому +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 2 роки тому +10

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

  • @Nonsense116
    @Nonsense116 3 роки тому +621

    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 3 роки тому +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 роки тому +3

      @@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 2 роки тому

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

  • @TapL
    @TapL 3 роки тому +3255

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

  • @brickman409
    @brickman409 3 роки тому +653

    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 2 роки тому +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 2 роки тому +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

    • @shaydenprime275
      @shaydenprime275 2 роки тому

      Noone asked

    • @kapa_nitori
      @kapa_nitori 2 роки тому +1

      Simple on the outside, complex in the inside.

    • @Grymyrk
      @Grymyrk 2 роки тому +1

      It IS a simple game though. Technically simple in the context of computer graphics. These technical "feats" are problems that were solved way before Minecraft was created and are solved all the time by experts in the industry.

  • @trayambakrai
    @trayambakrai 2 роки тому +7

    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 роки тому +3

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

  • @Imaproshaman7
    @Imaproshaman7 2 роки тому +30

    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!

  • @epimolophant
    @epimolophant 3 роки тому +431

    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 3 роки тому +48

      "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 3 роки тому +27

      @@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. 3 роки тому

      ​@@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 3 роки тому +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.

  • @OperationDarkside
    @OperationDarkside 3 роки тому +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 3 роки тому +19

      Haha!

    • @herscher1297
      @herscher1297 3 роки тому +4

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

    • @irok1
      @irok1 3 роки тому +33

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

    • @muuubiee
      @muuubiee 3 роки тому

      How did it not seem complicated?

    • @OperationDarkside
      @OperationDarkside 3 роки тому +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 роки тому +2469

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

    • @GamesWithGabe
      @GamesWithGabe  4 роки тому +212

      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 3 роки тому +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  3 роки тому +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 3 роки тому +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 3 роки тому

      I agree.

  • @Awesomeplayer98
    @Awesomeplayer98 Рік тому +1

    The video is the main inspiration for my "How Minecraft Works" series

  • @odw32
    @odw32 2 роки тому +2

    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.

  • @SKRUBL0RD
    @SKRUBL0RD 3 роки тому +45

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

  • @darklions8885
    @darklions8885 4 роки тому +195

    The quality of this video is amazing.

    • @GamesWithGabe
      @GamesWithGabe  4 роки тому +6

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

    • @davidgumazon
      @davidgumazon 4 роки тому +5

      @@GamesWithGabe Amazing Antvenom-level Quality content :D

  • @skii_mask_
    @skii_mask_ 3 роки тому +40

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

  • @deusexaethera
    @deusexaethera 3 роки тому +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 2 роки тому

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

  • @KatieDawson3636
    @KatieDawson3636 2 роки тому +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.

  • @Noobmaster_x69
    @Noobmaster_x69 4 роки тому +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  4 роки тому +3

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

  • @lucasfrost4064
    @lucasfrost4064 3 роки тому +700

    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 3 роки тому +21

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

    • @viciousmagician4567
      @viciousmagician4567 3 роки тому +15

      Technically they use both

    • @connorjones1992
      @connorjones1992 3 роки тому +91

      @@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 3 роки тому +8

      John lin's game is a better example of voxels

    • @Mart-E12
      @Mart-E12 3 роки тому +10

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

  • @amagicmuffin1191
    @amagicmuffin1191 3 роки тому +543

    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 3 роки тому +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 3 роки тому +14

      Minecraft java edition that is

    • @jamo8154
      @jamo8154 3 роки тому +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 3 роки тому +12

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

    • @DamageMaximo
      @DamageMaximo 3 роки тому +4

      optifine master of all mods

  • @bkr.studio
    @bkr.studio 3 роки тому +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.

  • @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!!

  • @TheDolphiner
    @TheDolphiner 3 роки тому +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 3 роки тому +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 3 роки тому +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

    • @GemstonePhilosophy
      @GemstonePhilosophy 3 роки тому +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.

  • @BlackJar72
    @BlackJar72 3 роки тому +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 3 роки тому +2

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

    • @BlackJar72
      @BlackJar72 3 роки тому +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.

  • @AupriProductions
    @AupriProductions 3 роки тому +9

    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

  • @only_bits2719
    @only_bits2719 3 роки тому +21

    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 3 роки тому +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

  • @Garfield_Minecraft
    @Garfield_Minecraft Місяць тому +1

    the amount of details minecraft has I can't imagine that it would take this long

  • @arpita1shrivas
    @arpita1shrivas 3 роки тому +25

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

  • @pauljs75
    @pauljs75 3 роки тому +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 3 роки тому +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

  • @FreeRoger
    @FreeRoger 3 роки тому +285

    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  3 роки тому +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 3 роки тому +31

      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 3 роки тому +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 3 роки тому +16

      I wouldn’t call Minecraft’s code extremely flawed

    • @FreeRoger
      @FreeRoger 3 роки тому +4

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

  • @FelineDeskFan13
    @FelineDeskFan13 2 роки тому +1

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

  • @miladdy
    @miladdy 3 роки тому +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.

  • @InverseOfficial
    @InverseOfficial 3 роки тому +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  3 роки тому +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 :)

  • @Merthalophor
    @Merthalophor 3 роки тому +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

  • @ratboychase
    @ratboychase 4 роки тому +30

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

    • @GamesWithGabe
      @GamesWithGabe  4 роки тому +1

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

  • @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 😁.

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

  • @nickleslicka
    @nickleslicka 3 роки тому +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!

  • @JMPDev
    @JMPDev 3 роки тому +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  3 роки тому +6

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

    • @vast634
      @vast634 3 роки тому +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 3 роки тому

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

  • @user-zo5xg5hh5f
    @user-zo5xg5hh5f 3 роки тому +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!

  • @pmurph1
    @pmurph1 3 роки тому +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 3 роки тому

      Subbed and bell rung.

  • @x86_architecture10
    @x86_architecture10 2 роки тому +5

    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.

  • @mbcommandnerd
    @mbcommandnerd 3 роки тому +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 3 роки тому +1

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

    • @osasunaitor
      @osasunaitor 3 роки тому

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

  • @NicholasBrakespear
    @NicholasBrakespear 3 роки тому +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 3 роки тому +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 3 роки тому +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.

  • @ItsSunnyMonster
    @ItsSunnyMonster 3 роки тому +34

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

    • @GamesWithGabe
      @GamesWithGabe  3 роки тому +1

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

  • @jaimytourigny3027
    @jaimytourigny3027 2 роки тому +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!

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

  • @DonnaPinciot
    @DonnaPinciot 3 роки тому +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.

  • @TrabberShir
    @TrabberShir 3 роки тому +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.

  • @gentworm2377
    @gentworm2377 3 роки тому +5

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

  • @ismael8926
    @ismael8926 2 роки тому +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

  • @Jxllen.
    @Jxllen. 2 роки тому

    This video is a great educator on how Minecraft isn’t a simple and easy to create game just because of how it looks, great video fr !

  • @noury3628
    @noury3628 4 роки тому +4

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

    • @GamesWithGabe
      @GamesWithGabe  4 роки тому +1

      Thanks Noury! I appreciate the feedback :)

  • @pixelpastiche
    @pixelpastiche 3 роки тому +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

  • @Astra3yt
    @Astra3yt 2 роки тому +6

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

  • @LuckySparkles
    @LuckySparkles 3 роки тому +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. :)

  • @coreylyman1232
    @coreylyman1232 2 роки тому

    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

  • @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 2 роки тому

      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 2 роки тому +4

      Never heard of WoW?

    • @Oscar-vs5yw
      @Oscar-vs5yw 2 роки тому +1

      @@Adaephonable no, no I have not

    • @capitalistball2924
      @capitalistball2924 2 роки тому +1

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

    • @axrah8406
      @axrah8406 2 роки тому +7

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

  • @edriandumaguit563
    @edriandumaguit563 3 роки тому +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.

  • @Survivalist_Redo
    @Survivalist_Redo 3 роки тому +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 3 роки тому +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

  • @kevinxin1545
    @kevinxin1545 2 роки тому

    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.

  • @hayatealt7040
    @hayatealt7040 3 роки тому

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

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

  • @Leo-qe1uu
    @Leo-qe1uu 2 роки тому +3

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

  • @crazydragy4233
    @crazydragy4233 2 роки тому +3

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

  • @NeesyPlaysGuitar
    @NeesyPlaysGuitar 2 роки тому

    So that little screen that comes up when you're loading a seed is real time computation being represented by a miniaturized top down map. Genuinely cool.

  • @EpochIsEpic
    @EpochIsEpic 2 роки тому +1

    What an elegant solution to all these problems. Super cool to learn about

  • @Flaroon
    @Flaroon 4 роки тому +8

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

    • @GamesWithGabe
      @GamesWithGabe  4 роки тому +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? :)

  • @tristanwegner
    @tristanwegner 3 роки тому +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 3 роки тому

      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.

  • @MrJPEzra
    @MrJPEzra 3 роки тому +28

    Watching this video filled me with memories of early Minecraft when things were still being designed. New biomes would drop and everyone would be so excited to play in it. I miss old minecrat it was exciting now it’s just a thing that is and there no new excitement really. It’s still fun just not alpha beta fun

    • @lilfluff758
      @lilfluff758 3 роки тому +9

      i suggest you play the new update that just came out. max height was increased and depth was also increased. massive mountains now and massive deep caves with multiple layers. im having the most fun ive had since villages were first put in the game

  • @medium-rare-bear7155
    @medium-rare-bear7155 2 роки тому

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

  • @arjunkamath1222
    @arjunkamath1222 3 роки тому

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

  • @Andrew90046zero
    @Andrew90046zero 3 роки тому +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  3 роки тому +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 3 роки тому

      @@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  3 роки тому +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!

  • @Chevifier
    @Chevifier 3 роки тому +5

    We need to really iterate on that genius lighting method. Make it more realistic while running pretty much the same

    • @mbcommandnerd
      @mbcommandnerd 3 роки тому +1

      That’s called Complimentary Shaders*. They pretty much already did it in that shaderpack. It runs at the speed of light while still making Minecraft look 100x better than it already does!
      *This comment is not sponsored by the creators of the Complimentary Shaders, not that they would sponsor anyone anyways.

    • @Chevifier
      @Chevifier 3 роки тому +1

      @@mbcommandnerd Those are shaders that already exist elsewhere what im talking about is the way the original Minecraft lighting worked.

    • @xybersurfer
      @xybersurfer 2 роки тому

      @@Chevifier what's the difference?

  • @vagraadam
    @vagraadam 3 роки тому +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.

  • @hegworks
    @hegworks 2 роки тому

    And you didn't even get into how all the data is being stored and loaded! That would need a separate video of its own, I guess. Thank you for this one, though. It was so informative

  • @alexbrandt8927
    @alexbrandt8927 2 роки тому

    I've been playing this game for years and thinking why didn't someone come up with this idea sooner it's so much fun and such a simple idea. Well just like normal its simple on surface level only. Thanks for shedding light on what went into making the best selling game of all time

  • @garveziukas
    @garveziukas 3 роки тому +12

    While this is informative and interesting, technical complexity of Minecraft is nowhere near the modern triple A games that we take for granted. Implementing Perlin noise is a lot easier than it might seem, not rendering what you cannot see is de facto standard in any modern video game, and the lighting problem is incredibly simple compared to mind boggling calculations for lighting they do in modern games like ray tracing which is only one part of the entire lighting solution. Don't get me wrong, it's an impressive game nonetheless but the true marvel of Minecraft is that they optimised it enough to run well on Java which is really not meant to be used for anything like this.

  • @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!

    • @AuxenceF
      @AuxenceF 3 роки тому

      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

  • @timtmtm7689
    @timtmtm7689 3 роки тому +22

    Time to get hated, as Minecraft Server Owner and Mod Developer its really hard to agree with the title of this video, yes, the game is impressive, even tho the tech used by minecrat was nothing new, and it is far from flawless. Oh and please dont think i hate the game or something, i love it, i spend hours each day working with it, but the fact that it used to be a small indie game really shows, the code often is a huge mass or weird spaghetti code and cheap/hacky fixes for their problems, the many iterations and changes minecraft has gone through all left a mark on the code. Bringing examples here is difficult without getting too technical, but just start with the fact that so many things still to this name a refered by completly different names in the code than in game, like Sugarcane still being called Reeds in the code etc. Tho the client has its issues, the server code is far worse, ignoring all the exploits that constantly get found as a result of the ammount of possibilites that the players have, it has one major problem, mutlithreadding/ multicore processing is basicly non existing in the vanilla minecraft server, making it extremly hard to run larger servers with more than 100 players one one map. Imo it is sad that everyone who wants to run a server needs to fall back to some third party server like bukkit/spigot/paper etc.
    On top of that, all the "technical feats" achieved by minecraft are nothing new, backface culling, procedural terrain generation, voxel rendering is nothing new, there have been tons of games before minecraft that managed to implement these things, i mean just look at infiminer, its a game about collecting resources in a world made from blocks that is procedurally generated. Kinda reminds me of minecraft huh, too sad that it was released before minecraft

    • @xXJ4FARGAMERXx
      @xXJ4FARGAMERXx 3 роки тому +2

      I'm surprised that a game this large doesn't support multi-threading.

    • @voxelrifts
      @voxelrifts 3 роки тому

      @@xXJ4FARGAMERXx It does actually. It just doesn't use multiple cores. There's a difference

    • @xXJ4FARGAMERXx
      @xXJ4FARGAMERXx 3 роки тому

      @@voxelrifts what's the difference between a core and a thread? How many cores does a thread have? How many threads does a core have? /gen

    • @SerBallister
      @SerBallister 3 роки тому

      @@xXJ4FARGAMERXx If a program uses multiple threads the OS (Windows/etc) is the one that will spawn them onto different cores. The app itself mostly doesn't get a choice in this, its the OS doing the load balancing

  • @bovax6259
    @bovax6259 2 роки тому

    I honestly didn't need a programming class or an example lesson on how complicated this game was to make. I have taken 2 programming classes in my time ( hated both. My mind doesn't think that way ) but playing this game for 10+ years myself I've understood how complicated every variable, aspect, light source, block placement, algorithm its been for Notch and his crew to create this fabulous and fascinatingly replayable game over the years.
    It's a work of art if you ask me.
    Aside from already knowing how generally complicated this game was to make, this vid did help some background curiosity I would have never known and has just made me smile even wider at the amazement of it, the complexity of it and the fact that this game really does transcend generations. My mom plays this game for general enjoyment.

  • @BorntoBuild
    @BorntoBuild 3 роки тому

    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.

  • @MooneLightEntertainment
    @MooneLightEntertainment 2 роки тому +3

    I don't see what's so remarkable about Minecraft

  • @PikaPetey
    @PikaPetey 3 роки тому +3

    Neat!!

  • @Wylie288
    @Wylie288 3 роки тому +8

    A technical feat? There is absolutey zero reasons it should perform as badly as it does or even use a fraction of the memory that it does. Its one of the least optimized games that people actually play. Its literally WORSE than ark.

    • @tamimplayz
      @tamimplayz 3 роки тому

      cry about it

    • @suyogv8235
      @suyogv8235 3 роки тому +1

      Blame Java. Bedrock edition uses c++, so it runs much smoother. Java is the original, and is easily missable, but not very efficient.

    • @suyogv8235
      @suyogv8235 3 роки тому +1

      At least in Minecraft the textures are always basic, unlike in ARK where you have to wait multiple seconds for your thatch hut to actually look like it’s made of thatch.

    • @professionalbozo4396
      @professionalbozo4396 3 роки тому +1

      @@suyogv8235 java is by no means a slow language anymore if written correctly, and the game very clearly has massive performance and optimization issues.

  • @chadomoon
    @chadomoon 2 роки тому

    Guess people forgot how a volume slider works... Thank you for this video!

  • @pranaypallavtripathi2460
    @pranaypallavtripathi2460 2 роки тому

    Wow I never expected a simple looking game would be this complex. Thanks for the explanations.

  • @kieran8266
    @kieran8266 3 роки тому +4

    This problem was already solved by Infiniminer, which Notch admitted was direct inspiration for Minecraft. I hate videos like this. Praising an average-at-best programmer for reinventing the wheel.

  • @GrumpDog
    @GrumpDog 2 роки тому +4

    Honestly, when they changed the Biome-layouts, and stopped using the lookup chart method, I was kinda disappointed.. The new separated-by-river method rarely seems to work right, and now biomes are frequently near each other which shouldn't be, and the river doesn't make it look anymore acceptable IMO. There was something special about those older worlds, that new worlds really seem to lack, even with all their new cave features..

    • @dIancaster
      @dIancaster 2 роки тому +1

      1.8, last good version.

  • @dsmith5940
    @dsmith5940 3 роки тому +3

    Outcast was beautiful - and still is. It speaks for itself, as an approach. I think it’s a weak comparison, to suggest Minecraft and Outcast have voxels in common. The scale of the voxels in relation to the player is so different that Minecraft feels like blocks, tortured into more naturalistic forms at the large scale - inferencing smaller details (and define the functionality of the block), is left to the pixel bitmap on the sides of the block. Whereas, in Outcast, the voxels provide the small details, giving a very organic (albeit ‘melted!’) aesthetic. These voxels do not need to have functional value as the unit blocks on Minecraft do, and they are not ‘for’ sandbox, emergent behaviour. They are for beauty, while in Minecraft the player has to be able to perceive, and utilise, a strictly assigned set of properties to each block-type. The voxel use in Minecraft is a functional necessity, while in Outcast is an aesthetic one.

  • @sterben7656
    @sterben7656 2 роки тому

    thought this was just one of those vids that just says "look at this~ terrain generation very cool" "it uses heat maps, wow"
    but this really goes in depth which is good for extra information on how its really processed compared to just saying it uses terrain generation

  • @KyleHolmes97
    @KyleHolmes97 2 роки тому

    Growing up, I always took this game for granted. I started playing it 10 years ago at the age of 14, and I only had the Xbox 360 version at the time. I had fun with it and enjoyed it, but as the years went on and the updates and different versions rolled out, I never really grasped how much of an amazing product this game is. I always thought that it was a dinky little building game like my Blockland back in the day. But here I am, a decade later with my own Realms, new and old friends to actively play with, with a greater appreciation of this game in general. Something truly special was created for us with the creation of this game.