-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework Terrain Generation #24
Comments
I don't know if you've considered these issues, but I think they're very important in terms of Riverbed's goals.
All this may or may not concern you, but I just wanted to share some of the issues I've been thinking about for my game. |
Thanks for your input :) These are interesting questions ! Other solutions could include asking clients to generate the terrain indeed, and we could imagine cheating mitigation strategies such as validating random chunks ... Anyway I'll see that when I go over this issue :) |
I just want to chime in and say: cheat prevention also depends on what kind of multiplayer you want to have. Is it just friends / small scale, is it competitive? If a few friends play together and one friend cheats: so what? Let the friends handle that. If you give everyone a seed and let the clients generate the terrain and one client cheats they could potentially see far away valuable ores (just an example), but the server can still decide not to send them the info that an ancient dragon sleeps near those ores. Or the server can decide that it won't send any updates for that far away chunk... Movement and actions should still be server side validated, to disallow instant teleportation etc. pp. Just my 0,05 |
Yes, my stance on that is that being able to do multiplayer with friends is certainly valuable and is always the first step in development, but eventually I want to be able to have larger scale public server and that does require anti cheat measures, which we will figure out when we're there, meaning not now :p |
Added this internal crate https://github.com/Inspirateur/riverbed/tree/main/crates/riverbed_closest (what used to be "nd-intervals") for biome/plants selection. Hopefully this will allow us to blend custom noises per biomes together. It's just 1 small piece of the problem though. |
Current terrain generation has a few problems:
Extensible terrain generation
Current terrain generation code is messy and we can't add biome related logic to it easily. I need an API that easily lets me define Biomes with points in the parameter space (temp, hum, pH, Nitrates, etc.) and then lets me define custom terrain noise per biome (optional) which will be blended with normal terrain generation by multiplying with the biome value. Soil selection must also be abstracted away.
New system draft
(it can be as simple as saying that the top 3 blocks are grass)
Layer definition
The layers of blocks (which can be defined globally and per biome) could be of the form Layer(value, Block), with value being relative to the height specified by the terrain noise:
At the end of the process we get a final height noise and a sequence of Layer(value, Block) which will be applied in the order they're specified.
Future improvement
Having a clean and modular terrain generation is the first step before addressing the other issues. Once we get that, we can more easily rework terrain generation again to make it asset based (with custom biome noise written in files like
desert.noise
), which will enable a lot of things such as generating both GPU and CPU code and getting the slope value analytically for example.The text was updated successfully, but these errors were encountered: