I’m actually having problems generating even a simple a hill with a Minecraft-like terrain generation script. First, in the front, there’s a flat plane at the beginning of generation (the hill after that actually works perfectly fine), and second - and that alone would indicate a problem with the piece of code as a whole - at the back, the terrain just slopes straight down without ever changing under anything under the z-axis (that’s actually where (at least the rest of) the hill essentially fails completely). Also, this is my own terrain generation; I don’t need any other sources for this please. Thank you.
And I’ve tried a popular Minecraft Starter Package called MinePackage, but initially I only really got an MS Word document and was of no help to me at all essentially, and I just can’t seem to figure the rest of it out.
Also, I’m fine if I have to be provided entirely new source code for this, but I’d much prefer y’all to work with and fix my own current source code itself.
As with any engineering problem, you gotta start chopping it up different ways to isolate the part that is failing.
First of all, I assume you ARE using source control (git works great with Unity) so that you can freely tear up your project and instantly reconstitute it from the source control repo.
Now having said that, I suspect your actual problem is you are not re-initializing variables like xHillLmt or zHillLmt, and they are creeping down when you don’t expect it.
You can also use Debug.Log() to dump out a series of what this variable’s value is, then after the fact study it in the Debug.Log() and identify where things go funny.
To get the sheer volume of data down, make a little 3x3x3 world, see what numbers you get, which is what I mean by paring it down. Or even just a 1x3x3 “wall world.”
Alternately there is like 57 bazillion other Youtube-hosted minecraft tutorials out there for Unity, so those CAN be a source of ideas, but if you’re already rolling your own, it might not help you with the specific bug you’re seeing.
While we’re at it, I think it’s best to see the “solution” to my problem instead; I want a small simple sample Minecraft terrain generator Unity engine file (perhaps one that focuses specifically on hills, etc., but even the generic one is also okay along with or instead of it), since although some of your ideas did work, the truth it, I just can’t seem to figure it out entirely at all. Also, I want detailed descriptions on how each of the pieces of code work, so as I won’t get too confused and be able to figure out the entire script itself and adapt my own from it at my skill level. Thank you.
Thanks for the help anyway, but it only solved part of my problem (yes, it did in fact), and the truth it, I just can’t seem to figure it out. I’ve just posted another post about me wanting a simple MC terrain generator engine to try and learn from its bits and pieces fyi.
This is a noble goal, but I urge you to just get as much exposure as possible to various coding styles and approaches without focusing on grading each presentation based on its explanation.
Keep in mind you won’t understand all of them the first time, no matter how much explanation there is. Understanding a problem can only come in stages, bit by bit, and the best you can hope for as you gain experience is to make those bit-by-bit steps happen in larger chunks. But for that to happen just takes time, so stick with it, don’t get discouraged.
You show me some hints on how to get the code to work properly.
You fix the code up so that the hill finally works properly. This isn’t cheating / being lazy / etc., it’s basically “showing me the solution” to my own version of the code itself so I can finally get that to work and use that and my code even better.
Honestly, I would prefer the latter option at this point, but if you choose the first option, that’s fine with me. Thanks for doing business with me, I appreciate that.
I meant for you to open the file and fix my own code for me in the way I would so I can use and understand it and use it to advantage to tackle even bigger problems. But yes, I do like the April Fools’ complement here. Thank you very much. I appreciate that very much.
You’re asking us to do the heavy lifting for you. To do your work for you. And ended it with the statement of “thank you for doing business with me” which implies your knowing that doing your work for you is business.
business - noun:
the practice of making one’s living by engaging in commerce.
You know… the act of trading skill for commercial gain. i.e. money
Alright, It’s understandable. I’ll just rewrite the entire code altogether and start over. Thanks for the help anyway. I’ll continue to inform you of the situation and keep this thread open, of course.
Just to add some context to @lordofduct 's post, it’s important to understand that there would be a great deal of work involved in the task you are asking for. When Notch (aka Markus Persson) developed Minecraft he was already an experienced professional game developer. He knew most of what he needed to accomplish and it still took him years.
If you can’t afford to pay someone my recommendation is you find an already existing solution and examine it to see how they implemented it. Below is a link to IronVoxel which was unfortunately released under the GNU General Purpose License making the code incompatible for direct use, but you can still use it for learning purposes.
Well, it’s been decided then; I’m requesting a simple (perhaps small) Minecraft terrain generation engine that’s easy for absolute beginners to understand. That way, I can learn from its code and be able to implement it into my own game using these technique(s) much more easily. Thanks for the help anyway y’all. I appreciate that.
In fact, this is why as of this post, I’ve changed the title right now. And it’s okay for the mods to move this thread if they feel they need to do so.
The one I looked at was too difficult for me to understand. I’m an absolute beginner at Unity, and thus would like a much simpler, easier to understand engine instead.
Reading someone else’s complex code is difficult for experienced developers, and can border on the impossible for beginners. Minecraft style terrain generation is going to be highly complex code. What you are asking for, a beginner friendly easy to understand Minecraft style terrain engine that someone will just hand you, very likely does not exist. I’m sure if you offered $20,000 dollars for this then someone would step up and make one exist for you though.
Realize you’re asking for likely months of work from someone. This isn’t a dozen or so line script that sometimes someone with a bit of free time will throw together.
Unity Connect is the official place to go to get developers to join your project by the way. Not here.
Alright, I’ve decided: I don’t care how complex the engine is at this point, I just want any minecraft engine compatible with Unity, including adjustable values, where I can add pretty much anything into the game without any programming whatsoever (think of it as having a great game idea and being good at ‘level’ design, but not being able to code or sprite, but having the engine itself circumvents all of this), so that I can just design my Minecraft-like game without much, if any, trouble; again, it just has to be compatible with Unity itself.
SIDE NOTE: In fact, that ties in with the thread title change (again), just to let you know.
The idea that you can make your dream game without coding is not a realistic expectation.
You could try searching for “voxel engine” on the AssetStore. Make sure you read the documentation of each product thoroughly to see exactly what it does and doesn’t do. Keep in mind that it’s highly unlikely you’ll find anything that does everything you want and exactly how you want it. If you want someone else to code the engine, and you can’t afford to hire someone to do a custom engine, then (of course) you are limited to what is already available.
You could also try searching for “unity voxel engine github” on google but that will probably be even more difficult to find what you want.
Also, I could be wrong, but if you want a game that’s exactly like MineCraft except that you design the levels, I thought you could already do that just using MineCraft itself.