# Caromball Website : Billard game using babylon.js

**URL:** <https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829>\
**Category:** Demos and projects\
**Created:** [April 12, 2023, 8:12pm UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829 "2023-04-12T20:12:10Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julien31](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@Julien31](https://forum.babylonjs.com/u/Julien31)\
**Post date:** [April 12, 2023, 8:12pm UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/1 "2023-04-12T20:12:10Z")

</div>

Hi everyone !

Our new Website is now online. It is a carom billard game built with babylon.js.  
A brand new billard physics simulator has been created to calculate the ball trajectories.

You can try it out at [https://caromball.com](https://caromball.com) ! (free trial is available)

Do not hesitate if you have some technical advices to improve the game.

Here’s a quick presentation video:  
[https://youtu.be/Eu7p\_stk7b0](https://youtu.be/Eu7p_stk7b0)

Thanks to the babylon.js team 😉

Best regards

---

<div class="post-metadata">

**Author:** ![oriongu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/oriongu/32/40402_2.png) [@oriongu](https://forum.babylonjs.com/u/oriongu)\
**Post date:** [April 13, 2023, 7:36am UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/3 "2023-04-13T07:36:52Z")

</div>

Looks great! Tutorial is well made also 🙂

---

<div class="post-metadata">

**Author:** ![jamessimo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jamessimo/32/26847_2.png) [@jamessimo](https://forum.babylonjs.com/u/jamessimo)\
**Post date:** [April 13, 2023, 7:49am UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/4 "2023-04-13T07:49:42Z")

</div>

The site and graphics are great! Really pro-looking.

My only issue, the physics seems solid, but for me on a 2016 16" Macbook Pro it feels really fast with its physics simulation. Like the balls all move very fast and then stop very quickly. It maybe realistic but when viewing on my screen it feels too fast.

---

<div class="post-metadata">

**Author:** ![samuelgirardin](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/samuelgirardin/32/87_2.png) [@samuelgirardin](https://forum.babylonjs.com/u/samuelgirardin)\
**Post date:** [April 13, 2023, 10:26am UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/5 "2023-04-13T10:26:15Z")

</div>

Looks really cool, about physic going too fast, I can see this behavior only after clicking (or double clicking on the playing surface), like ok I missed my shot, so let s go fast to another round. I did not watch the tutorial, maybe this is in ?

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [April 13, 2023, 10:34am UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/6 "2023-04-13T10:34:31Z")

</div>

Hi and Welcome to the Community,  
You can come back anytime with projects of such quality 😍  
I’m sure the Team will want to see this @PirateJC  
Meanwhile, have a great day 🕶

---

<div class="post-metadata">

**Author:** ![Julien31](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@Julien31](https://forum.babylonjs.com/u/Julien31)\
**Post date:** [April 13, 2023, 9:58pm UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/7 "2023-04-13T21:58:07Z")

</div>

Thank you for your message.

The shot animation is accelerated when you go to the next point by clicking or via the menu “Next shot”.  
Is this acceleration started directly when the shot is launched ? This could be a bug.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [April 13, 2023, 10:22pm UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/8 "2023-04-13T22:22:07Z")

</div>

Nice !!!

---

<div class="post-metadata">

**Author:** ![brianzinn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/brianzinn/32/28013_2.png) [@brianzinn](https://forum.babylonjs.com/u/brianzinn)\
**Post date:** [April 14, 2023, 4:51am UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/9 "2023-04-14T04:51:18Z")

</div>

wonder if it’s using the deterministic lockstep behaviour… i had an issue with one game I made being too slow on some devices, so that’s how I discovered it.

---

<div class="post-metadata">

**Author:** ![Joe\_Kerr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/joe_kerr/32/39017_2.png) [@Joe\_Kerr](https://forum.babylonjs.com/u/Joe_Kerr)\
**Post date:** [April 14, 2023, 10:26am UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/10 "2023-04-14T10:26:38Z")

</div>

I tried robot mode. If the label “The robot is playing” is shown, I guess there is some AI stuff going on? But this seems to freeze my browser for a bit, i.e. there is zero reaction to my inputs. After processing returns, the camera jumps to my last input. Can you “unblock” the Ai processing? Idk, worker? Spread over frames?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [April 14, 2023, 11:17am UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/11 "2023-04-14T11:17:56Z")

</div>

cc @Cedric for the physics speed up part.

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [April 14, 2023, 11:25am UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/12 "2023-04-14T11:25:23Z")

</div>

Wow this is really incredible! I felt classier just by playing 🤣  
If I may ask, since I know nothing about billiards, what is an artistic game? It’s one where you make beautiful shots? 🤔

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/b/9/b9b073950f31c92d8276706447c2d57cfe658a2e.png)

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [April 14, 2023, 11:35am UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/13 "2023-04-14T11:35:58Z")

</div>

> [@carolhmj](#):
>
> what is an artistic game? It’s one where you make beautiful shots?

From my understanding of the definition of ‘artistic’, it must be one where you don’t give a damn about physics, do a clumsy move, but then… “with style” 😁 😆

---

<div class="post-metadata">

**Author:** ![Julien31](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@Julien31](https://forum.babylonjs.com/u/Julien31)\
**Post date:** [April 14, 2023, 2:44pm UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/14 "2023-04-14T14:44:01Z")

</div>

> [@brianzinn](#):
>
> wonder if it’s using the deterministic lockstep behaviour… i had an issue with one game I made being too slow on some devices, so that’s how I discovered it.

Yes. All calculations are done in the client side.  
Only ball positions and shot settings are stored / transferred.

---

<div class="post-metadata">

**Author:** ![Julien31](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@Julien31](https://forum.babylonjs.com/u/Julien31)\
**Post date:** [April 14, 2023, 2:47pm UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/15 "2023-04-14T14:47:56Z")

</div>

> [@Joe\_Kerr](#):
>
> I tried robot mode. If the label “The robot is playing” is shown, I guess there is some AI stuff going on? But this seems to freeze my browser for a bit, i.e. there is zero reaction to my inputs. After processing returns, the camera jumps to my last input. Can you “unblock” the Ai processing? Idk, worker? Spread over frames?

You’re right and this feature is already planned.  
I must isolate the calculation code to be able to run it in a Web worker so the UI won’t freeze during calculations.

---

<div class="post-metadata">

**Author:** ![Julien31](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@Julien31](https://forum.babylonjs.com/u/Julien31)\
**Post date:** [April 14, 2023, 3:04pm UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/16 "2023-04-14T15:04:29Z")

</div>

> [@carolhmj](#):
>
> Wow this is really incredible! I felt classier just by playing 🤣  
> If I may ask, since I know nothing about billiards, what is an artistic game? It’s one where you make beautiful shots? 🤔
> 
> ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/b/9/b9b073950f31c92d8276706447c2d57cfe658a2e.png)

Artistic game mode is a program of 100 figures.  
Each of these figures fixes the initial position of the balls and the constraints imposed for this figure.  
The constraints are essentially the succession of the rails to be touched, and in some cases the necessity to go around an obstacle materialized by a pin.

In Caromball, all artistic figures are presented in the Challenges section and do not result in matches.  
Finding the solution requires great billard skills.  
By the way you may just want to watch the solutions which are often impressive.

Be able to realize all theses figures with the physics simulator (with balls jumps) was a big challenge.

Here’s an exemple in the presentation video:  
[https://youtu.be/j2\_M4-cTBtY?t=39](https://youtu.be/j2_M4-cTBtY?t=39)

In my point of view, artistic game is to the billard what the slam dunk contest is to the NBA.

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [April 14, 2023, 4:08pm UTC](https://forum.babylonjs.com/t/caromball-website-billard-game-using-babylon-js/39829/17 "2023-04-14T16:08:30Z")

</div>

That’s so cool! 😮 The simulation is really incredible
