For now, just an experiment. It mess the other biomes while installed, so it is not really user friendly. Next alpha we modders will get a new tech that will help with this and make it possible to have heavy changes like this without messing the rest of the game.
I’m going to use this learning to apply it into the canyon biome and a possible new jungle biome.
So far, the seeds are very good.
The problem is that it is taking around 2 minutes to generate the embark mini map… I’m looking into the code, but I can’t find a way to make it faster…
Here a video of one that has a nice small river.
There is also bigger rivers, here an old screenshot with one.
One average there is 3 bigger and 3 smaller rivers in each map. Most of the time the cross with each other giving nice results.
Small rivers are shallow and 1 “chunk” wide (16 block)
Big rivers are deep and 3 wide.
@BrunoSupremo, would you like a review of your algorithm by another person? I could take a look and see if I can spot what is taking up the 2 minute generation time, if it pleases you.
The game will chose 2 random points and connect them using a*, then the path found is filled with water. The main slow down (I think) is the amount of steps. Just the visible portion of the map has way more than 100x100 (10000) tiles. And those map tiles are actually 2x2 in-game chunks. So, there is a lot of chunks for the algorithm to check…
One change I made in that file was remove the square root calculation from the distance. (now manhattan distance, which is ok for this)
And for the heuristic_cost_estimate I’m using the distance multiplied by a noise each tile has (to make the river bend through the noise)
I’m looking into getting a map without long mountains chains that would block the path. With more free space there is less steps to path around.
I will upload the biome later so you guys can test in your own machines. My pc is too slow. But, for comparison, normal biomes takes around 10 seconds to load.
Yes it is possible. Though this is just a canvas to test the rivers. If I were to implement this as a biome it would probably became either a savanna or a jungle biome (both have large flat areas)
I noticed that the A* I grabbed was very generic (to be used in different ways) and it was actually checking all tiles, all the time. This is useful in most scenarios, except in grid based maps, our maps. I changed it to check only neighbor tiles and it now loads faster then the other biomes
Ooooooooooh!! now this is te type of Biome i’m alwas looking forward for!(though i said it like that, i was following the progress for some time)
Now with the power of animation in your hand i bet you can go nuts with stuff like Tall waving Grass or Reed or Water-Sausages or whatnot, but if you need a extra hand just call me in!
Ok guys, I got what I wanted. It worked, sadly it is time to move on.
The idea behind all this was more of an amazon river biome. A big river (bigger that what I showed here) cutting the map, with a dense forest, with giant trees and all that.
It would probably look very nice, except it will require an enormous amount of work… I mean, the river would be actually the easiest part of the biome… And the terrain shape can be anything really.
What would really make the biome come to life would be custom assets, a lot of trees with varying shapes and sizes, vegetation, ruins, animals, etc…
I realized I can’t do this, so… Project dropped. Not only for my lack of skill, but for the lack of time. Something like what I had in my head would take probably a full year. For comparison, the archipelago biome is just 1 year old.
I’m going to see if I can use this for the canyon biome. It will probably look very cool with a river running at the bottom parts.
For now, those interested in playing with this, I edited the first post into a more or less mod page, you guys can download it there.
Congrats on making the rivers work! While it might not be everything you’ve imagined it could be (I mean, even your passing mention of the Amazon-style biome has me intrigued), you’ve accomplished something very important here.
With @Albert spending some more time on water tech, this biome mod makes a great proof-of-concept of how good rivers can look in the game. Such inspirations are always useful to keep the devs motivated and excited about what they’re building; and I’m sure your detailed explanations of your terrain experiments (across all your awesome biomes) will be very useful when the team get to designing new maps/environments.
You’ve laid the groundwork for something awesome here. Perhaps other modders will have the opportunity to build those custom assets and lure you back to finish that awesome-sounding Amazon biome, but even just taking what you have now, you’ve shown us the potential of functional rivers and associated map-gen.
Ahahaha “Lions not included” thank you for a great way to start my day @BrunoSupremo! The riversystem looks awesome and i hope your next big project will include what you have achieved here!
For a test this is the biome that has interested me the most. Its a great work!
But,Is there any chance we can get a temperate biome river? The same you have now but with oaks and pines. please? please?
Later I will try making it into a mod that can add rivers to any biome while installed. Would need a few adjustments though as there is a lot of hard coded things that works only for this map.
Edit:
I’m trying to embed it into the canyon biome. It was really helpful as I found a lot of flaws in the code.