I made an EVEN BETTER Minecraft
Вставка
- Опубліковано 28 лют 2021
- I tried to make Minecraft even better than I did before.
🛒 Recommended books (on Amazon): www.amazon.com/hz/wishlist/ls...
❤️ Support me on Patreon: / simondevyt
🌍 My Gamedev Courses: simondev.teachable.com/
Disclaimer: Commission is earned from qualifying purchases on Amazon links.
Follow me on:
Twitter: / iced_coffee_dev
Instagram: / beer_and_code
Github: github.com/simondevyoutube/
Here I tried to code Minecraft using JavaScript and Three.js, completely from scratch, to try to fix the problems from the previous implementation.
The goal was to try to improve on the previous version, was was mostly a start project to learn JavaScript and three.js.
In the previous implementation, I used instancing to get around draw call limits and complexity around merging geometry, but this time I just bit the bullet and did the actual work. I move from there by integrating chunking in the world, followed by multithreading using Chrome's module workers extension, which dramatically improved performance. I investigated various ways to texture, wrote custom shaders to atlas all the textures together in a simple way using texture arrays. From there I moved on to using perlin noise for a full, infinite procedural world. Standard perlin noise works great for basic rolling hills, but you need to do operations on it like looping for fractal brownian motion in order to get that detail and different environments.
That gives us a procedural world, from there we covered how to procedurally create foliage using signed distance functions and l-systems, which was covered in a previous tutorial. Finally, we went ahead and used layers of perlin noise to create biomes and different areas in the world, as you see in the video.
Source will is available on github, or will be when I clean it up. If it's not there by the time this is posted, look for an announcement from me either on my community posts or twitter for when the source is available.
Various resources:
Music: www.bensound.com
Inigo Quilez's site is THE reference for stuff like SDF's:
www.iquilezles.org/www/articl...
Demo was a horribly modified version of:
www.shadertoy.com/view/lt3BW2
Model from:
sketchfab.com/3d-models/minec...
AO:
0fps.net/2013/07/03/ambient-o... - Наука та технологія
Patrons can now vote for the next video! Thank you for your support.
❤ Support me on Patreon: www.patreon.com/simondevyt
🌍 Live Demo + Courses: simondev.io
Thank you!
Can you post controls please? ^^
Actually man, this CPU is still rocking as it was the second best for its plattform and DDR3, after the i7-5690X, which was way more expensive. You actually have a really good old CPU under your hood, still using the same - still playing ultra with a gtx 1070 on FHD in every game until 2019. Yes, there is better - but this is definitly not a low-performance CPU. CPU those days have doubled in performance since this day, but that is 7 iterations of CPU design and performance doubling is actually not that much after all those years.
@@puffer4909 Maybe I shouldn't be in a rush to get a fancy new ryzen, really need a better gpu though. That WOULD make a big difference.
Olá cara, como vc aprende? Sou brasileiro e não acho muita informação sobre essas biblioteca.
I love programmers. Knows how to program an entire Minecraft clone, doesn’t know the name for a pick axe. Lol
Hah, what did I call it?
@@simondev758 Not sure if this is exact but it was something like "mining pick thingy" lol
Yeah, I think it is pickaxe altogether.
If he said, and I'm Morgan Freeman. I would 100% believed it.
One guy casually talks and remakes a world majority of gamers are living in all ways better with math and lifelike science. Which result is better then what an esembled team from world biggest cooperation can accomplish.
yeah, he is a real God
Miner's pick thingy
"I'm going to make cubes for the clouds" - ok
"I made a quad and shader for the sun" - OKAYY...
"I made two cubes for the crosshair" - AAAAAAAAA
This is the best way to do it
Yeah the cubes for crosshair was just laziness :(
I think what Nathan Franke is going crazy about is the fact that the clouds are cuboids (not cubes), the sun is a square (a special case of a quad) and the crosshair is 2 rectangles or 2 cuboids (not cubes).
Mathematically it is incorrect to call a shape a cube unless it is convex, only has right angles, and all side lengths are equal. In certein regional dialects it is common to call anything with right angles a cube, but for most of the world, including non-native english speakers, it just sounds utterly insane.
@@Tumbolisu Fair points, but my original comment was poking fun at Simon using 3d shapes for things that should be flat. For the record, i think the sun and clouds make sense, but for the cross hair i think it would be much better to render it directly to the screen using primitive 2d shapes, making it much more versatile.
@@Tumbolisu None of the things in this video are cubes due to the fact that cubes are 3 dimensional by definition. All we can see is a 2d abstraction of the concept of a cube.
Simon, this is amazing! The soft ambient shadows, the trees, the smiling moon landscape, everything! Thanks for sharing this!
No worries, glad you enjoyed it :)
F Miss this shit!
I'd love to see you make this into a full fledged game that is not a clone of minecraft but still based off it like you've been doing.
Don't copy minecraft though just make your own game
@@williamwester223 Why not copy it?
8:33 "Meh, look at that poor tree"
9:22 " *Holy Sh*t What The F*ck* "
4:48 - Look at the madman programming in GLSL in a string within js code, without IntelliSense, linting, auto-formating, or highlighting. like it was nothing.
I got a panic attack just thinking about debugging that.
There’s really no other way to do it. If he put it into a different file, he would have to load it, and JavaScript loads files asynchronously which could make things a lot harder.
Was thinking the same exact thing, like what the hell lol!
@@user-dh8oi2mk4f I also use glsl for my shaders, and instead of writing them in the code i just have another txt file. The code then converts that into a string and loads it up.
Still, i need to code all of it on intuition without any IDE support
Yeah this is wild, not to mention there was no copy paste. This guy is brilliant
About the 4096 height limit thing. 320 is the default height limit, but the game lets you actually change it in the worlds' config, up to 4064 (according to the wiki, that's the limit. It might be a typo and actually be 4096, idk).
Wasn't expecting the SDFs and L-System trees. Very awesome!
ty! I'm glad they worked out, been looking for an application for the l-systems for a while
You're like the Bob Ross of game programming: "...and now we have a little tree thingy." Making it look easy while your voice soothes souls. *c;*
My good sir, you have no idea how much an impact you are having on some people's careers, Including mine.
That's great, I've love to hear more about how this is helping you.
@@simondev758
This looks like optifine's internal shaders.
But great job tho!
Including MINEcraft
É verdade!
Man, not even the Mojang guys fixed this shadow bug when deleting blocks.
Awesome! I started making a minecraft clone in JS a few weeks ago using vanilla webgl 2. Definitely not an easy task. My main challenge was storing the chunks in a way that they can be accessed as quickly as possible and also be saved as in a file that can be loaded again.
Yeah if I was to follow up, that's one area I'd like to improve. Storing a chunk right now is memory intensive, but there's a lot of low-hanging fruit on the table in terms of improving both gpu and cpu memory layout.
This is the greatest minecraft recreation I have ever seen.
Dancing "cubes" to illustrate hollow sides was nice touch to explain the subject, the attention to detail is great! 👍
Simon, you're basically coding ASMR and that's fantastic.
"This Old Tony", but it's game development, coding, javascript...
just found your channel in my recommendations... well, every now and then youtube seems to drop a diamond.
Wow. a lot to learn from you. Really appreciate that mentioning the techniques you are using for the project.
Lemme know if there's areas you want expanded in more depth too.
Seems easy enough!
*10 years later*
I am a failure. 😭
I've pretty much binged a lot of your content here, loving the content!
This is awesome! I love these kinds of videos, making unique versions of Minecraft.
Wow! Well done Simon! I started making a tutorial on how to code minecraft, inspired by your previous minecraft video, and now, you just dropped a thousand more ideas! Thanks a lot! As usual, brilliant video!
Awesome, I remember you building out one from last year. Happy if this gives you a few more ideas to integrate.
This video is fantastic! I wish you would do a playlist, a sort of a three.js tutorial while progressing through different topics creating Minecraft clone as the final result. The work you do here is amazing. It's a bit difficult for me to follow though. I would love to see a series where things are broken down a bit more. That would be awesome!
Great job! I would love to see trees like yours in the official Minecraft. I kinda like having small trees too, but I think a big mix of trees like the ones you made as well as some standard Minecraft trees together would look really cool
You’re a js maniac dude. I’m inspired to learn math and algorithms to really take my js to the next level because of you. Great work!
Really awesome job, Simon! I enjoy the beautiful scene you created so much, and I want to have a try on threejs now.
Go for it! And let me know if you make something
@@simondev758 Absolutely:)
SimonDev: *makes Minecraft clone*
Clippy: It looks like you're making a Minecraft clone.
Pretty amazing stuff! Love your videos man.
thanks!
6:32 - That was a painful copy+paste
Yeah that was pretty gross, 4 nested for loops I think?
Your content is absolutely above and beyond. Thank you so much for taking the time to make these videos.
No worries! If you have suggestions for future videos, let me know
first time seeing your channel, and I'm super impressed! subscribed!
Awesome as always, Simon! :D
The trees are superb!
Yeah I was really happy with the trees!
I'm so happy to find your channel simon! the content is incredible and I never saw someone going this deep into these topics with javascript.
Thank you, I've been learning so much!!
No worries, glad you're getting value from it!
Hey, do you think you could start breaking these kind of projects up into multiple videos / a playlist? I love seeing this stuff come together and would definitely binge a 60-video playlist watching you develop each component! Thanks for what you do!
A lot of the building blocks are covered in previous tutorials, and anything that isn't, like SDF's, I have plans to cover.
I don’t know why, but you voice is so incredibly calming. I would like to listen to audiobooks read by you all night.
Wow, awesome stuff very thought provoking!
wow some of those terrains are the end really reminded me of minecraft alpha world generation. Really impressive.
This is really awesome. Great job and a great video!
ty
Love a SimonDev vid! Great as always :o
You make threejs seem so easy, and it is somewhat with their extensive example library, but I realize pretty quickly if you don't know glsl you've very limited... any chance you could do a video specializing on on shaders or break down the shader code your write a bit more? Thanks!
Also your 'yays' crack me up you sound like the male version of Tina from Bob's burgers.
Yeah I'll be breaking down some of the more specific techniques in their own videos.
re: Bob's Burgers: hah yeah I can totally see that
Thanks for the glimpse into SDF‘s
No worries, I'll probably try to follow up with something more in-depth on those specifically at some point.
Once again amazing video Simon! Hats off!
Thanks!
Super cool! I hope you eventually make a version with a quadtree for chunks of varying voxel size and maybe even a voxel planet
Yeah I was kinda toying around with that same idea!
You guys can all agree with me that we NEED a part 2 of this amazing video
Hi man i was just wondering after viewing your videos if a project can be made. I remember playing in Minecraft Servers with a sort of RPG mode to kill monsters and gain money > buy and form an economy by that. It would be nice to have you explaining how minecraft plugins can be made, work or just experiment with it, economy is also very fun, i would be glad to see that. Your videos are amazing.
Definitely an impressive go, reminds me a lot of classic Minecraft!
If you ever end up working a bit more on this looking at Minecraft mods could bring some inspiration! Optimisation mods in particular like Sodium, BetterFPS and Optifine could be the basis to help your game perform even better and mods like Harvestcraft and Biome Bundle can bring some inspiration for things like world generation/decoration
Him: I only got a GTX 710 ti
Me: Have you ever seen a GT 530? No, well, i got it.
Woah
Oh wow never heard of it
Have u ever seen palit GT240 with broken cooler? Or 8800GTS 640MB with black screen in CSGO?
Amazing video Simon! Thank you!!
ty
This is awesome. Looks great.
I have an even hackier version of instancing for my Babylon.js Voxel game prototype: Since I needed to know how transparent textures looked when rendered properly, the simple instancing didn't work, as it produced way to many faces. But you can pre-create one instance per face combination(64 possible face combinations), and cull faces that way.
Using exact same card doing exact same things - glad to have found your channel ;)
The naming of variable is on point ! (papa and baba) , nice video ✌️
In before you become popular! Great video, I would love to see where you take this in the future and what cool things you add to it. (Probably shouldn’t call it Minecraft But Better™️)
This is awesome work!
ty!
Loved those trees. Great job :)
Cool! I didn't know that you can do stuff like this with javascript. I use it a bit at work for creating web apps :)
more of this content please!
Very cool. The ambient inclusion changed everything, I think
Yeah it was a gamechanger for the visuals. I'm sure if I went and implemented their voxel based GI, would be even nicer. Maybe v3.
Great as usual! Thanks Simon! :)
welcome!
Finally! Someone doing real work in 3D in the browser. Bravo!
Heh, it's just such a nice and easy environment to work in
The procedurally generated trees are such a cool idea to implement in a minecraft-style game. Sadly they are too big for my taste (when speaking of actually playing in a minecraft world like this) and its a shame that its next to impossible to have them at a scale that is more minecraft-ish. They still look pretty awesome tho!
Really cool video and insights!
Amazing work, Simon.
This is so awesome!!!
I was wondering, did you use instancing + merging geometries in this version? Or did you just merge them?
Nah didn't bother with instancing, do merge geometries, codes all on github, live version is on my site (assuming it still works)
@@simondev758 Thank you! I'm trying to do something similar but I have difficulties to understand how the computation how the voxel and neighbour work when a voxel is created or destroyed. Is the entire chunks is recomputed each time?
The generation is really cool on this one, the tree gen and mountains, I think that if you continue this, try working on water physics like Minecraft, where you can make gravity very weak and allow the player to swim up, and maybe you can add some kind of underwater shader. Good work man!
I kinda wanted to do water too, but decided to wrap this one up. Maybe next go-around I'll try.
@@simondev758 I might try to make a Minecraft clone in the future, if I do, I am going to add a lot of other features like water physics, maybe farming, hopefully crafting recipes. But I am most comfortable using unity, so that's where I would make it.
You deserve more subscribers than Sam Hogan, judging this! Also you helped me prove to my cousin as to how Game Engines are not everything. I am learning p5.js here and hope to learn THREE.js soon too! Thanks! :D!
Idea for EVEN EVEN BETTER Minecraft:
Make hierarchically subdivisible blocks, i.e. every block can be divided into a 3x3x3 subblocks which you can then shape. Make it go down several levels of hierarchy.
Why: Can make more complex shapes. Can make more complex logic (like try to make a CPU out of minecraft boolean blocks).
I watch your videos in bed, they really help me fall asleep, thanks! 👍
I can't believe you even thought of rounding the clouds corners off! :)
Love it ! Maybe a public release soon ? :)
Great video, waiting to see the github ro explore more code :D
Code's coming soon, gotta just clean it up.
Really nice video!
9:44 It does. It has a 4096 build high limit. The only thing, is that the game stops let you place blocks at 320. But there are some ways to break this block.
this doesnt look like its coded in JS good job man keep it up!👍
i realy like the look of the tree :)
Your mountains look amazing
ty
@@simondev758 will you do another episode of this? I would love to see wildlife and/or more plants like grass or flowers.
Im learning some webgl myself and sure can make some cubes but how do you make them only render partially then fully, how do you do world rendering that saves chunks that go away. Pure webgl only id be glad if you could hint me in the right direction
Minecraft used to feel like this.
I miss seeing the noise maps in the terrain.
Nice Work!
This was awesome!
this is sick! (also god dam you could do a good bob from bobs burgers impression)
there is some super idea there
this is fire and inspriring
This is pretty damn cool, where did you learn to code?
If you don't look carefully it actually looks like Minecraft. Also I love the terrain generation.
this is amazing! how do you have only 20k subs you deserve more
Can you make a vowel tree gen thing using those big trees that tells you how much you need and gives it to you layer by layer to build it, also being randomizable
This is really cool, you really added your own spin on the thing and made it look effortless.
Hope we can see more technical exploration like this
This is the most indifferent "Let's build a Minecraft" I've ever seen.
Glorious!
I love the trees
I basicly know nothing about coding but this is kinda entertaining to watch, I like it +1 ps. you should create "terraria" like 3d game :) .
You sound just enough like rami malek that I couldn’t help imagining Elliot alderson.
Hah nice
You nailed it bro
Awesome video, I'm trying to create something cool on the web using ReactJS. I'm wondering how do you handle physics and shapes for GLTF objects? Specifically the GLTF collisions.
Yeah, just look into something like ammo.js or cannon.js.
great stuff!
Thanks!
Your channel is underappreciated.
I'd recommend switching out the perlin noise for voronoi noise. older versions of minecraft used voronoi and many people prefer minecrafts old world generator which utilized the voronoi noise. Gives much cooler generation. a game like minecraft was never supposed to have those wide open spaces
I think adding the ambient occlusion really makes it stand out.
So good!!!
Hi Simon, incredible stuff!
Was wondering what your background is, you know, to make something like this.
It seems to involve very little JavaScript and a lot of math and vector graphics (I say this as a FS Web Developer).
So, is your background in computer science, game development, mathematics, a combination of those or something else?
Thanks!
Yes.
Heh. Studied in University, moved to game development as graphics/optimization (XBox/Playstation/PC), worked at Google, almost all of it in C++. I'm just kinda screwing around with JavaScript for these videos, but I don't know it especially well.
@@simondev758 Honestly the only reason these videos are remotely accesible to me is that they're made in JS and using Web Technologies. I particularly enjoyed your profiling video.
You have quite the background there! Impressive.
Anyways, keep me in mind if you ever need help with the web development side of things.
Though it seems to me you're doing just fine 😊
I am really impressed with how much you are able to make in languages like these! I am very suprised that you haven't been hired by big game companies yet!
Used to work for big game companies.
@@simondev758 well what happened? Why did you stop? You seem more than qualified
@@1b0ngo1 Got promoted to architect, guided entire company's tech decisions, hired by Google, led a team there. Got bored. Doing other things now. These videos are a way of me to still fiddle with code, meet some interesting people, without committing to 9-5 job.
How does Minecraft generate caves? Also, i wasn't really able to understand the add/delete blocks concept, especially at chunk borders. Could u explain that a bit more or provide resources that do?
OMG I laughed so hard when you jumped hahaha...Great work man. I saw some O of n squared functions throughout the video, were those really necessary? No way you could have a better time complexity? I think for a procedural game, the performance will take a big hit.
Which spots are you thinking of? Might have just missed them, or might have just made the call at the time to ignore them if their expected impact on the frame time wouldn't be meaningful, hard to say.