Godot Version
4.5
Question
Hello, so I wanny prototype a game. Imagine you have a white screen and in the middle you see a hole and inside that hole is a ball. You click the ball, it jumps around in the whole, bumping into walls. The bumping makes particles break off the wall and the hole gets bigger. This goes on and on and on, so in theory, the hole could become huge.
In my case, I want an art style like Gnorp Epilogue. Very pixelated, very basic.
Some noteworthy things:
-
Since our world is white, we can just set env color to white and have an infinite world.
-
Only the “border” of the cave is destructable in a sense. In a sense, we don’t destruct the world but grow the cave. Which can be represented by the border of the cave alone, the cave is then just the “full stencil” given by the cave border.
-
Once the cave has a certain size, the ball in the middle stands still and starts ingesting the particles form the wall and little npcs start digging the cave bigger. It’s an incremental game.
-
These NPCs might fly around, walk around - no idea yet.
-
If we destroy a part of the broder, we spawn particles that build piles at the bottom of the cave. 4 particles might grow the pile by X, so we have some kind of aggregation.
Now my question is: How do I best model the cave and the widening of it/destruction of the world? Note that it doesn’t need to look fancy.
I thought about storing the cave border as points, one for each pixel (for a given resolution). Then somehow figure out “inside” and “outside”, would need to look up a good solution to this but certainly doable. This also has the benefit that we instantly have point NPCs can interact with. They can walk/fly to a border point. We spawn some particles and despawn that pixel, moving the border.
I’d have written all that in a compute shader.
Is that a good approach in general? Is there any better approach?