I made an EVEN BETTER Minecraft
VloĆŸit
- Äas pĆidĂĄn 28. 02. 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... - VÄda a technologie
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.
8:33 "Meh, look at that poor tree"
9:22 " *Holy Sh*t What The F*ck* "
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?
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).
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;*
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
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.
"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.
Dancing "cubes" to illustrate hollow sides was nice touch to explain the subject, the attention to detail is great! đ
6:32 - That was a painful copy+paste
Yeah that was pretty gross, 4 nested for loops I think?
Simon, you're basically coding ASMR and that's fantastic.
Seems easy enough!
*10 years later*
I am a failure. đ
This is awesome! I love these kinds of videos, making unique versions of Minecraft.
I've pretty much binged a lot of your content here, loving the content!
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.
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.
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!
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
SimonDev: *makes Minecraft clone*
Clippy: It looks like you're making a Minecraft clone.
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!
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
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:)
Pretty amazing stuff! Love your videos man.
thanks!
Awesome as always, Simon! :D
The trees are superb!
Yeah I was really happy with the trees!
Wow, awesome stuff very thought provoking!
first time seeing your channel, and I'm super impressed! subscribed!
I donât know why, but you voice is so incredibly calming. I would like to listen to audiobooks read by you all night.
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.
This is really awesome. Great job and a great video!
ty
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.
wow some of those terrains are the end really reminded me of minecraft alpha world generation. Really impressive.
You guys can all agree with me that we NEED a part 2 of this amazing video
Amazing video Simon! Thank you!!
ty
Once again amazing video Simon! Hats off!
Thanks!
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!
Using exact same card doing exact same things - glad to have found your channel ;)
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!
The naming of variable is on point ! (papa and baba) , nice video âïž
Finally! Someone doing real work in 3D in the browser. Bravo!
Heh, it's just such a nice and easy environment to work in
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.
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?
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!
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).
This is the most indifferent "Let's build a Minecraft" I've ever seen.
Glorious!
more of this content please!
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
This is awesome work!
ty!
Great as usual! Thanks Simon! :)
welcome!
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.
Amazing work, Simon.
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
Loved those trees. Great job :)
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.
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âąïž)
I can't believe you even thought of rounding the clouds corners off! :)
Minecraft used to feel like this.
I miss seeing the noise maps in the terrain.
I watch your videos in bed, they really help me fall asleep, thanks! đ
I love the trees
i realy like the look of the tree :)
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 :)
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.
there is some super idea there
You sound just enough like rami malek that I couldnât help imagining Elliot alderson.
Hah nice
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.
Great video, waiting to see the github ro explore more code :D
Code's coming soon, gotta just clean it up.
this is fire and inspriring
If you don't look carefully it actually looks like Minecraft. Also I love the terrain generation.
You nailed it bro
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 love how the video caption is in Vietnamese, translating it to English makes it pure comedy.
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'm really impressed by the trees
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!
Your channel is underappreciated.
all the different techniques used, that was insane
A lot, but they're pretty simple and quick to learn
@@simondev758 simple is pretty relative haha. A lot of these I would have never thought to do on my own. If you wanted to do a paid "advanced techniques course" I think you definitely could.
@@aj35lightning I'll definitely think about it, ideally I'd like to just give this info for free
But also wanna pay for things with money, so gotta find a balance
I'll see if patreon gets me far enough
@@simondev758 yeah I really admire that your giving this out for free. Also why I admire Yuri's channel and livestreams. I learn so much from them. He also came out with a course and it seems pretty successful. It's focused more on general webgl website integrations, not game dev specifically. Even if most of the information is out for free I think there's value in aggregating it all and having a guiding curriculum for ppl to follow and complete. Some ppl only look for courses, paid or free, like the mega videos on the freecodecamp channel. Like they find a topic they wanna learn and binge a course vs looking for random videos in that topic. Really Not trying to push you to do it, I know making a course would be a pain and a lot of work. More just wanted to say the market is definitely there if you wanted to go that route
@@aj35lightning You bring up some good points, I kinda mulled over the idea last night a bit. I'll probably start collecting ideas into some sort of "course like" framework to start, wouldn't be surprised if a lot of it still goes out in free videos but at the very least I'll build out the curriculum.
This was awesome!
Love it ! Maybe a public release soon ? :)
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.
This channel is a gold mine, too bad I don't have a mining pick thingy
Nice Work!
Problem with any heightmap-based terrain generation is the lack of overhangs. Even a 4087 bit gradient can only produce a cliff.
Procedural terrain generation is still an area that hasn't really seen any improvement since minecraft released over a decade ago.
I'll write a note specifically to add those for v3, when I get bored enough to try that.
@@simondev758 This would be great to see. If you do, I would like to put in the suggestion not to use/teach the trilinear interpolation that Minecraft uses to speed up 3D noise generation. The reasons that Minecraft decided trilerp was necessary to make noise fast, were shortsighted at best. It basically came down to using too many noise layers, and not implementing any other optimizations. It looks very griddy, and isn't necessary to get good-performing 3D noise-based overhangs. It would help the community for there to be fewer tutorials that re-teach this, and more that teach other methods.
My suggestion:
- First, define your 3D noise formula consisting of your fBm/ridged/etc. Take what would define an ordinary 2D heightmap, and add the third coordinate to the noises. Thus, it becomes a heightmap that changes vertically, sometimes leading to overhangs. The vertical frequency trades off overhangs and the risk of floating islands. Test "noiseFormula(x,y,z) > y ? solid : air" to decide whether to place a block.
- The optimization: Find the minimum and maximum values it can produce. These are the min/max height for your terrain. Only loop over this Y coordinate range (assuming Y is vertical). Everything below is solid, and everything above is air. It's probably easiest to set a big range while you tune your noise formula, then set the exact values after.
Also I would argue that there have been improvements in terrain generation since Minecraft was released. Newer ways to generate noise with less directional bias, biome distributions, optimizations for generating 3D noisemaps, etc. The community can be quick to latch onto old methods, though, and Minecraft doesn't seem keen to incorporate lots of the newer techniques in their updates. This includes the caves/cliffs update, which is still using the griddy trilinear interpolation on its 3D noise.
Really nice video!
I think adding the ambient occlusion really makes it stand out.
Now the Minecraft build limit of the real Minecraft becomes higher xD (1.17 Update)
Can you try implementing multi block âentitiesâ, something Minecraft wonât be able add? Basically imagine building your own ship and than sailing it. The main problem is water physics and itsâ interaction. Accepting the challenge?
this is sick! (also god dam you could do a good bob from bobs burgers impression)
great stuff!
Thanks!
i am happy i found your channel
this is amazing! how do you have only 20k subs you deserve more
Level Genius!
Using sdfs for voxel generation s such a cool idea
wish i could build something like this