Game
Floating Sandbox
3 years ago

Floating Sandbox April Status Update: Shaving Yaks for Better Waves


Dear shipmates,

We've finally emerged from a few weeks of cataclysmic coding, proud of yet another series of physics improvements that will be the focus of the upcoming 1.16.5 update. This time the improvements took a life of their own and made us wander through various perilous lands - a story definitely worth telling. Sit back and relax.

Bores Getting Boring

A few weeks back we finally decided to listen to a plea of yours and enlarge the world map from its former 5km width to 10km. After vectorizing a few loops here and there to try and maintain the simulator as performing as it was before the enlargement, we started noticing that due to the new world width, long-running interactive waves - i.e. user-created waves or tsunami's - would become too steep once on the other side of the world, causing ugly oscillations on the crest of the waves:

20210428_140047_309_rms_titanic_with_power_-_by_gabriele_giuseppini__michael_bozarth.png

Truth to be told, these oscillations (which also occur in nature and are called bores) were already visible in 1.16.4, but the new world span and the consequent increased travel time of waves exacerbated the oscillations to the point that they were not bearable any more.

We decided then to go back to the drawing board and deep-dive - again - into our implementation of the shallow water equations, which form the mathematical basis of the simulation of our waves. Some research into scholarly articles indeed confirmed that the main drawback of our implementation is indeed the generation of bores, and that many academics have tried over the years to come up with alternative formulations of the equations that exhibit less artifacts. At some point we landed onto a 2012 paper, "Improving the stability of a simple formulation of the shallow water equations for 2D flood modeling" by de Almeira et al., which inspired us to come up with our new implementation. We highly recommend reading this paper if you are interested in water surface simulation, all that's required is some basic calculus knowledge.

Rendering Artifacts

Anyway, we now had our shiny, new waves that were behaving much better than in earlier versions of Floating Sandbox, but a new issue promptly popped up, in the true spirit of yak-shaving: the wave steepness made possible by the new equations was causing horrible display artifacts when viewing the world from afar:

20210428_142808_927_default_ship.png

This time it was a rendering issue, whose sole responsibility lied in the shader responsible for the water surface. We tried a few things over the span of a handful of weeks, and none seemed to work out nicely, until, at the verge of despair, we had the idea of using the second derivative of the waves' profile as a hint to position the contour drawn by the shader, and voilà, artifacts visibly improved with only a marginal loss of rendering performance:

20210428_143658_734_default_ship.png

Concluding

If you've managed to read through our long rant, you should have realized, by now, that the next update of Floating Sandbox will contain *at least* improvements to the interactive waves, plus a world that is double the size of the previous version. What's more, the new waves also got some damping which removes most of the flickering that would plague the water surface in earlier versions of the simulator.

20210428_144822_369_default_ship.png

So, how long before the next update, we hear you asking? Well, in the next couple of days we're gonna move this new version to beta phase, and allow our testers to try and spot as many issues as possible with the new code, while we look into implementing one of the last remaining hydrodynamics features - but that's a secret for now, and you'll have to wait for a few more weeks.

Stay tuned!

1
1
1


16 comments

Loading...

Next up

1.12 Screenshot #1

Sneak Peek at the New Water Flood Algorithm

Short intro of us 💕✌️

We're an eletro duo based in Seoul 🇰🇷 Heavily influenced by the 90s.

Our new album #Xennials is all about the nostalgia of that era 💽 CD listenin 📟 beeper beepin 💾 floppy disks floppin days 😎

Stream now! 🎧

https://open.spotify.com/album/3YwWhnHWVy5cA8XOpbaGRA?si=8E9awqU…

Did you know that today is #InternationalJazzDay? 🎷😎

No? 😯 Well, we couldn't pass up this date!

And what better to celebrate this day than #Pecaminosa #OST? 🎷

Let us know what you think about it and have a great weekend!

Path of Kami: The Evolution of the Lore

Enemies can also suddenly spawn through Realm Rifts. These Rift Spawns are going to be stronger than the ones wandering around. TBD on the enemies... #screenshotsaturday #godstear #madewithunity

I have added rewards for quests so that villagers can give you something in return for your hard work helping them. 🥳

I want to know - what's your favourite quest reward?

Heya! I wanted to show some gameplay progress i made so far. I hope you like it ^^

Just a Pico sprite

Demonstration of the spells and their effects :)!