I Made a Scuffed Minecraft Clone

  Рет қаралды 24,535

WSAL Evan

WSAL Evan

Күн бұрын

Пікірлер: 91
@ChaosAttorney
@ChaosAttorney 3 ай бұрын
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
@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
@wsalevan Жыл бұрын
Lol that's programming in a nutshell
@samuelmunro555
@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
@wsalevan Жыл бұрын
Thanks!
@Khano94
@Khano94 2 жыл бұрын
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
@wsalevan
@wsalevan 2 жыл бұрын
Thanks!
@whac1c
@whac1c 2 жыл бұрын
somewhere out there notch is like: "Hey I've seen this one! It's a classic!"
@marcboss
@marcboss Жыл бұрын
Can't wait for the next part!!
@ajiii6858
@ajiii6858 2 жыл бұрын
Nice video dude!! Thoroughly enjoyed it :D
@wsalevan
@wsalevan 2 жыл бұрын
Thanks! I'm glad you enjoyed it
@YoqDzewa
@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
@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!
@Ahmadm48
@Ahmadm48 2 жыл бұрын
I like how you have gone from maze generator video tutorial into remaking Minecraft
@wsalevan
@wsalevan 2 жыл бұрын
Yup
@Axodus
@Axodus Жыл бұрын
being a programmer in a nutshell.
@wsalevan
@wsalevan Жыл бұрын
Yeah pretty much lol
@lavenderharu9239
@lavenderharu9239 Жыл бұрын
how do you not have more subs, this is awesome. keep up the work my guy👍
@wsalevan
@wsalevan Жыл бұрын
Thanks!
@ProSureString
@ProSureString Жыл бұрын
Very underrated channel! Let’s get this guy to 1M quick
@wsalevan
@wsalevan Жыл бұрын
Thanks!
@NinaNova_
@NinaNova_ Жыл бұрын
7:48 ah, yes... the development cycle
@mix_i69
@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
@Kuro-GD Жыл бұрын
1+ subscriber, good job dude your vids are amaizing!
@wsalevan
@wsalevan Жыл бұрын
Thanks!
@aryszin
@aryszin Жыл бұрын
It's so funny how similar some functions are from a drawing programm to Minecraft!
@monkegotpower7780
@monkegotpower7780 24 күн бұрын
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-ly2ej
@LarryRich-ly2ej 2 жыл бұрын
underrated, much!?
@Revenkin
@Revenkin Жыл бұрын
Oh this is my jam
@lukaskirka2698
@lukaskirka2698 2 жыл бұрын
Nice video, keep doing this
@wsalevan
@wsalevan 2 жыл бұрын
Thanks! I will!
@autofall6726
@autofall6726 2 жыл бұрын
Wow, youd think this video would have 10 million views, not 309, hope it blows up
@wsalevan
@wsalevan 2 жыл бұрын
Thanks!
@orbyfied
@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
@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
@orbyfied Жыл бұрын
@@wsalevan oh yeah true
@wsalevan
@wsalevan Жыл бұрын
@@orbyfied though maybe the solution is somehow splitting up structures into small parts and generating them this way
@orbyfied
@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
@numero7mojeangering
@numero7mojeangering 2 жыл бұрын
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.
@wsalevan
@wsalevan 2 жыл бұрын
That sounds interesting. Does your method increase performance as well?
@numero7mojeangering
@numero7mojeangering 2 жыл бұрын
@@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.
@wsalevan
@wsalevan 2 жыл бұрын
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.
@numero7mojeangering
@numero7mojeangering 2 жыл бұрын
@@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)
@wsalevan
@wsalevan 2 жыл бұрын
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
@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
@wsalevan Жыл бұрын
Sure! github.com/EvanatorM/ScuffedMinecraftUnity
@minecraftwaffleman5112
@minecraftwaffleman5112 Жыл бұрын
@@wsalevan sheesh, thanks man, making minecraft clone is now less irritating 🏆
@wsalevan
@wsalevan Жыл бұрын
Yup. Though I'm warning you my code isn't the greatest lol
@oglothenerd
@oglothenerd 2 жыл бұрын
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!
@wsalevan
@wsalevan 2 жыл бұрын
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!
@oglothenerd
@oglothenerd 2 жыл бұрын
@@wsalevan Okay! Yeah sorta! Still, a tutorial would be a godsend!
@mogaming163
@mogaming163 2 жыл бұрын
@@wsalevan can you link your sources?
@wsalevan
@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
@oglothenerd Жыл бұрын
@@wsalevan Awesome! Thank you!
@smythfamily8321
@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
@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
@1RqMi
@1RqMi 2 жыл бұрын
Nice tutorial
@SkyLP
@SkyLP Жыл бұрын
You could use Scriptableobjects for the blocks
@wsalevan
@wsalevan Жыл бұрын
That's what I am doing
@SkyLP
@SkyLP Жыл бұрын
@@wsalevan huge
@Podzuldude
@Podzuldude 2 жыл бұрын
you are underated af
@wsalevan
@wsalevan 2 жыл бұрын
Thanks!
@Mot0Mot0
@Mot0Mot0 2 жыл бұрын
wait is this unity why you making shapes through code
@wsalevan
@wsalevan 2 жыл бұрын
Efficiency
@Mot0Mot0
@Mot0Mot0 2 жыл бұрын
@@wsalevan but how you doing that tho cuz I’ve never seen that before I have only been using unity for a few months
@wsalevan
@wsalevan 2 жыл бұрын
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
@Mot0Mot0
@Mot0Mot0 2 жыл бұрын
@@wsalevan thats smart
@wsalevan
@wsalevan 2 жыл бұрын
Thanks. I'm certainly far from the first person to come up with it though lol
@theharmonichaoticartist
@theharmonichaoticartist Жыл бұрын
6k views where's part 2 😅? (Unless it's in progress in which case take your time 😅)
@wsalevan
@wsalevan Жыл бұрын
My motivation to make videos is very inconsistent lol
@theharmonichaoticartist
@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
@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
@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
@wsalevan Жыл бұрын
That's a good idea!
@m_e_l__z
@m_e_l__z 2 жыл бұрын
cool
@wsalevan
@wsalevan 2 жыл бұрын
Thanks
@Francisco1234Cruz
@Francisco1234Cruz Жыл бұрын
You know, I think a download link would be neat.
@wsalevan
@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
@anderman1231 Жыл бұрын
how do you only have 300 subs??
@wsalevan
@wsalevan Жыл бұрын
Probably because of my upload schedule lol
@D.W.OGamezz
@D.W.OGamezz Жыл бұрын
@@wsalevan at least you have video ideas lol (I don’t)
@Miiso212
@Miiso212 2 ай бұрын
can I play the game?
@SoftPankekULTRA
@SoftPankekULTRA 2 ай бұрын
perfect recreation of bedrock
@awesomesauce1157
@awesomesauce1157 Жыл бұрын
haven't we all
@itsmeheplbot
@itsmeheplbot 3 ай бұрын
buildingscarft
@NotMalfieXD
@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
@wsalevan
@wsalevan Жыл бұрын
Thanks!
I Made a Slightly Less Scuffed Minecraft Clone
2:42
WSAL Evan
Рет қаралды 5 М.
Coding Minecraft from Scratch in C++ [Voxel Engine]
9:18
Carbone Dev
Рет қаралды 9 М.
GIANT Gummy Worm #shorts
0:42
Mr DegrEE
Рет қаралды 152 МЛН
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН
Escape From Catnap - Survival Stickman Scooter Race
9:23
AI Generated Minecraft Biomes
18:56
shovel241
Рет қаралды 2,6 МЛН
I Made a 32-bit Computer Inside Terraria
15:26
From Scratch
Рет қаралды 4,2 МЛН
I added water to my C++ Minecraft Clone
14:21
WSAL Evan
Рет қаралды 162 М.
I coded ur STUPID ideas to Minecraft
12:40
Element X
Рет қаралды 569 М.
23 Tiny Texture Updates Minecraft Should Add
14:59
Skip the Tutorial
Рет қаралды 231 М.
Is 8-Bit Minecraft Possible?
12:58
Inkbox
Рет қаралды 1,4 МЛН
My PERFECT Minecraft clone now has TERRAIN GENERATION
16:07
I Made Minecraft in Powerpoint
13:38
PolyMars++
Рет қаралды 690 М.
I Made a Minecraft RPG game
20:11
Toiu
Рет қаралды 3,4 МЛН
GIANT Gummy Worm #shorts
0:42
Mr DegrEE
Рет қаралды 152 МЛН