Pipedown - a sliding pipe puzzle game

I’ve been playing around with Rapier Physics in a Three.JS project and I’m very impressed with Rapier Physics. I resurrected an old game that was made with Adobe Director and the Havok Physics plugin back around 2001. Using Three.JS with Rapier https://niksgames.com/pipedown/ Give it a try and report back. I suspect it is far from bug free!

The game has 50 levels, although I suspect some of the later levels will be impossible. You click on pipes to slide them into place. Click a green arrow to slide the selected pipe. To complete a level you must create a path for the ball to the create that uses every pipe available for the level. Once you’ve completed the pipework, click the ball, it will drop through the pipes using the Rapier Physics engine.

I’d previously tried Cannon ES but that didn’t work. Sending a ball down a pipe is a challenging physics problem. Usually a Physics engine is expecting convex shapes. That is shapes with no recesses or holes. Obviously a pipe has a hole.

I’ve tried the game on my MacBook and my Google Pixel 6a and it is happily maintaining frame rate. I’d love to get your feedback. You can download the repo at GitHub - NikLever/Pipedown. The Physics.js file is based on the Three.JS example.

My recommended physics engine for a Three.JS project is now Rapier.

9 Likes

@Nik Lovely bit of craftsmanship here, it’s a cool game for sure!

does Rapier use three-mesh-bvh under the hood do you know? I’ve always wondered how Rapier compares in performance to the custom physics setup from the bvh library

I suspect not. I’m no expert on three-mesh-bvh, but Rapier comes from a rust background and the JS version uses wasm. So I doubt there is any use of three-mesh-bvh under the hood.

1 Like

Great job!

I want to learn more about rapier and threejs but I can’t find much info about this online, I found a few resources with react fiber but I don’t like to react.

Do you have any courses about rapier and threejs but not react fiber?

Simple concept but addictive. Its really nice

only thing i would changeis the UI. The drop button on large screens is hard to notice in the bottom right corner, and also the tutorial tips have no indication of how many pages there are.

well done!

1 Like

I might do a Rapier course. There will be a couple of recipes in my Three.js Cookbook course.

Addictive is what I want to hear. UIs are always a nightmare. One person wants them discreet another wants them glaring. I like your tutorial message count though.

Thant would be cool I will definitely buy that but please go native on threejs, you would do a favor to the react community as well because 80% of react users have a basic understanding of what is happening on the threejs side and because of this they get stuck with basic stuff, I’ve seen this over and over…