▲ 290 r/godot

I really love the organic road system I added to my city builder

Land And Sword - Gogot 4.7

I shared it a while ago but never explained how it works, and it's actually much simpler than it looks.

The whole system is based on a shader that uses a completely black texture. Wherever the texture is black, the terrain is rendered as grass. If the pixel value is above 0.6, it blends into the first road texture, and above 0.9, it uses the second texture, creating a more defined path.

Then, every few moments, I run a routine that records the position of every villager and paints the texture at those locations. As villagers keep walking, the roads naturally emerge over time, following the paths they actually use

For wishlist❤️ https://store.steampowered.com/app/4248260/Land_and_Sword/

u/RohrGM — 10 hours ago
▲ 76 r/godot

15k lines of code in my 'small' project

After 3 failed projects because I completely misjudged the scope, I started a smaller one since everyone says it's better to finish a small game than never finish a big one. Fast forward 1.5 years, I'm at 15k lines of GDScript and probably only halfway through. 😂 Anyone else have this problem?

Edit:

Obviously, LOC is not the correct way to measure the size of a project, I just used it as an example for my specific case

u/RohrGM — 15 days ago
▲ 50 r/CityBuilders+2 crossposts

Transition to winter with shader

In practice, this was a combination of particles, WorldEnvironment, lighting, and mainly shaders. I already have ready-made meshes of the trees covered in snow, but with this quantity, performance would be really bad if I replaced them all. With shaders, though, I managed to achieve these effects in a very lightweight way. What do you think I could improve???

u/RohrGM — 1 month ago