I made 1000 balls in a VR Ball Pit

I couldn’t find this game anywhere, so I figured SOMEONE had to make it.

Here’s my take on a Virtual Reality Ball Pit. I aimed to recreate the most authentic children’s play pen experience possible, except I focused solely on the most logistically challenging part: large-scale physics simulation.

It seemed like a Virtual impossibility, so I down-scaled visuals and audio to make it a Reality. The audio design is my next focus: It’s possible to use lightweight math to determine the volume and duration of estimated collision intensity, but I’m unsure how long it will take, or if I’m overlooking any easier solution to audio design (without relying on Nodes).

I want to share the lessons I learned, and the pivots I wasn’t expecting:

  1. MultiMeshInstance is not meant to render a thousand large objects up close. Its single AABB makes it unfit for dividing a thousand neighboring balls. Frustrum Culling proves more efficient, at least for this straightforward scene.
  2. It’s uncanny how a single one-liner shader reduced 1000 draw calls to 7, one for each color.
  3. Godot in particular is not efficient with active occluders, but I don’t think any system would be at this scale? It sounds possible to make a lightweight formula for spheres and visibility, but didn’t seem like the best bang for my buck (My buck being limited free time)…
  4. C++ makes 90% of the optimization, and the other 10% is lower priority. My system can maintain a steady 120 FPS with chaotic thrashing and splashing, and there are so many opportunities to optimize further, but they all demand the time and attention of a full-time programmer.
  5. Chasing performance sacrifices polish in many, many ways. Specifically, giving up Nodes for the RenderingServer and PhysicsServer is incompatible with nearly all VR interactable libraries, and sound design becomes harder to manage. However, it’s okay as I see this as an experience moreso than a video game.
  6. I’m a huge fan of the team behind Godot XR Tools, I love to see the VR community thrive and grow! Let’s simulate more fun experiences in VR.

What do you think? I’d love to hear your feedback, or what you’d like to see next.

2 Likes