Marble Run Simulator 2024

Hi everyone ! Here’s my latest toy : Marble Run Simulator, which lets you build your own marble track.

It’s playable here on Itch : Marble Run Simulator by SvenFrankson

(if you’re using a mobile, this version : Marble Fall, does not lower Canvas resolution like Itch does)

I hope I’ll be able to make a user-friendly version of the track element editor (so custom loops can be created)

Thanks for you interest and have a nice day !


Pretty good. 2 cent for you:

  1. Make option to select a ball to be followed be camera
  2. Allow zoom would be nice on the first link (touch too)

Second link has zoom.

Good job :slightly_smiling_face::+1:

1 Like

This is SO FUN! It makes me want to watch a ton of those marble races videos :rofl: Also reminds me of building coasters in rollercoaster tycoon :slight_smile: I love it :smiling_face_with_three_hearts: Here’s my design :slight_smile:

Are you using Havok for the ball physics?

I like the interface for building the tracks, I have a small suggestion: allow deleting track pieces with esc/del as it’s easier than having to click on the “X” button every time

also ccing @PirateJC as I feel he’ll LOVE this too hehe

1 Like

This is absolutely incredible!!! I LOVE it!

Would you consider adding it to this thread for consideration to be included in the upcoming Babylon Release Video?

Babylon 7.0 Release Video - Community Submissions! - Announcements - Babylon.js (

1 Like

@Treedbox Yes some alternative viewpoint would be a good idea thanks, I’ll work on it on future iterations. Camera should work on both version, that’s a bug !

@carolhmj Thanks, nice circuit :slight_smile:
I did not use Havok for physic, mostly because I use a Path-Sphere intersection, and there’s no PhysicsShapeType for that.

@PirateJC Thanks, it would be a pleasure ! I’ll add it to this thread next month, hopefuly I will have improve it by then :slight_smile:


Hi ! Today is Monday update, with…

  • A new circuit part, the Split, which alternatively sends the marble left or right.


  • A redesigned UI layout that works better on mobile.

  • An optimized Ball physic.

Thanks for you interest and have a nice day !


Hi ! Today is Monday update, with…

  • A new circuit part, LayerTurn, allowing to build a circuit accross multiple layers on the depth-axis

  • A reworked Circuit Editor making it easier to work with procedural elements.

  • A toolbar for camera, sound and timescale manipulation.

  • A reworked and more responsive main menu.

  • More demo tracks

It’s always playable here on Itch : Marble Run Simulator by SvenFrankson

Thanks for you interest and have a nice day !

1 Like

Yessss the splitter part is so much fun!

Open source? Pretty please?

Yes it is, source code is available on my Github GitHub - SvenFrankson/marble-fall

1 Like

Hi ! Today is Weekly update v0.1.2

  • Add FlatJoin circuit part

  • Add Tracks Start/End meshes where relevant

  • Add bumpers to slow down balls on Split and Join parts.

  • Camera automatic modes (Ball and Landscape) disconnects on player input.

  • Camera mode now has a separate always visible window.

  • Fix bug with ToolBar resizing.

Thanks and have a nice day !

Says that repo is missing.

Yes I switched it to private for a few days, I wanted to clarify a bit the Licence under which it is released (now CC BY-NC).

It’s back online now :slight_smile:

Truly Breathtaking!
Especially for Rube Goldberg enthusiast who love the combination of a physics engine and 3d and if old enough remember the classic The Incredible Machine games.

I didn’t see a package.json in the project.

Does the build process generate the marbe-fall.js bundle via:


How should I build or run it?

Btw, It seems that currently there is a linking process to your local fs directories named mummu and nabu, are they needed in order for it to run locally?

1 Like

Yeah the “init repo” only makes sense on my station.

Currently, I work on three repos at the same time,

Nabu GitHub - SvenFrankson/nabu: Math functions for BabylonJS-based projects which are a few very simple tools I tend to use in many projects

Mummu GitHub - SvenFrankson/mummu: Generic functions for BabylonJS-based projects which contains everything related to Intersections and collisions

And Marble Run Simulator

What I do now, because I do many edits in Mummu while working on Marble Run Simulator, is that I have Symlinks pointing to Nabu and Mummu repo. This way I can seamlessly work on Mummu or Marble Run Simulator, then commit to both project separately.

I know that I could achieve that (maybe with less hassle concerning Symlink creation ^^) with a more standard build process, but

  • I have low skills in theese domains
  • Everytime I’ve tried to setup this kind of behavior, I eventually found it less efficient (might be because of the previous point ^^)

I’d take any hint about the standard way to do this with great pleasure ! But no need for a PR, it’s very likely it would collide with my homemade flow.

That being said, if you want to run it locally, you can !

  1. Clone project
  2. Add a “lib” folder
  3. With the following architecture

Mummu and Nabu files can be found at the GitHub links above.

Then tsc tsconfig.json should work.

(there’s a make_build.ps1 that I’ve written yestersday, it serves at copying only the runtime-relevant files when I want to update the online version)

(ok now that I’ve written the build process, I realize its sub-optimal when aiming at sharing it ^^)

Thanks for the in depth explanation.
It seems that the build process for a production version is less important. As you said, whatever works process wise. However, for the development phase, with ViteJS, you can set a development server that hot reloads changes you make in ts files and greatly speed up your process by allowing you to view changes you make instantly in chrome without refreshing the page.

As for symlinks. Yes, setting up a monorepo correctly and hooking things up is far from straightforward but at the end of the day it takes a few minutes and you only do it once and then you can also start publishing the utility packages to npm. If you want me to do at some point just say the word and I’ll prepare a PR which you can examine and decide if it works for you.

Hello ! This week’s weekly update is live

The main change is the addition of a way to evaluate the adequate circuit bank at two elements junction, which increases the amount of valid elements combinations.

The Loop piece is now procedural with a “loop count” parameter and can be extended along the Z-Axis.

Again, thanks a lot and have a nice day !

Hi ! Weekly update is live


  • Add procedural Spiral MachinePart


  • Replace vertical Wall with an horizontal stand

  • Add 3D background

  • Dragging piece is now done in the plane orthogonal to camera direction

  • CreateMode shows a helper grid orthogonal to camera direction

  • Reduce computational cost of Track bank

  • Picking Ball in create mode now has priority over picking MachinePart

  • CreateMode Grid opacity is added as an option parameter

  • Reduce position randomness when adding a new MachinePart

Thanks for you interest and have a nice day !

1 Like