Lurker News
Hello HN! We’re a small creative studio specializing in real-time 3D experiences. Netlify approached us to design and build an interactive experience to celebrate reaching 5 million developers.

Inspired by the classic game Marble Madness, we created a gamified experience where users control a ball through playful, interactive levels. The goal was to blend marketing content with the look and feel of a game to engage users.
The app is built with Three.js [1], using our custom render pipeline and shaders, and uses Rapier for physics simulation [2]. The 2D content is overlaid on the WebGL view using CSS 3D transforms for a seamless integration with the 3D view.
We’d love for you to try it out and share your thoughts!
[1] https://threejs.org
[2] https://rapier.rs
EDIT: More info on this project here: https://www.littleworkshop.fr/projects/5milliondevs/

Comments (230) 91 threads

Show all comments

Showing thread 18 of 91

pizzafeelsright3 replies#
I am very curious how the physics feel realy-wordly for the most part at the mathematical level. Are there existing algos that define the gravitational pull of the "Facts" spots or was there a lot of tweaking?

The 45 degree rotation does require more dual input than I care for which makes me wonder if that is a design choice.

mrighele2 replies#
> The 45 degree rotation does require more dual input than I care for which makes me wonder if that is a design choice.

Well they say "A Marble Madness-inspired WebGL game" so there is not much choice about the rotation [1]
[1] https://en.wikipedia.org/wiki/Marble_Madness

pizzafeelsright#
Looking through the linked docs I see the physics frameworks.

Of all the programming I find the 3D gaming to be the most complex and unattainable at my current knowledge or intelligence level.

coldpie1 reply#
The NES Marble Madness port (and probably others) had a choice of control schemes, where the D-Pad is either mapped directly to the screen (Down is down) or mapped at a 45 degree angle (Down is down-right). I never could wrap my head around the latter, but I can see the benefit given the stage layout mostly uses 45 degree paths.
egypturnash#
The second scheme works pretty well if you can turn the controller 45º. I never had an NES but I am pretty sure some of the isometric games I played on the c64 and Amiga had this as an option.
franck#
The physics engine we are using is Rapier 3D which does a lot of the heavy lifting, even though we had to tweak a lot the physics properties of the ball and surfaces in order to get something that felt right. For hotspots specifically, we implemented the magnet-like effect with custom code (by applying a force that pushes the ball toward the center and slowing it down at the same time) as there is no attractor primitive in Rapier.

The dual input is indeed a consequence of our isometric-view design choice, which I agree may not be the easiest way to control the ball. But the 45 degree angle just looks cooler in our opinion.

munchler#
FWIW, you can mentally remap the keys to partially eliminate dual input. E.g. Pressing down and right together as a single input moves the marble southeast. This considerably simplifies game play for me.