Creating Cozy Sandbox Sandcastle with a Focus on Water & Sand Simulation
We spoke with Fabien Weibel, founder of Bubblebird Studio, about developing the cozy tropical game Sandcastle, refining its water and sand simulation in Unity, shaping its gameplay, and how player feedback helps improve development.
Could you please introduce yourself and tell us about your previous projects and what you enjoy most about game development?
Fabien Weibel: I studied 3D animation in France. I worked as an art director and director on different animated series. I worked in Paris on a project for Rovio (Angry Birds). They had a series called Piggy Tales, it was a really cool experience. Then I moved to Luxembourg to work on an animated series project that I developed when I was a student. And around 2019, I started working on my first game, Haven Park, as a part-time project. By 2021, I created my company to publish it. Then I worked on my second game called Trackline Express, and now my third game, Sandcastle. My background is mostly in 3D animation, but I later taught myself game design and game development.
Sandcastle building is a very interesting concept. Could you please share how you came up with this idea – maybe some specific event or a place where you had a vacation inspired you?
Fabien Weibel: It's funny because initially the game was not about building sand castles. It was a much larger project and way too complicated. I decided to re-scope it, because at the end of last year, I had been working maybe eight or nine months on it and I didn't know where it was going. It was getting way too complicated, and I wasn't sure what I was doing with that. So at the beginning of this year I reflected on this, and I thought, "What does work on this project, and what doesn't?" Then I took the only few things that were good, working well, and with which I was happy: the water and the sand simulation. I thought, "What kind of game can we do with that?" It became pretty obvious that a game about building sand castles would be the way to go. When I looked online to see whether there was already a similar game, I was surprised there weren't many, and I thought, "That could be a nice niche to go in, a cool concept to explore." That's how it started. So officially, the development of Sandcastle started at the beginning of this year, but it had a much longer development process before that.
Let's move to the technical part of the development: the engine and the software that you use. Did you come up with some custom techniques? Were there any specific challenges during development?
Fabien Weibel: I use Unity because I started my first project on Unity. I built my toolsets around it, and I'm quite used to the software. The simulation itself – the water and sand – is all made by me. I didn't use any plug-in for this because there's basically none that suited my needs. And also because that's something that interests me to build by myself. I didn't know at the beginning how to implement fluid simulation equations, so I had to look online for scientific papers and try to find what the state-of-the-art was. I found a few papers that were really interesting, and I decided to base my simulator around that, especially for the water. For the sand, I had to derive that a little bit. It is actually also considered a fluid in the game, but with much more viscosity and damping, to make it look more like a solid. But the general principles are the same.
The main challenge with that was to make the simulation of the sand and the water work well together because I implemented erosion and sedimentation in the game. In order to optimize the game and make it run on a good range of machines, I had to run the water and sand simulations at two different resolutions. That was quite tricky because the water/sand coupling created a lot of artifacts and glitches in the sand, some kind of interference. I'm not sure what happened exactly, but it was really hard to find ways to avoid that. I ended up fixing this issue by introducing some random noise in the sand simulation to kind of smooth everything a little bit. It's cool because, as a byproduct, it adds a little bit of this sandy texture to the beach.
So, your previous projects weren't connected with the water and sand simulation. You built it for this project from the very beginning.
Fabien Weibel: Yes, correct.
This picture shows the implementation of a highly requested feature: the ability to control Erosion and sedimentation factors.
Do you remember some specific aspects of the development when the sand or the water didn't behave like you wanted them to? For example, when a tower collapsed when it was too thin, or damp sand wasn't holding its shape, or maybe something else that you can remember – some recurring problem, something that a player could encounter, and how you overcame this obstacle?
Fabien Weibel: Yes. Actually, very recently, when I launched the demo a few weeks ago, a few players noticed that the water was sometimes emerging from nowhere. For example, when you were digging holes with the shovel, the hole would fill up with water even if there was no water around it. That was annoying, and that's also something I noticed before, but for some reason, I thought, "That should be good enough," and clearly that wasn't.
Because of the players' feedback, I decided that I should take this problem seriously and really reflect on it. Even if you were putting a little bit of water at the top end of the beach where there is only sand, the flow would just grow in an unnatural way; water was coming from nowhere. I really wanted something to be much more reliable and to behave like real water. It was important to me. So, I spent a few days going back to one of the papers that I read to try to understand where I diverged. In the process of optimizing and trying to make the game lighter, I actually changed the behavior of the simulation. So I rewrote a few parts.
Fortunately, it worked, and the water was behaving much more naturally. I was happy because these things are always some kind of rabbit hole. You never know if it's going to be just one day of work, or you'll end up working a full two weeks on that because you just can't find the right way to make it work. Especially with this kind of simulation, where the problems can arise from so many things, like small numerical errors that accumulate over time – just very subtle things that you can't see at first sight. But I think it was a good decision not to scrap everything and just go back a little bit to the basics and work from there.
That seems to be the kind of simulation that can behave in unexpected ways, and such a thorough approach helps. Probably, these are things that only become visible through player feedback – something you can't always catch during testing.
Fabien Weibel: And by the way, to reflect on that, it's very important and cool to see all the feedback from the players. I use them a lot. I read many comments on Steam and Discord. I try to take into account what players think about the game's current state and what could be improved. If there is any suggestion that I can implement in the game. It's good that players' feedback can reveal to you some of the things you don't see anymore; that's really important – to playtest and confront your game with your player base.
Were there some gameplay ideas in the comments from players that you actually implemented into the game or that you find interesting and would like to implement?
Fabien Weibel: One that I find really interesting and I want to implement – it's already an idea that I have, but I see it a lot – is to have more interactions with some kind of mini-games about defending your castle because I see that a lot. People want to have small crabs that try to attack your castle and destroy them. It's really something that I would like to do. The core of the game will always be a cozy sandbox, but I'd like to add a few gameplay elements that are optional and not intrusive, but that you can discover sometimes by accident or just by trying to combine different things.
That's what I'm working on right now. For the full game, I hope to be able to add this kind of interaction, mini-games, and small gameplay that can emerge from the current game that I have with the simulation, with the sound, with everything that's happening in the game. That's really something interesting.
Today I added inflatable penguins, and adding inflatables was an idea from someone on the Discord, I think. And decided, okay, I like penguins, let's add an inflatable penguin.
That sounds great to make it optional, so some players can focus on building while others take on defending their castles. There are several different beach layouts in the game – does the physics adapt to these different environments and water behavior? And if so, what tools do you use to implement it?
Fabien Weibel: The simulation algorithm is the same across all beaches. What changes is the beach topology. I can also change some sand parameters, so if we want sand with more structural integrity, we can; water with more viscosity is also possible. But the main difference is really the topology, and that changes quite a lot, actually. It's something I noticed: small changes in the topology of the beach over time create a lot of different ways the terrain can evolve.
There are two layouts – the creek and the delta – that have new elements. They include water inflow. Some areas on the map are where the water can be generated and create flow. That's also something really cool to play with because then you can create dams; you can create different channels for the water to go into. I've added some water mills, so it's fun to see the wheel spinning with the currents of the small rivers you create, and to place boats in the current. It's really cool because you can make boat races and stuff like this. Everything you used to do when you were a child playing with this kind of thing is possible.
It's also interesting to see, especially with the delta layout, how the sedimentation works because, surprisingly, it creates some realistic patterns. That's really nice to see in action. You can even accelerate the simulation to see it evolve rapidly. From time to time, I let the simulation run for a while just to make sure everything works over time, and when I come back to my computer, I'm sometimes genuinely surprised by what water literally drew on the sand. It's really interesting to see that you can, with quite simple rules, create some really rich visuals and rich environments. That's something I really like to play with.
This is a screenshot from one of my Blender files showing the research I did for many different biomes. I’m currently using only 5-10% of these plants, but I’d like to add more biodiversity in the game:
This is a work in progress on new gates that help you control the flow of water:
The game features exploration elements – players can find hidden treasures and collect some items. How did you come up with this idea, and how did you implement exploration in a sandbox game?
Fabien Weibel: It came quite naturally because I remember when I was playing at the beach as a kid, even sometimes as a grown-up, I admit, it's really natural to collect things that you find on the beach, like seashells, sea glass, sticks; everything interesting you can find – you want to collect them, either to decorate your castle or to bring home. I thought, "That's really something that I'd like to have in the game." I'm also thinking about adding more elements to help you find items hidden underneath the sand, like a metal detector. I'm even considering adding a few crafting gameplay elements; for example, combining different elements together could create a new one. That's just an exploration; I don't know if it's going to end up in the final game, but that's the kind of thing I'm thinking about right now, just to make the gameplay feel a bit richer.
One of the new items: a remote-controlled speedboat:
More interactive items are always better. It's great that we can use very diverse things in building castles. Is there anything else you'd like to add about how players have responded to the game so far?
Fabien Weibel: Overall, I'm happy with how the players received the game. I wasn't sure at the beginning. I had good feedback on social media. The posts are doing well, and people are responding really positively to what we share online. But I'm always worried about showing something that doesn't meet people's expectations. You show a video that looks really cool, but when the players actually try the game, it doesn't feel that nice to play. I'm relieved that I got such positive feedback. Even the negative ones are interesting because they help me to continually improve the game. I'm really thankful to the community for being so positive and helpful with the game. It's very encouraging.