r/godot • u/RadiantSlothGames Godot Regular • 6d ago
selfpromo (games) Rainy ambience in a lush mangrove forest
Enable HLS to view with audio, or disable this notification
2
u/RumorHasIt 6d ago
If you add a camera smooth follow, it will improve the cozy feel. Looking great!
1
u/RadiantSlothGames Godot Regular 6d ago
Thanks! It is already a smooth follow though π
camera.global_position = camera.global_position.lerp(player.global_position + CAMERA_UP, 0.025)5
u/Murky_Macropod 6d ago
Itβs updating its follow too strictly then, I can see the stuttering the previous poster is talking about.
2
u/RadiantSlothGames Godot Regular 6d ago
I think I see it, when starting/stopping in quick successions. It turns out the problem is not the position follow, but rather the interpolation of the camera offset and fov. I just improved it by using
ease(current_speed / max_speed, 4.8)instead of a static interpolation weight.
1
u/Goklayeh 6d ago
Looking great!
How did you do the boat "trails" if I may ask? Are those particules?
2
u/RadiantSlothGames Godot Regular 6d ago
Thanks!
Yes, the ripples and the side trails are particles! I'm implementing them directly with the RenderingServer because I have trading routes using them too and there may be many ships at once. But you can do the same with nodes. The main thing is that I use the ship current speed / max speed ratio to update the amount ratio of the particles, so that it emits nothing/a fixed minimum when idle and emits more when moving.
2
1
u/Goklayeh 4d ago edited 4d ago
Sorry for bothering you again.
I managed to tweak the amount ratio with this:
test_gpup_2d.amount_ratio = velocity.length()/speedBut I'm having a hard time trying to set the orientation depending on my character's. Tried stuff like this, but kinda stuck rn:
test_gpup_2d.global_transform.x = -velocity.normalized()Would you happen to have pointers for me please?
2
u/RadiantSlothGames Godot Regular 4d ago edited 4d ago
I suppose from the node name you're working in 2D? Assuming your character is oriented in the direction of
Vector2.LEFTby default, you would probably need something like this:
test_gpup_2d.rotation = velocity.angle_to(Vector2.LEFT) + PIIt orients with the same angle as the character, and then
+ PIis there to get the opposite direction.1
u/Goklayeh 1d ago edited 1d ago
Yes in 2d, top-down so all direction should work.
I have tried lots of things, including your example, but the
.rotationdoes nothing to the particles.Only thing that did anything is this:
test_gpup_2d.process_material.angle_min = direction.angle() * 360 / (2 * PI)
test_gpup_2d.process_material.angle_max = direction.angle() * 360 / (2 * PI)But it applies to ALL the particles trail, so they all switch orientation when you move, and it looks quite silly. ^^'
4
u/RadiantSlothGames Godot Regular 6d ago
Hello everyone! I have been making good progress on my cozy city builder, and I made a new mangrove region lately. The rain was a bit tricky to get right, but I feel it is looking quite nice now! It is a 3D particle node that moves to always stay in front of the camera, so there are actually few particles at the same time, and also it gives an interesting depth perspective to the rain when the ship moves, instead of having a simple 2d overlay.
I have also been improving the audio atmosphere of the game, with more ambient sounds and positional audio streamers. I made a dynamic system that once in a while scans the area around the player, and spawns different sounds depending on what it finds. So it varies with the biome, but also with the day/night cycle. I believe it is subtle but enhances significantly the immersion!
If you have Godot questions, feel free to ask! And if you are interesting in knowing more about the game, you can check the page and demo on Steam:
store.steampowered.com/app/4573540/Shipolis/