Creating a Voxel Engine (like Minecraft) from Scratch in Python

Поделиться
HTML-код
  • Опубликовано: 10 фев 2025

Комментарии • 589

  • @mokouu
    @mokouu Год назад +599

    This channel is quite the gem for learning about computer graphics, not only you provide optimal code but also an effective explanation of what we want to program and the logic to achieve it.
    Honestly feels like im stealing just by watching this for free, cant wait for the next tutorial.

  • @Ytemeriku
    @Ytemeriku Год назад +783

    2030: Creating Windows 14 in python

    • @zeezoo4ever
      @zeezoo4ever Год назад +71

      2040: create python engine inside python🐍

    • @Wojtek_1777
      @Wojtek_1777 Год назад +31

      @@zeezoo4ever its already been done

    • @xoxogamewolf7585
      @xoxogamewolf7585 Год назад +28

      2035: Making a simulation of the universe in python from scratch without using the letter E

    • @sawaito
      @sawaito Год назад +16

      From Microsoft import Windows14 😮

    • @xWatexx
      @xWatexx Год назад +5

      That would be the worst operating system of all time ngl

  • @rogercruz1547
    @rogercruz1547 Год назад +255

    I like how you made chunks cubic and not tall because you can tile them vertically now and have more height than in Minecraft

    • @F0g_
      @F0g_ 6 месяцев назад +1

      you can make this in regular Minecraft too with the mod Cubic Chunks 👍

    • @Mystery_Mug
      @Mystery_Mug 5 месяцев назад +3

      @@F0g_yea but it’s in 1.12.2

  • @whupass
    @whupass Год назад +63

    I love your style of making videos. You have adequate explanation of what you're doing but never go into too much depth that you stray away from your workflow. Really interesting to see each project start to form.

    • @sandrinowitschM
      @sandrinowitschM 4 месяца назад +2

      I would like it better without the ai voice. It's really annoying to my ears.

  • @Wallee580
    @Wallee580 Год назад +234

    YES YES YES YES YES YES YES!

    • @judgsmith
      @judgsmith Год назад +15

      My thoughts exactly

    • @matheussousa266
      @matheussousa266 Год назад +22

      Skibidop dop dop dop yes yes yes yes

    • @privatefield.
      @privatefield. Год назад +8

      @@matheussousa266bro💀

    • @zontanemc
      @zontanemc Год назад

      ​@@matheussousa266бро💀

    • @RayaneAtd
      @RayaneAtd Год назад +2

      ​@@matheussousa266 I really had this joke in my mind when I saw the comment 😂

  • @Coloride
    @Coloride Год назад +6

    you dont know how useful this tutorial is and how much you have opened the barrier entry for people like me to make voxel games. thank you.

  • @QuickCodeSnippets
    @QuickCodeSnippets Год назад +14

    incredible work! thanks so much! its so fun to play around with your code to visualize world generation through noise

  • @LegoDinoMan
    @LegoDinoMan 10 месяцев назад +1

    Just finished the entire tutorial over the course of a week. I absolutely enjoyed each second, thank you so much for creating a detailed in-depth tutorial on this topic!

    • @elijahsyers4543
      @elijahsyers4543 9 месяцев назад +1

      @LegoDinoMan If you made a Minecraft copy make a video about it.

  • @HisDivineShadow
    @HisDivineShadow Год назад +8

    Thank you so much for this video! Saw it drop last night and couldn't help but stay up until 1am just working on the first 10 minutes...😅

  • @Temu_ko
    @Temu_ko Год назад +4

    ¡Gracias!

    • @CoderSpaceChannel
      @CoderSpaceChannel  Год назад +1

      ¡Muchas gracias!

    • @Temu_ko
      @Temu_ko Год назад +1

      @@CoderSpaceChannel i sent you a email. It would be awesome if you can take a look at it

  • @lukagarner
    @lukagarner 11 месяцев назад +2

    I've been at this for 4 hours and I'm only 10 minutes in. absolutely insane tutorial, keep it up!

  • @bloom-mania
    @bloom-mania Год назад +7

    damn you made the ambient occlusion convincing

  • @ezequiel6091
    @ezequiel6091 Год назад +6

    It's great that you have made a video of this because I have tried to create voxels on my own and it was never easy to do it on my own, and my level of English is low and it is difficult to understand the forums that talk about this topic.

  • @MrBrineplays_
    @MrBrineplays_ 8 месяцев назад +1

    I'm so happy I finally found a tutorial that actually shows everything and the process of everything and how everything works unlike those other tutorials that just say "just put this and that and you're done, I'm not gonna explain it because it'll take too long to explain". You earned a like and a sub!

  • @alexandrepv
    @alexandrepv Год назад +8

    Holy mother of coding... a one hour tutorial! Mate, thank you :D

  • @pooch2176
    @pooch2176 Год назад +3

    I really appreciate fact that you named this video Creating Voxel Engine not Creating Minecraft. I know that it's silly to be bothered by such thing but there is a lot more in Minecraft than just destroyable blocks

  • @Huhhh0.0
    @Huhhh0.0 Год назад +6

    Bro I just wanted to say they your channel is so underrated (I know really cliche to say this but it’s true), the things you have made have learnt me so so much. Ty for this!! ❤

  • @SuperGrimmy
    @SuperGrimmy Год назад +24

    I have a voxel engine with a different approach. Storing chunks in a single texture array (single byte value for the material id). This is of course using more memory adding some limitations, but it adds other possibilities like doing chunk reduction in transform and compute shaders. From the texture data I can compute all the reduced chunks into a single vbo and render all the chunks using indirect rendering. It also adds a lot of possibilities for lighting since you can step through the chunk data in the texture using bresenham to add some farily impressive lighting since you can cheaply cast rays. There are probably several other ways you can approach it. The goal was to keep things pure python (no numba) as a challenge.

  • @Zitr022
    @Zitr022 Месяц назад

    This is really good, I'm not even using python, yet from your clear explanation I can use the concepts and turn it into c++, Thanks, one of the best guides I've seen.

  • @Hyjk87
    @Hyjk87 Год назад +5

    Bro, you are the chaddesd python programmer that I've ever known! GG and thank you for sharing!

  • @zactalina123
    @zactalina123 Год назад +4

    The best person who does such cool things using the Python language!

  • @eddiechung675
    @eddiechung675 Год назад +1

    This is such a nice relaxing break from tiktok or shorts

  • @jumbledfox2098
    @jumbledfox2098 Год назад +13

    Love your videos, currently implementing my own in Rust and a lot of your code has come in really handy to help me understand certain things, like ambient occlusion!!

  • @delphicdescant
    @delphicdescant Год назад +79

    I was going to leave a comment about how you're supposed to pick a *faster* language than Java when making a minecraft clone, not an *even slower* language, but wow, Numba JIT has really changed the game for Python. That's awesome.
    I also love how, in a Python video, you unabashedly approach bit twiddling without scaring away the high-level programmers. You've done an amazing job teaching this stuff.

    • @rian0xFFF
      @rian0xFFF Год назад +11

      C/C++ saved Python from slowness

    • @MrFram
      @MrFram Год назад +16

      Java won't slow down your GPU, so the low performance of MC is just due to poor design. Case in point: look at all the optimization mods for Java MC and how much better then can improve performance without ever touching another language

    • @MrFram
      @MrFram Год назад +3

      Java only really becomes a problem on servers where there is an actual CPU bottleneck, and even then having a single-threaded design is a much bigger issue

    • @thedoctor5478
      @thedoctor5478 Год назад

      C underpins all the things anyway, so, whatevs@@rian0xFFF

    • @Scotty-vs4lf
      @Scotty-vs4lf Год назад

      @@MrFram java is still a shit language lol

  • @verdantblast
    @verdantblast Год назад +2

    Very detailed, it will take me two weeks to digest.
    Thank you!

    • @LionKimbro
      @LionKimbro 5 месяцев назад

      In my imagination, it took this guy just 1 hour and 20 minutes to conceive of and write this voxel engine. (And not to mention -- make a video about doing it, at the same time.)
      It's truly humbling.

  • @alexanderdavidportilloolme6751
    @alexanderdavidportilloolme6751 Год назад +5

    Finally, what I always wanted. You are a programming beast

  • @Twingamerdudes
    @Twingamerdudes Год назад +15

    This is the first video to get me to understand opengl.

  • @2spooky2play66
    @2spooky2play66 Год назад +5

    every time i see your notification i know i’m going to see something amazing

  • @cheeseman_93
    @cheeseman_93 Год назад +1

    it's great, I myself want to write 3d games from scratch in different languages, but now I understand how much I need to know

  • @illoprin
    @illoprin Год назад +1

    Stanislav, you are a genius! Your guides on OpenGL and Python should include videos on youtube in the golden fund. I have very rarely found authors who write such clean code. And most importantly, you bring projects to completion. I'm learning numpy, numba and opengl from your tutorials. Thank you very much for this work!)

  • @ИванНефедов-я2э
    @ИванНефедов-я2э Год назад +9

    Это великолепно!!! Спасибо за труд. Узнал много всего нового!

  • @gabrielbernardo7959
    @gabrielbernardo7959 Год назад +10

    Amazing content ! Incredible class about how to create 3d voxel engine, so easy to understand and comprehend, thank you for your time and dedication to this video! I learnt a lot!

  • @Frieren_Lienel
    @Frieren_Lienel 11 месяцев назад +3

    Th way everything is shown, makes me nostalgic of the simpler minecraft days

    • @hillybankok
      @hillybankok 4 месяца назад

      if you look at minecraft alpha+beta, there isnt any ambient occlusion involved

  • @AmineGM73
    @AmineGM73 Год назад +2

    I really like your tutorials ,Doom ,3d rendrer. keep it up 👍

  • @morksan9973
    @morksan9973 Год назад +1

    Great respect for using Moxxi's bar theme. Borderlands 2 is an amazing game!

  • @Phrozends
    @Phrozends 8 месяцев назад

    Incredible! This is pure gold! Thank you for sharing in such a wonderful fashion.

  • @zhabiboss
    @zhabiboss Год назад +3

    When the world needed him the most, the king returned.

  • @highfestiva
    @highfestiva 9 месяцев назад

    Balanced, highly technical, extremely well made - I'm super impressed! Also thankful for this hands-on intro to shaders, soooooo much better than the basic tutorials! ❤🎉
    Also: don't be a chicken - show your face and use your voice, I'm sure ppl will love it! GL!

  • @serenaally
    @serenaally Год назад

    Thank you! I'm about to finish a 10 month long boot camp and this will be a great project to keep my mind going. I love minecraft so thank you so much.

  • @petrus4
    @petrus4 Год назад

    The level of competence displayed here is very impressive, and appreciated.

  • @viniciusfs
    @viniciusfs Год назад

    One of the best game programming video I ever watched. Thank you!

  • @stefanoc5099
    @stefanoc5099 Год назад +2

    this truly is high level stuff... you deserve way more viewers

  • @idedary
    @idedary Год назад +5

    This is an amazing tutorial. I myself am dabbling in voxel game creation, can't wait to try out these things in Rust by myself!

  • @joshscott3271
    @joshscott3271 Год назад +2

    This is beyond me but it is relly cool. Winning!!!

  • @Temple_Cloud
    @Temple_Cloud 8 месяцев назад +1

    Another week over, another Coder Space tutorial consumed! Again, totally brilliant as usual.
    I recommend this (and the articles referenced) for those interested in creating their own Minecraft / Voxel worlds. Don't believe me? The read all the comments! Provided you know how to program, this is the real deal as a primer.
    Thanks Coder Space!

  • @ryozukojima
    @ryozukojima 3 месяца назад

    If you had told me you could program a Minecraft style voxel engine in Python and get good framerates, I'd have called you insane. This video is insanely good.

  • @balugantibalu2300
    @balugantibalu2300 3 месяца назад

    Thanks for help I used it for school projects and sir was praised

  • @None-p7y
    @None-p7y 11 месяцев назад

    This guy is a god of programming, look how fast he types! And no errors!

    • @None-p7y
      @None-p7y 11 месяцев назад

      He just knows. Like whoa, I wish I could think things through so clearly. What a chad!

    • @Moonix7
      @Moonix7 11 месяцев назад

      Most of the time peoples who make tutorials and stuff, they usually create a project on their own and then pretty much copy off the other project or base the project off of it.

    • @None-p7y
      @None-p7y 11 месяцев назад +1

      @@Moonix7 This one was machine typed and preprogrammed, but... thought it'd be funny to act like it's legit. r/woosh :P

  • @highfestiva
    @highfestiva 9 месяцев назад

    Thanks

  • @majorsquidgaming6965
    @majorsquidgaming6965 Год назад

    yess i have been addicted to these kind of videos for years!

  • @IvanPopelyshev
    @IvanPopelyshev Год назад

    Welcome to minecraft-clone creators club! ) texture-array usage is a good idea!

  • @duckyblenderold
    @duckyblenderold Год назад +3

    This video is a gem, thanks so much!

  • @timflatus
    @timflatus Год назад

    Cool. I had assumed python wasn't fast enough to make a voxel engine. Very pleased to be proven wrong.

  • @dietrichgutschow
    @dietrichgutschow Год назад +3

    I have been trying to make a voxel engine for so long bit was failing due to preformance problems, as i did not know hoe to implement gpu instancing
    Thank you so much

  • @shadow_blader192
    @shadow_blader192 9 месяцев назад +3

    I am rewatching this ❤

  • @autozone5335
    @autozone5335 Год назад +5

    Thanks for your effort 👍👍👍

  • @subarunatsuki1902
    @subarunatsuki1902 9 месяцев назад

    This is art. I'm still at a beginner level, but I know how beautifully this code is written. The video is a bit complex for me at the moment, but I'd love to hear about any resources I can learn from :D

  • @heyheyjc
    @heyheyjc Год назад +1

    This channel is shockingly good.

  • @DandoPorsaco-ho1zs
    @DandoPorsaco-ho1zs Год назад

    Absolutely AMAZING!
    This is, by far, the most incredible programming channel in RUclips.

  • @bowarc
    @bowarc Год назад +2

    Insane video, as always

  • @Imbomania
    @Imbomania Год назад +8

    Сижу, ковыряюсь в Панда3д, и иногда прям мозга не хватает, и появляется желание выбросить комп в окно и повешать себе на шею табличку "тупица". Спасибо, что вдохновляешь продолжать разбираться и идти дальше! :D

    • @lightingzr
      @lightingzr Год назад +3

      Никогда не сдавайся и продолжай идти! Мы все должны получать удовольствие от программирования!

  • @zaroff7022
    @zaroff7022 Год назад

    Thank you so much. You can learn a lot of game development and graphics engineering from this.

  • @EidRos
    @EidRos 5 месяцев назад +1

    This Video is a true Gem !❤❤ atleast for me

  • @__codima__
    @__codima__ Год назад +7

    xD Hahahaha ... this is so good ... how many jokes and aprils fools on "minecraft in python" are out there on youtube and now here it is at 400 FPS ...
    There was a time when many people believed to would have benefited a huge performance boost if the original Mincraft would have just been implemented in c or c++ instead of java.
    I think this video demonstrates very well that this topic is way more involved, complex and non-linear than "just write stuff in c++ == bost boost boost".

  • @2kokolada2
    @2kokolada2 Год назад +1

    Watching you from Isreal❤

  • @BieAnimation
    @BieAnimation Год назад

    bro, thank you so much for sharing the code! i'm very excited to start the project

  • @theartofhacking6896
    @theartofhacking6896 Год назад +2

    Thanks for the amazing video.

  • @MrJay_0xJ
    @MrJay_0xJ Год назад +1

    this tutorial was new for me and very nice

  • @pvini07BR
    @pvini07BR Год назад +3

    i really wanted to know how a voxel engine is made, i couldn't find any good tutorial on the internet... although i don't recommend coding this sort of thing on python, it is still a good tutorial about how this stuff works. great job. all i need now is patience to even be able to code all of this, specially on a low level language.

  • @alpcetinkaya3656
    @alpcetinkaya3656 Год назад +2

    Amazing content. Thank you

  • @anchs2501
    @anchs2501 Год назад

    Very good yes may the gods of the realm of the Minecraftness of this existence bless you

  • @JosephJoestar_420
    @JosephJoestar_420 2 месяца назад

    Minecraft isn't a Voxel game, but still mad respect bro! Now do it in assembly

  • @superspak
    @superspak Год назад +2

    This channel is a goldmine, keep up the great work. I am a mechanical engineer interested in learning pandas and other tools, and this is a great help to understanding programming framework. And also best practices such as adding comments to understand the algorithms 😁

  • @logosking2848
    @logosking2848 Год назад +17

    A real, heavily filtered voice is like 10x better than AI voices.

    • @thesenamesaretaken
      @thesenamesaretaken 5 месяцев назад +1

      I have to agree, even if it's a chain-smoking Indian with the strongest accent in the world who sprinkles his English with random Hindi slang or something, I think I'd prefer it to an AI voice. But maybe I'm old fashioned.

  • @amegaplay3044
    @amegaplay3044 Год назад

    Thanks for the video! When I saw the preview, I was mostly interested in how they hell will Python give a reasonable FPS. It's just slow, and it's method invocations are extremely expensive. But now I know about numba. Actually, I'm happy I discovered your channel. Looks like there is a lot I can learn about OpenGL.

  • @6Abdellah9
    @6Abdellah9 9 месяцев назад

    u my man have just earned yourself another subscriber and a like

  • @_ErlGrey
    @_ErlGrey Год назад

    My brain starts slowly melting as I approach the end of a video.

  • @danielh.nova6729
    @danielh.nova6729 Год назад

    I take my hat off, awesome work

  • @stcpimus
    @stcpimus 10 месяцев назад

    Hi from Colombia : This is really great work. Now im trying implement the ray marching width this.

  • @jiffey_faux
    @jiffey_faux Год назад

    Only took 11 minutes for an insta-sub :D. Nicely done.

  • @RacePace16
    @RacePace16 Год назад

    Huge respect for you, thanks that you share your knowledge with us, very, very educational and perfectly explained video. Your channel ist part of the most important content of entire RUclips….

  • @AzaB2C
    @AzaB2C Год назад

    Dude!!! This is awesome, hoping to use this and your other videos to inspire my kid to learn Python instead of just playing Minecraft. Cheers!

    • @ipigtaiwan
      @ipigtaiwan Год назад +1

      im playing minecraft while learning python, golang, java

  • @Wyklepheph
    @Wyklepheph 9 месяцев назад

    People who make tutorials should to put a focus on showing where to get documentation, and encourage people to explore the documentation for whatever they're making a tutorial on while showing the relevant functions/methods/etc. in the documentation when discussing them in the video. Showing the documentation and explaining the inputs/input types while you're using the relevant constructs really solidifies things and gets them used to the workflow of solving problems. This helps beginners learn how to read documentation, and gives them a clear path to enable them to build anything they want and avoid tutorial hell.

  • @rcrist01
    @rcrist01 Год назад +18

    Wow. Best voxel terrain generation engine in Python that I have used. Thanks for sharing this video compilation with very useful optimization techniques explained. Is it possible to have infinite world generation so that the terrain is not just an island.

    • @CoderSpaceChannel
      @CoderSpaceChannel  Год назад +4

      This is of course feasible, but I just did not initially set the goal of creating an infinite world

    • @fabrixd2317
      @fabrixd2317 Год назад

      ​@@CoderSpaceChannelCould you teach us how to place animations for the movement of a character, such as running, jumping, crouching... please

  • @areevzk
    @areevzk Год назад

    What a background song at the start you just reminded me of I heard that song 2.5 - 3 years ago wow

  • @IQwizz
    @IQwizz 5 месяцев назад +1

    This video taught me that the song from Moxxi's Bar in Borderlands is just from some royalty free audio library.

    • @IQwizz
      @IQwizz 5 месяцев назад

      1:00:00

  • @ugljesakuzmanov6220
    @ugljesakuzmanov6220 Год назад +9

    Great work, very dedicated and compressed into 1 hour video, I just wonder how long did it take for you to finish that in real-time?

    • @CoderSpaceChannel
      @CoderSpaceChannel  Год назад +16

      It took about 20 days to make this video

    • @donalddk1987
      @donalddk1987 Год назад

      @@CoderSpaceChannel I can beleave right now I stuck on your doom game like 1h for video 35h for me programming and debuging errors pyhon some times are vanky geting errors on good code but I dont know why but when I past the same code back into sheet everything just starts working perfectly some bugs I guess.

  • @ogfakii9187
    @ogfakii9187 Год назад

    You’re a genius sir. A god damn genius.

  • @adeshgadekar683
    @adeshgadekar683 Год назад

    This week is going to be interesting.

  • @paolo_mrtt
    @paolo_mrtt Год назад +5

    Amazingggg

  • @gamingtitan0
    @gamingtitan0 Год назад

    So awesome ❤❤❤ we love it. Next video a python game engine with UI

  • @GuildOfCalamity
    @GuildOfCalamity Год назад +3

    Very impressive! Would love to see a version in C#

  • @iGavid_Doggins
    @iGavid_Doggins Год назад

    Man this is so beyond me...
    I wanna get to your level of coding one day hopefully my brain.exe is strong enough for that.

  • @tsukimotoX
    @tsukimotoX Год назад

    Never thought someone could make a 3d engine on a 2d engine. Love it man, thanks a lot.

  • @laoAnGame
    @laoAnGame Год назад

    I like the pingball opening music

  • @duality4y
    @duality4y Год назад

    this is super cool, i thought about doing this too

  • @cheese__kimbap
    @cheese__kimbap Год назад

    Nice video!
    Now let's make the red stone mechanism 😂

  • @Misterrabbit64
    @Misterrabbit64 9 месяцев назад +1

    THANKS ❤

  • @ebx
    @ebx 11 месяцев назад

    This video was really useful, I'm learning the same, but on cpp (Wanted to use Go but ended up going with the classic)

  • @joshbarros1995
    @joshbarros1995 Год назад +6

    This looks amazing! I will code along on the weekend!
    Quick question: have you ever used Trenchbroom with pygame?
    I was thinking about creating a Doom Clone, but I would like to have more freedom in creating complex 3D Scenarios.