billiards icon indicating copy to clipboard operation
billiards copied to clipboard

Need help for masse shot

Open lo-th opened this issue 5 months ago • 8 comments

Hi i try to implement cue up/down to do masse shot i need help, it works well in pooltool but code is very different. If you have any information or leads, that would be great.

lo-th avatar Sep 23 '25 06:09 lo-th

i think solution was here https://github.com/ekiefl/pooltool/blob/main/pooltool/physics/resolve/stick_ball/instantaneous_point/init.py

lo-th avatar Sep 23 '25 14:09 lo-th

I believe the physics is already in place for masse shots, so the missing part of the puzzle is to determine the initial spin on the white ball based on cue impact point and angle and a way to aim the height angle of the cue (hold shift and move mouse forward and back?)

tailuge avatar Sep 23 '25 14:09 tailuge

i add slider for cue up down 0 to 90 but yea have to calculate the good ball.vel, ball.rvel at cue hit function

unitAtAngle(aim.angle, aim.phi) and cueToSpin(aim.offset, ball.vel, aim.phi)

( aim.phi is theta on pooltool )

lo-th avatar Sep 23 '25 15:09 lo-th

yes physics is already in place i see some curve trajectory in my experiment but i don't find the right formula floor should give high friction so high rvel

lo-th avatar Sep 23 '25 15:09 lo-th

https://osmane.github.io/billiards/?ruletype=threecushion

osmane avatar Oct 15 '25 19:10 osmane

Wow that is really amazing, can't believe you got bounce shots and made it all look so good. I think the masse is working but when I hit the right side of the ball with raised cue I expect to ball to curve right but it goes left. I really need to look at the changes you've made as I imagine it took lots of work to get this far.

tailuge avatar Oct 16 '25 18:10 tailuge

Thanks! I jumped through hoops trying to explain the spin issue on massé shots to the LLMs, but in the end I had to fix it by hand. The latest deploy is probably newer than what you tested. I had the LLMs write almost all of the code, so maintenance and reviews could be a headache later. I’ve now added an NPC player for single-player and practice modes. Once I wrap up single-player + NPC + camera work + a procedural table texture, it should be more playable. Spent a lot of time on it, but I had fun.

osmane avatar Oct 28 '25 12:10 osmane

Incredible, I'll put a link to this fork in the readme as it has so much new work in it. I can only imagine the skill to convince the LLM to stay on course thats the new skill set to have.

tailuge avatar Nov 07 '25 11:11 tailuge