Jump to content

Recommended Posts

Posted (edited)

Like the title of the post suggests, some kind of waves added to the oceans would be extremely cool. The physics mod for minecraft is the best example of this sort of thing. With the new ships incoming, I think a feature like this would add a ton of fun and immersion to the game in the future. Perhaps, it could be included as part of a larger water overhaul/revisit? image.jpeg.c201d5cb10d41469c83f115287ec88e3.jpeg

Edited by VanillaBryce
tagging
  • Like 4
Posted (edited)
17 minutes ago, Guimoute said:

As cool as it seems, I don't see how you detect what constitutes an ocean to determine where to apply waves.

Oceans are made of saltwater (while still-water is used for fresh water), so that shouldn't be the greatest hurdle.

Edited by Brady_The
Posted
22 hours ago, Brady_The said:

Oceans are made of saltwater (while still-water is used for fresh water), so that shouldn't be the greatest hurdle.

Also could be a simple check of 'if bigger than X - ocean', if not, then perhaps a basic water biome system could be made (if not already in the game), which would probably be useful in the future as well when the devs have more time to focus on less important things such as underwater

  • Like 2
Posted

Hmmm...Valheim has a similar concept, which always gets a little strange if you built a base near the shore because it'll flood every time a storm rolls through. So I'm not entirely sure about adding in big waves to Vintage Story, instead of just adding some foam textures to saltwater shorelines.

Now that being said...if we did have actual waves as a "weather pattern" for water, I could see surfboards being added for grins and giggles. 😆 I've never gone surfing, but it seems like it would be a fun little distraction in the game if one has downtime and the climate for it, similar to snowball fights in winter. Except surfing is something you could actually do alone.

  • Haha 2
Posted
5 hours ago, Kosti said:

Also could be a simple check of 'if bigger than X - ocean', if not, then perhaps a basic water biome system could be made (if not already in the game), which would probably be useful in the future as well when the devs have more time to focus on less important things such as underwater

As all things, the naive check isn't enviable. Do you perform it once at world generation, starting from a random water block? Do you store the list of oceans somewhere? Do singular chunks save a flag? What happens when the shore is modified by players? It's not easy to make something that sounds obvious.

As for the "biome" (sic), same deal, they can be modified beyond recognition so you still need a block check somewhere. We have that problem with wolves who use the forestry scalar field to determine whether they are in a forest, because trees are generated following that field too, so it's a cheap and fast way to check for a forest as long as the player hasn't razed it. Once it's destroyed, the wolves still spawn there.

  • Like 1
Posted
21 hours ago, Guimoute said:

As all things, the naive check isn't enviable. Do you perform it once at world generation, starting from a random water block? Do you store the list of oceans somewhere? Do singular chunks save a flag? What happens when the shore is modified by players? It's not easy to make something that sounds obvious.

As for the "biome" (sic), same deal, they can be modified beyond recognition so you still need a block check somewhere. We have that problem with wolves who use the forestry scalar field to determine whether they are in a forest, because trees are generated following that field too, so it's a cheap and fast way to check for a forest as long as the player hasn't razed it. Once it's destroyed, the wolves still spawn there.

Ok, have it then, upon world gen, check for a salt water block in a chunk specifically for salt water, if it is found, perform a secondary check if the entire chunk is salt water, if so, then have it check the next chunk without checking the checked ones. When the entire process is done have it then designate all the salt water in the region as an ocean if the checked chunks are like 20+, or whatever number the devs decide is big enough to be ocean, and you have an ocean. Anything less than that number won't be an ocean. Easy enough.

Store the "list" of oceans where you store biome data, preferably in a underwater category or smth alike. I don't know why would singular chunks need to save a flag in such check ngl, you'd just perform the 'is chunk 80%+ saltwater' upon immideate discovery of said water upon world gen. The only thing you'd need to save is the biome data itself which is like... nothing lol.

