[WIP] Ocean, buoyancy, dynamic weather and seagulls :)

Hey everyone! I wanted to share something I’ve been working on recently.

The main goal of the project was to experiment with a dynamic ocean and make the boat feel like it’s actually interacting with the water.

So far I’ve implemented:

  • Dynamic ocean surface using Gerstner waves

  • Multiple wave layers with different directions, lengths and speeds

  • Buoyancy for the boat and other floating objects

  • Boat physics and movement

  • Dynamic foam on the water surface

  • Weather changes

  • Day/night cycle

  • Custom sky and cloud shader

  • Seagulls :slight_smile:

The ocean waves are calculated both in the shader and in GDScript, so the buoyancy system can use the same wave information to determine how the boat reacts to the water.

The sky/cloud shader was originally based on Godot Volumetric Cloud Demo v2 by Clay John, but I heavily modified and extended it for this project.

There is still a lot to improve, but I’m pretty happy with how it’s starting to look.

You can download and try the demo here:

I’d love to hear your thoughts!

9 Likes

Hello,

according to the video, it’s a very nice project.

I recommend adding the unofficial tags “sea”, “ship”, “boat”, “sailing”, “simulation”. Many good projects don’t have the tags filled in correctly, which is sad and makes them difficult to find.

Please provide more information about “shader” programming. What tutorials do you recommend, where do you learn from? Do you have any resources to recommend? Thank you.

Really nice result, great work !

Hi, thank you so much for the kind words! :blush:

I actually couldn’t figure out how to add custom tags, so I just used the ones that were available to me :sweat_smile: I’ll take another look at it!

As for shader programming and resources, here are some tutorials I found really useful while working on the project (system doesn’t allow new users to post more than two links in a message, so some of the https:// parts may have been automatically broken up with spaces, just remove the spaces when opening the links):

Water splashes and particle systems - h ttps://www.youtube.com/watch?v=GEN6yFIXeW4

Water shaders - h ttps://www.youtube.com/watch?v=F7nR35XERh0 and h ttps://www.youtube.com/watch?v=rX4I1SymD-k&list=PLEHvj4yeNfeEzJBqNriKFOxS_hAuiu-p-

Interactive waves - h ttps://www.youtube.com/watch?v=BL2G2fypttY

These tutorials were a great starting point for me. I also spent quite a lot of time experimenting and modifying things to get the results I wanted.

And yes, I can definitely share the source code of my project if anyone is interested in taking a look. I just need to clean up the absolute mess in my codebase first :joy:

2 Likes

Thank you very much for the links :+1:

This is a very interesting project. Players can hop on a boat and set sail.

  • I couldn’t find a way to enable full-screen mode.
  • Is it possible to have a smooth transition between day and night?
  • The intensity of rain, wind, lightning, and fog cannot be adjusted.
1 Like

Thank you for the feedback! :blush:

At the moment, this is mostly a technical demo focused on the water, atmosphere, and weather effects. I wanted to put together something that felt more or less complete and see how everything worked together visually.

Now that I have the main technical systems in place, I’m going to start working more on the actual gameplay and characters.

I couldn’t find a way to enable full-screen mode.

Fullscreen mode is not implemented in the demo yet. I can definitely add it to the menu in a future version.

Is it possible to have a smooth transition between day and night?

Yes, absolutely. The day/night transition can be made much smoother.

At the moment, the sky shader is not updated every frame. To reduce the GPU load, especially on older hardware, I update it only once every 60 frames. I developed this project on an old laptop with an integrated GPU, so I had to make a few compromises to keep it running reasonably well.

I could also make the sky update frequency a graphics setting in the future, but for now I don’t think it would be very useful to expose it in the demo.

The intensity of rain, wind, lightning, and fog cannot be adjusted.

These settings are not exposed in the demo either. In the full game, they will be controlled by a weather manager, which will allow the weather to change dynamically.

For now, these parameters can be adjusted directly in the Godot editor through the Inspector.

Thanks again for taking the time to try the demo and for the feedback!

1 Like

I’m the one who thanks you for this work. I plan to incorporate it into my project, if permitted.

Yes, of course! You’re welcome to use anything from the demo in your own projects. Just give me a little time to clean everything up first… I want to properly structure the project, organize the files, and clean up the code. Right now it’s a mess :joy:

1 Like

I’m working on a very large, long-term project, and it won’t be anytime soon before I get around to incorporating that ocean into it.