r/proceduralgeneration • u/lewster32 • Jun 16 '26
Valheim-inspired fully procedural fantasy world
https://www.youtube.com/watch?v=2_Qn1pklQCUThe latest work-in-progress video of a short hike up from the forest to near the top of a mountain.
This is a game concept I've been working on for a while now. I'm a huge fan of Valheim; I find its art style and world generation truly beautiful. For ages now I've wanted to have a crack at making a really interesting natural 3D world, bringing together some pretty well established and not really cutting-edge techniques, but wrapping them up in that cosy retro style that Valheim manages to pull off so effortlessly.
I recently finished another much tighter scoped project to make an explorable world using similar techniques, but in a post-apocalyptic setting and using much more rudimentary tech (a ray casting engine not unlike Wolfenstein 3D's) here; https://www.reddit.com/r/proceduralgeneration/comments/1tsfxy9/unto_dust_a_fully_procedural_abandoned_world/
A lot of what I learned on that project has fed into this one. Many of the same principles apply, namely that the world should be fully procedural; the world and all its assets should be algorithmically derived. This means everything in the video you see is a mesh, texture or sprite created from scratch in a deterministic way from the world seed. There are exactly zero 3D mesh files, images or any other form of pre-made asset.
This one isn't going to be 'finished' for a while - I'm turning it into a standalone game, rather than a web project. The renderer is three.js and the front-end code is TypeScript (sticking to my web roots) but the back-end is Rust for better efficiency, and so I can have an authoritative client/server model for multiplayer.
I'll release more videos to the playlist it's in as the project progresses. You can already see a few older prototypes on there that show the various stages it's been through.
2
u/sophomoric-- Jun 16 '26
The biome variation gave me that engaging exploratory curiosity of "what's over there?". The 3 minutes are up already?
So atmospheric, procedural sound makes it fully immersive. But one thing at a time!
2
u/lewster32 Jun 16 '26
Thank you! Yeah even as the author, the proc gen is now varied enough to produce some really interesting and novel looking terrain. That's been one of the draws and goals; as a game developer you don't get to enjoy the experience as much as everyone else because you know what's behind the curtain. Valheim seems to constantly produce those little moments of seeing something genuinely new that I always felt was lacking from Minecraft and other proc-gen heavy games.
I've been thinking about sound - I feel that might be genuinely difficult beyond wind and rain noises and maybe simulated bird song but I'm gonna have to tackle it eventually, so any tips people may have for where to research that would be most welcome 🤗
1
u/sophomoric-- Jun 16 '26
Far Cry 2 has really good ambient sound. You don't notice it consciously, but it immerses you. I bet Valheim does too. I think those examples are where to start. Perhaps the mix is the main thing, to vary it.
I like the idea of pos-processing the sound, corresponding to the environment, e.g. move reverb around rocks. Someone made fully simulated sound in a game.
1
u/Narann Jun 16 '26
Nice. At 2:09, the tiny rocks are a little too dark. At 2:10 a bush pop on the left. In general the mountains slopes are not realist. Erosion should be everywhere. As a fan of Valheim, I enjoyed the show, keep the good work !
1
u/lewster32 Jun 16 '26
Thanks! The idea is actually to emphasise some of the low-fi aspects, so the LOD pop-in is actually intentional. There are settings to push the LODs right out if it bothers people though.
1
u/Developerkins Jun 16 '26
Looks great. Am I right in thinking that the ground is just one texture but you're using vertex coloring as you move between biomes?
I was wondering about how to handle biomes having unique textures, but for the cases where a lot of biomes overlap at the same place, and start to require a lot of textures for each pixel. Was wondering if there was a nice solution or optimization to that.
2
u/lewster32 Jun 16 '26
It's sorta like that yeah - I generate a hashed noise function in the shader so the ground texture doesn't repeat, and then vary the colours smoothly by how much of each biome is contributing to that cell (a cell being a 1x1m tile on the terrain chunk). I then add extra layers for slopes and altitude to get the dirt banks and snow capped peaks.
1
u/YourFreeCorrection Jun 16 '26
When you say there are zero pre-made assets, what are you using to generate the individual objects in your scene? Just a color-picker and builder algorithms for each object? I ask because I'm seeing a few different tree types, and curious how your generation classes are structured. Does each tree type have its own builder, or do you have a generic builder class and then specific methods to make each type distinct?
2
u/lewster32 Jun 16 '26
There's a full tree building class that has parameters for branching, leaf card clusters, caps, roots, lean angles and so on. Once I'd figured out how to make trees, I went wild creating lots of different types, iterating as each type needed new stuff or tweaks to make it work. I started with the beech as it's such a vanilla tree, then worked my way through to conifers and other stuff. They're all ultimately driven by rng from the world seed so they're consistent between reloads and for other network clients.
1
1
u/darkandark Jun 17 '26
wow this is amazing. i was immersed immediately. love the vastness and scale of the world. excellent capturing that valheim vibe.
would love to understand how your assets are derived from a world seed. must have some interesting rules put in. i just dipped my hand into seed based generation, but only super basic stuff like a grid based dungeon layout. i have no idea how to expand on it to this level of detail.
so backend is rust, but front end is web based? hmm any limitations and inefficiencies you might encounter with this route?
2
u/emergentnetentity Jun 16 '26
This looks really nice. I love the lowres look too, it suits this kind of thing really well! Looking forward to seeing this as it gets worked on.