If the shore is modified by players you keep the biome the same ig, even minecraft hasn't figured that out and it's likely because the soultion would be too laggy. Best I can think of is having some type of periodical check that goes around the ocean chunks every X ammount of time, perhaps every end of a season/4 months and checks for any action of placing saltwater, then performs a chunk check in those chunks if 70-90% of the chunk is saltwater, if so it continues the check until new borders and then redesignates the biome, but at that point you'd probably use this on every biome if they code it in, so honestly to answer "What happens when the shore is modified by players" would pm be adding an entirely new system in the game, if they had an answer to that issue, we wouldn't have wolves spawning in cut forests.

Posted (edited)
On 1/8/2025 at 11:45 AM, Kosti said:

Ok, have it then, upon world gen, check for a salt water block in a chunk specifically for salt water, if it is found, perform a secondary check if the entire chunk is salt water, if so, then have it check the next chunk without checking the checked ones. When the entire process is done have it then designate all the salt water in the region as an ocean if the checked chunks are like 20+, or whatever number the devs decide is big enough to be ocean, and you have an ocean. Anything less than that number won't be an ocean. Easy enough.

Store the "list" of oceans where you store biome data, preferably in a underwater category or smth alike. I don't know why would singular chunks need to save a flag in such check ngl, you'd just perform the 'is chunk 80%+ saltwater' upon immideate discovery of said water upon world gen. The only thing you'd need to save is the biome data itself which is like... nothing lol.

If the shore is modified by players you keep the biome the same ig, even minecraft hasn't figured that out and it's likely because the soultion would be too laggy. Best I can think of is having some type of periodical check that goes around the ocean chunks every X ammount of time, perhaps every end of a season/4 months and checks for any action of placing saltwater, then performs a chunk check in those chunks if 70-90% of the chunk is saltwater, if so it continues the check until new borders and then redesignates the biome, but at that point you'd probably use this on every biome if they code it in, so honestly to answer "What happens when the shore is modified by players" would pm be adding an entirely new system in the game, if they had an answer to that issue, we wouldn't have wolves spawning in cut forests.

This approach also makes a lot of sense from a programming perspective. However, I think there should be a solution based on water depth instead of type, because lakes can have waves too! There could definitely be multipliers for each water type though (salt vs fresh), which modify the ceiling for the amplitude of the waves generated by the noise function. You could also perform a check on each chunk to see if it has a water block at the predefined sea level or above; if yes, the chunk must be part of a surface puddle, pond, lake, or sea. From there, you could perform more complex checks to determine the water start and stop points in each block column (with the final check set at sea level) by starting at the top of the column and finding the highest water level(s) and their corresponding depth(s). Once all the start and stop points are found, you have a surface water map. You could define rules to define the various water landforms, etc. Weather then modifies the wave function that is applied to the surface water blocks in a landform with interpolation to a calmer surface at the shoreline.

Edited by VanillaBryce
clarification
Posted

...blocks get generated when someone gets close, you don't have to do the whole world at once. But, yes, there's a mechanism in there to generate big blobs o'water, and at some point it will know how big the blob is going to be, and at that moment it can generate a block-by-block flag for areas near shore (little waves, or breaking waves) and areas way out in the ocean blue (big swells). If some fool wants to run out into the middle of the Pacific and set up a one-deep private island, the waves can wash them off and into a shark and it's their problem.

The lack of sharks, now, that's everybody's problem.

Posted (edited)

That should remain a render-time matter. Even on fairly high-end systems, you are forced to choose between faster movement and view distance. In the illustration, you have a view distance of, what, 16? 24? Yes, you can make some very pretty things with that. But you will also not see land in time to avoid running aground with a quasi-realistic boat. And for me, seeing the land on the distant horizon was the whole point of exploring. A huge flat surface with nothing complicated to render means I should be able to increase view distance, not be forced to decrease it.

If you are going to go with such a short view, it should be rather easy to just count the water blocks around you, factor in the wind speed, and display a mask of the computed wave heights. If you have unused GPU, you can turn up the view distance to whatever your machine can handle. But please don't put that into mapgen. People with potatoes already have enough problems. Enough so that they can easily crash the server when they think they are just seeing lag spikes, causing problems for the rest of us.

Edited by Thorfinn
  • Like 1
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.