Need advice on cubic terrain generation
My brother and I are working on our first game together, however because he currently needs to focus on college we’re putting that project on hiatus. Since he’s the programmer I’m basically stuck with what I can still add, other than notes and the occasional 2D sprite.
I decided that I wanted to start working on one of the other games I thought of (a first-person city builder/strategy game), so I learn at the very least learn some coding language (since most of my programming knowledge comes from modding CK2) and we can have a foundation to work of when we start working on that game. Since Godot is open-source and allows modules with diffrent coding languages it seems like a good engine to work with.
And yes, I know that I’m putting a lot on my plate by starting with something like this. But I’m know for taking on difficult tasks and while it frustrates me when I’m blocked, like now, the rush/feeling of accomplishment you get when you finally figure it out is worth the trouble.
I’m aiming to build a prototype that allows me to:
- Generate a world with save and load functions
- Terrain that can be destroyed and placed
- Crafting items with a simple recipe list
- AI that can gather items and craft based on needs
- Basic combat, with AI that can attack
- Control where certain AI move with command buttons
I’ve already created most of the menus and GUI, but these are the easiest to create. As it stands I’m stuck at terrain generation. I basically need to set up a Minecraft-like terrain (cubic generated by seed and destructible) so I can start working on the other aspects.
A quick overview of what I’m trying to learn at the moment:
Generate terrain from OpenSimplexNoise
o Be able to put the seed in a menu before starting
o Save and load a world in a menu
Make the terrain destructible
Texture the different sides of a cube using separate texture files
grass_block: grass_top.png, grass_side.png, dirt.png
dirt_block = dirt.png
Additional bonuses if I could learn them:
Prepare the foundation for basic multiplayer
- How to add gravity to blocks
I’ve tried out several (YouTube) tutorials on terrain generation, but they all seem to end up in flops. I know about Zylann’s voxel engine but I want to learn/understand how terrain generation functions so that during development I can modify the code how I see fit without accidently destroying everything in the process.
From what I’ve learned from my failures I figure that the best way to generate terrain would be to:
1. Create a CubeMesh which changes texture and elements depending on the block_type associated with it
2. Create a MultiMesh from those cubes which act as chunks.
3. Create a GridMap that places the chunks next to each other
So my main question is; Does anyone have advice on which tutorials or documentation I can use to work on terrain gen?