Working MC style chunk based terrain generation

Hello! I am working on making a Minecraft clone using this game engine. This is an example of the world terrain. There is a memory bug I can fix, but it is working as of right now. Feel free to use this for your projects if you would like. It is easy to use and pretty easy to understand the code. The next step in the project is to add some optimizations. One of which is kinda hard to do. I want a greedy meshing system based on the Y level, not the texture. I also want to disable/ eliminate as much unused data as possible while being CPU-based. If you added anything to it let me know! I would love to see what you are using this script for!

https://playcanvas.com/project/1285204/overview/t26

2 Likes

Here is a pitcher of a fun failed attempt! :rofl:

Farlands ahh

LOL, right?! It is a simple fix. I am testing how far it will render. So far, it is 40.

Have you tried to see what would happen if you used like 40.5?

No, I have not! I will try though!

Interesting! The chunk layout is more rounded. It generates in a circle instead of a bunch of squares.

Interesting. I was just wondering because if one was a whole block, what would it do with half.

Yah that is what I thought, many if I did 0.5 instead.

Is there any possibility of adding mobs, health, hunger, biomes, Minecraft stuff etc?

Yep! I need to finish the terrane gen first and slowly I will do that too.

1 Like

I think it needs a greedy meshing system or chunk system I say the chunks work well being 16x16 and if you need help ask me.

I will help you with the vertices and block faces

Lol, this is one of my older tests, here is an updated one.
https://playcanvas.com/editor/scene/2139514

This has a texture system and better terrain. I would like it if you take a look at what I got! The problem is not being able to add new textures and block variants. One of my goals is to add more Perlin noise factors for things like temp(for biome blending, block rarities, etc) and one for caves and mountains to give off the Minecraft effect. Before we do any of that I want to be able to render more chunks and be able to render trees.

I can help you with the perlin noise function I can take the function out of my game and give you the perlin noise code

And also I got a greedy meshed blocky terrain generation that is not laggy and far rendered

sweet! and how did you do your textures?