the reason why the grass and leaves textures are gray is because Minecraft uses a foliage texture for biomes, and it makes it easier for Mojang to change the leaves and grass color based on biomes
@Lrofmaulol Жыл бұрын
"To make a square, you just add another triangle, it's really hard to mess this up" *messes it up* I felt that. I did this first year of my apprenticeship as a software dev (germany, there is such a thing) when I was bored. Although back then I didn't use an engine, I tried going from very-scratch using LWJGL, ended up eventually bluescreening the PC because I never freed up any of the ressources I allocated :'D
@wsalevan Жыл бұрын
Lol that's programming in a nutshell
@samuelmunro555 Жыл бұрын
Dude I got half way through the video before realizing that you only have 320 subs, I was convinced this was from a bigger channel. Keep it up :)
@wsalevan Жыл бұрын
Thanks!
@Khano942 жыл бұрын
I thank the KZbin algorithm for allowing me to find this awesome channel, keep up the wicked work my guy!! you've got yourself another subscriber
@wsalevan2 жыл бұрын
Thanks!
@whac1c2 жыл бұрын
somewhere out there notch is like: "Hey I've seen this one! It's a classic!"
@marcboss Жыл бұрын
Can't wait for the next part!!
@ajiii68582 жыл бұрын
Nice video dude!! Thoroughly enjoyed it :D
@wsalevan2 жыл бұрын
Thanks! I'm glad you enjoyed it
@YoqDzewa Жыл бұрын
It's not super efficient to update an entire chunk every time you place/break a block. Also if it's on the corner it will need to update 3 chunks at once. When a block is broken, only the block itself and the six neighboring blocks need to be updated. You also can exclude the faces of the block that were already generated along its surface by marking contact with air cubes. This will make caves interior render even if the player isn't in them but Minecraft already does this. It's why cave outlines are visible when lag spikes. Have you already optimized with occlusion culling? Once the camera turns away, you can stop rendering everything outside the cone of vision. Something really extra you could try 😅 is LoD: a single texture for distant blocks and condense them into a single polygon with a simplified pattern of the blocks with shading. I don't know Java but you could append the textures of very distant blocks into a single map then add it like a horizontal skybox wall in that direction. Looking forward to this series!!
@wsalevan Жыл бұрын
Clearly you are way smarter than me lol. LoD was one thing I was thinking about but I have no idea how to implement it. As for only changing the blocks that need to be changed, I was also thinking about that but that might be quite difficult. I'll look into it though. Thanks for the suggestions!
@Ahmadm482 жыл бұрын
I like how you have gone from maze generator video tutorial into remaking Minecraft
@wsalevan2 жыл бұрын
Yup
@Axodus Жыл бұрын
being a programmer in a nutshell.
@wsalevan Жыл бұрын
Yeah pretty much lol
@lavenderharu9239 Жыл бұрын
how do you not have more subs, this is awesome. keep up the work my guy👍
@wsalevan Жыл бұрын
Thanks!
@ProSureString Жыл бұрын
Very underrated channel! Let’s get this guy to 1M quick
@wsalevan Жыл бұрын
Thanks!
@NinaNova_ Жыл бұрын
7:48 ah, yes... the development cycle
@mix_i69 Жыл бұрын
at the start i was like "wait why did he make a cube from scratch???" soon it made a load of sense
@Kuro-GD Жыл бұрын
1+ subscriber, good job dude your vids are amaizing!
@wsalevan Жыл бұрын
Thanks!
@aryszin Жыл бұрын
It's so funny how similar some functions are from a drawing programm to Minecraft!
@monkegotpower778024 күн бұрын
The way minecraft does the textures in game is pretty similar to your solution the game loads the textures from the resource pack and packs them into an atlas that gets stored in memory and then it uses that atlas, this is how the texture can be passed to shaders as well
@LarryRich-ly2ej2 жыл бұрын
underrated, much!?
@Revenkin Жыл бұрын
Oh this is my jam
@lukaskirka26982 жыл бұрын
Nice video, keep doing this
@wsalevan2 жыл бұрын
Thanks! I will!
@autofall67262 жыл бұрын
Wow, youd think this video would have 10 million views, not 309, hope it blows up
@wsalevan2 жыл бұрын
Thanks!
@orbyfied Жыл бұрын
For generation of the leaves on trees, you can make a function in the `World` class which sets a block directly if the target chunk is loaded, or queues it to be set after the target chunk generates. Like ``` public void SetBlockQueued(long x, long y, long z, Block block) { Chunk chunk = GetChunkFor(x, z); if (chunk == null || !chunk.IsGenerated()) { QueuePlacementAfterGen(/* chunk coords */ x / 16, z / 16, x % 16, y, z % 16, block); } else { chunk.SetBlock(x % 16, y, z % 16, block); } } ```
@wsalevan Жыл бұрын
Yeah that's kinda what I was thinking about doing but I wanted to find a more permanent solution and the problem with this one is that if I were to try to generate really big structures, it might be setting blocks inside of chunks that the player already did stuff in
@orbyfied Жыл бұрын
@@wsalevan oh yeah true
@wsalevan Жыл бұрын
@@orbyfied though maybe the solution is somehow splitting up structures into small parts and generating them this way
@orbyfied Жыл бұрын
@@wsalevan you could also do like a second generation pass where you place the structures after generation but before the player can do anything by doing the structure noise beyond the terrain generated or you could take a look at how minecraft does it
@numero7mojeangering2 жыл бұрын
I got to the same point but now I'm making a system that is not as much hardcoded by using scriptable objects to store each block's appearance. Also blocks can be on the same location if authorized to.
@wsalevan2 жыл бұрын
That sounds interesting. Does your method increase performance as well?
@numero7mojeangering2 жыл бұрын
@@wsalevan No I don't think so. But its more prown to modding in theory. I had mistakenly wrote "chunks" instead of blocks. But baking chunks could be potential frame saving if they can become low-res at high distance from the camera, or even static render on flat plane. But that sounds complicated to do.
@wsalevan2 жыл бұрын
Ohh the blocks. That makes more sense. Yeah you're right, that would increase modding capabilities quite a bit. I do have scriptable objects for blocks too, but then I convert it to a non-scriptable object block type. I do it this way to make it easier to add blocks because all I have to do now is put the textures in instead of having to find the coordinate positions in a tilemap. Though I could probably just make the resource loader work for rendering the blocks and put everything else in the scriptable objects. As for textures becoming low res, I'm not sure how much that would help since the textures are already only 16x16 but maybe I'm underestimating the performance boost because I never tried it. I think the biggest performance boost would be removing triangles from chunks when at a far distance, but I'm not sure how to determine what triangles to remove.
@numero7mojeangering2 жыл бұрын
@@wsalevan My idea was to bake a render of the chunks at far distance into a flat texture wich would maybe be mapped on to a surface generated using a marching cube algorithm. This way your not trying to decide which triangle to remove but changing the way that blocks are added to the final mesh in such way that reduces polygon count. You could eventually use marching cube but instead of iteration through each blocks you can make an average of 8 blocks into bigger cubes. To be fast I've watched videos explained generations of procedural terrains using a compute shader. But its far beyond of what I'm currently working on. (Still at the stage of managing my code and organizing it so I'm happy with)
@wsalevan2 жыл бұрын
That's a cool idea. I'll have to look into it since I just started figuring out basic terrain generation so that is far beyond my current skillset lol
@minecraftwaffleman5112 Жыл бұрын
I'm gonna be sas and ask for the project source :> so I can create minecraft clone without the hard step of block and terrain generation. Anyway this looks great, u are smart
@wsalevan Жыл бұрын
Sure! github.com/EvanatorM/ScuffedMinecraftUnity
@minecraftwaffleman5112 Жыл бұрын
@@wsalevan sheesh, thanks man, making minecraft clone is now less irritating 🏆
@wsalevan Жыл бұрын
Yup. Though I'm warning you my code isn't the greatest lol
@oglothenerd2 жыл бұрын
Could you please make a tutorial on how you actually use 3D Perlin Noise? I can't find good tutorials anywhere! My begging question is how you know a block underground should be air or something else!
@wsalevan2 жыл бұрын
To be honest, I didn't know how to use 3d noise so I just copied a 3d noise algorithm from the internet, but yeah I can make a tutorial about how to use it. To determine the block type of underground blocks, I use the 3d noise function and if it's below a certain value, the block will become air or whatever other block I set it to. Otherwise, it'll be solid. I hope this helps!
@oglothenerd2 жыл бұрын
@@wsalevan Okay! Yeah sorta! Still, a tutorial would be a godsend!
@mogaming1632 жыл бұрын
@@wsalevan can you link your sources?
@wsalevan Жыл бұрын
Yup! Creating Meshes: catlikecoding.com/unity/tutorials/procedural-meshes/creating-a-mesh/ Using Perlin Noise: kzbin.info/www/bejne/g4Oxd5avrNCIiaM Using 3D Perlin Noise: kzbin.info/www/bejne/d5jEYYd4f9CWnq8 Transparent Block Fix: kzbin.info/www/bejne/f5WldIyJmK-ha9E
@oglothenerd Жыл бұрын
@@wsalevan Awesome! Thank you!
@smythfamily8321 Жыл бұрын
Why didn’t you just use the built in cube function in the 3d objects menu. Great video btw you are amazing at programming you just gained a sub
@wsalevan Жыл бұрын
I'm glad you enjoyed it! As explained in the video, not all sides of each block are shown, and rendering those extra sides takes a lot of time. With Unity's built in cubes, we cannot remove faces from it, so they cause a lot of lag
@1RqMi2 жыл бұрын
Nice tutorial
@SkyLP Жыл бұрын
You could use Scriptableobjects for the blocks
@wsalevan Жыл бұрын
That's what I am doing
@SkyLP Жыл бұрын
@@wsalevan huge
@Podzuldude2 жыл бұрын
you are underated af
@wsalevan2 жыл бұрын
Thanks!
@Mot0Mot02 жыл бұрын
wait is this unity why you making shapes through code
@wsalevan2 жыл бұрын
Efficiency
@Mot0Mot02 жыл бұрын
@@wsalevan but how you doing that tho cuz I’ve never seen that before I have only been using unity for a few months
@wsalevan2 жыл бұрын
You're able to create meshes in scripts and then create a shape with it. I'm doing that here because if I just used Unity's cubes, there would be a ton of extra faces being rendered that will slow the game down. I can remove those extra faces when I generate them in a script
@Mot0Mot02 жыл бұрын
@@wsalevan thats smart
@wsalevan2 жыл бұрын
Thanks. I'm certainly far from the first person to come up with it though lol
@theharmonichaoticartist Жыл бұрын
6k views where's part 2 😅? (Unless it's in progress in which case take your time 😅)
@wsalevan Жыл бұрын
My motivation to make videos is very inconsistent lol
@theharmonichaoticartist Жыл бұрын
@@wsalevan I'm sure it's not as inconsistent as my will to live 🤣- if it's any easier you could Livestream for a couple hours and stitch edits like a pro- (*cough* code bullet *cough*), nevertheless mental is vital to any progress. If you need a break, take one, even if it's a couple years, you'll come back with 10x, nah 1000x more spectacular things to share with us. Can't wait for part 2 🖤
@wsalevan Жыл бұрын
Streaming does give more entertaining content but does make it harder to edit so I might do a mix of both like I did in this video. Thanks for the encouragement!
@theharmonichaoticartist Жыл бұрын
@@wsalevan post script- as despicable as they are, short form content has taken the world by storm, if a 10-30 min devlog is too much, maybe try 60sec progress updates 😁
@wsalevan Жыл бұрын
That's a good idea!
@m_e_l__z2 жыл бұрын
cool
@wsalevan2 жыл бұрын
Thanks
@Francisco1234Cruz Жыл бұрын
You know, I think a download link would be neat.
@wsalevan Жыл бұрын
Yeah I might make a download link in the next video but the project changed so much since this one that it wouldn't make much sense right now
@anderman1231 Жыл бұрын
how do you only have 300 subs??
@wsalevan Жыл бұрын
Probably because of my upload schedule lol
@D.W.OGamezz Жыл бұрын
@@wsalevan at least you have video ideas lol (I don’t)
@Miiso2122 ай бұрын
can I play the game?
@SoftPankekULTRA2 ай бұрын
perfect recreation of bedrock
@awesomesauce1157 Жыл бұрын
haven't we all
@itsmeheplbot3 ай бұрын
buildingscarft
@NotMalfieXD Жыл бұрын
i have more subs then you but your somehow better then me i respect that you got a sub from me also this video is cool