This System can be seen being used here. And injunction works with a simple text based inventory system while I work on implementing more GUI elements.
Recent community posts
I am using a function that checks to see if any surrounding chunks have been drawn yet and if they haven't it checks my cube generation function to see if any faces will be shown if the next possible chuck ever gets drawn; so it knows what it needs and what it doesn't. And everything else by default I just render as transparent for my basic culling.
I played around with a couple of different types involving two scripts one for the player camera that casts rays onto near by objects and those objects having an activation script where then rendered for a measure of time that decreased until becoming 0 again and making the object disappear again. This method was way easier for me to understand and really helped me wrap my head around the basic idea of it.
This was the original video that I learned from, it might be able to help you too. And can defiantly be applied to many things but, like most things this is not the most efficient way of doing object culling because all of the objects are looking and the rays are constantly casting in the update function. That's part of the reason why I had to do a complete rebuild of my mesh generation system in favor of having all of the cubes drawn together as a chunk and than just rendering the chunk once. Which is great because I still have complete control over each cube in that chunk they are just being rendered as a whole. Good luck! And let me know if you have any more questions about it :D I am still fairly new to the idea my self but just remember google is your friend when it comes to things like this!
This was before the implementation: where my chunks weren't talking to each other. And rendering faces that did not need to be rendered.
This is after some tweaking ->
Still needs some work because the chunks load from the center out but, Ill fix that soon enough :)
I am working on development of a Minecraft clone, I figured it would be a fun way to learn more about random terrain generation and many more new programming principles. I plan to post when ever I update the game here ->https://matthew-arritt.itch.io/minecraftrebuild & on this devlog. Here is what I have already done with respects to this game \/\/\/ Enjoy :)
I started with basic mesh rendering and was able to render a single cube.
Next I was able to work on Chunks and 3D Perlin Noise. They look crazy cool! :D
After I was able to work the rendering out I started to spice the world up a bit.. :)
And Bang we now have working textures (I made those :D ) using UVs and a bunch of other really new stuff to me. The World is really beginning to take shape now.
Now I legit took the idea to the next level and added in depth to the chunks :P still very cool.
I was up all night working on it.
And most recently I was able to add caves into the game using a 3D perlin Noise System.
Now you are all caught up on the MinecraftRebuild; I have been working on this project for
the last four days and have hopes to be done in the next week or so.
RENDERING TREES!! UPDATE 12/04/18
I started with logic with the grass block and said that if a grass block had a dirt block under it and nothing above of it; it should instantiate a game object with the ability of spawning a oak tree.
New Textures Added into the game -
And as seen in the picture a tree has a 1/80 chance of spawning to get the look of an amazing forest :D This however was just the first step and will be taken further with the implementation of different styles of trees having a chance to spawn. And when biome's are added I will have to change the type of tree/ cactus that would spawn.