I think it’s a real rite of passage to make your own minecraft clone so i started off just generating a grid of cube meshes in godot instead of using the built-in cube meshes i was going to generate my own cubes so that i would only create The mesh faces that were going to be visible to the player you can see that there’s still the faces in the back which we don’t want it took it took it took a few tries it took a few tries to make it show the right faces and eventually it Worked now with that in place i could actually start creating larger chunks which was quite slow so i switched it from generating a mesh for each individual block and instead had it generate a mesh for a chunk and with that i could use a bit of 3d noise sampling To create some more interesting terrain you can still see the separations between chunks so i i fixed that so i loaded into the game with the first person player controller and promptly fell through the earth because there are no collision meshes i first tried implementing collision meshes the land Generated so slowly that i fell into the void anyway it was around this time that i decided to switch to using 2d noise to generate a height map but it’s kind of upside down and with that fixed i was free to fall through the earth into the void Once again for some reason i forgot that static physics bodies existed so i made the land chunks into rigid bodies which are affected by gravity but once i switched it to static it worked as intended now i needed to give some textures to the train which as you can see is working Perfectly as intended now the train is generating and it has proper textures i started work on having the train generate infinitely so chunks around the player are loaded and chunks that are far away or unloaded godot would crash so much during this because the world generation Is on a separate thread from the main game logic and having the two separate threads communicate with each other it’s pretty difficult i don’t really get threading that much there’s a lot of deadlocks with that done i started work on making trees so i drew up some tree textures Started off by just generating stumps where trees should go just to make sure it was working now there’s actual tree trunks and finally i put the use on them i figured out which block the player was facing using a raycast drew an outline around it and then i implemented block breaking And block placing then i experimented with some more terrain generation when i started work on the sort of 2d blocks that minecraft uses for grass or flowers at some point during this i broke all the textures but eventually it worked then i broke everything again I also put a label in the top left that’ll tell the player what block they have currently selected for placing yeah then then you can build then it’s then it’s minecraft that’s basically all minecraft has right you punch trees you build a house snow like mining for coal there’s nothing to mine Like there’s no coal there’s no diamonds there’s no ore and there’s there’s nothing that actually crashed like you can’t you can’t mine and you can’t crack you can’t you can’t mine a crack Video Information
This video, titled ‘I Made Minecraft in Godot in a Week’, was uploaded by xen-42 on 2021-02-15 18:29:19. It has garnered 36046 views and 1278 likes. The duration of the video is 00:04:46 or 286 seconds.
Minceraft in godot real not fake? Consider supporting the channel: https://www.patreon.com/xen42
This is what people do right like they make Minecraft in things for no reason… Especially doing voxels from scratch… I could’ve just downloaded something to do that for me, and doing it in GDScript was terrible since its an interpreted language but I have NO idea how C++ or even C# work in Godot. Also I mean just do this in Unity right like I feel like that’d work much better for 3D especially with the built-in C# support.
I put the code on Github, be warned it can get a little laggy when placing blocks, not terribly optimized yet: https://github.com/NicholasConnors/Minecraft-Clone
—–
Fuzzball Parade by Kevin MacLeod Link: https://incompetech.filmmusic.io/song/5044-fuzzball-parade License: https://filmmusic.io/standard-license