Closed ekiefl closed 10 months ago
Hi Evan,
Last few weeks I had very little time to work on your project. Mostly busy with final touches of my new house (garden stuff, shed, ect :) From next week onwards I will have more time.
Last time I wrote to you I was busy experimenting with a cue tracking device. Basically same as this one QMD Stroke Analyzer for Billiards | QMD (cue-md.com) http://www.cue-md.com/ At that time I thought that project was dead as their product was not available and was not maintained for a few years and I decided to make my own device. Later on I received the email from the developer that he was out of parts and was waiting for a new batch. Now I can get it for 179$ but I find it rather expensive :)
I thought it might be a valuable addition to your code as well to model cue behaviour and introduce some sort of randomness into the shot. Later on we can hook the data from a device to read velocity and straightness of the que.
By now I assembled HW consisting of:
I'm sending yaw/pitch/roll angles + raw accelerations and gyro readings + timestamp.
[image: image.png]
Now the more difficult part is to make sense of that :)
From what I read in the manual to QMD3 device the que movement looks like this. That is where I stopped. [image: image.png]
Sure I would like to be a collaborator. How can I apply for that? :)
Kind regards, Sergey Lukin +31644533870
On Sun, Oct 8, 2023 at 1:40 PM Evan Kiefl @.***> wrote:
Hi @kerby2000 https://github.com/kerby2000,
I took a look at your changes in #94 https://github.com/ekiefl/pooltool/pull/94. First of all, well done. I'm impressed at your ability to start modifying a foreign codebase.
I noticed most of the things you got snagged on are due to a lack of "pluggability" in the codebase. To address this, I've branched off your code and have been working on generalizing things. You can track that work in progress in this branch.
If you want to continue making changes and contributing to this side project, I would suggest you become a collaborator. Then, you would have permission to commit directly to branches in ekiefl/pooltool, rather than kerby2000/pooltool. Let me know if you want this, and I'll send you an invite.
You can view, comment on, or merge this pull request online at:
https://github.com/ekiefl/pooltool/pull/99 Commit Summary
- 6e5b064 https://github.com/ekiefl/pooltool/pull/99/commits/6e5b064fcf1abaf90dea0f59f55e96ccf6948732 Add instruction for upload
- dbfa29c https://github.com/ekiefl/pooltool/pull/99/commits/dbfa29c23927733cbffb163d97736a6c172143db snooker support v0.1
- 7ab2cda https://github.com/ekiefl/pooltool/pull/99/commits/7ab2cda9c0b6a0908ad880299a223e4c9aeb1992 Fixed few bugs in snooker logic
- 321cd31 https://github.com/ekiefl/pooltool/pull/99/commits/321cd3108a559b83d2075c5a240ea29147b4bf72 Remove .idea
- a4cb415 https://github.com/ekiefl/pooltool/pull/99/commits/a4cb41504b519a120803eadac575e5d3957776eb pooltool already has a settings.json
- a897f19 https://github.com/ekiefl/pooltool/pull/99/commits/a897f1957de8f5ed27da7da9190bca32e1c2a7ec Remove
- a41e663 https://github.com/ekiefl/pooltool/pull/99/commits/a41e6634616d31de78e526add17ab52abc93e488 Remove
- e38b038 https://github.com/ekiefl/pooltool/pull/99/commits/e38b038c1d078e6d276cbb4e24a859313af0d409 Add .vscode/settings.json from main
- 1e7a2e6 https://github.com/ekiefl/pooltool/pull/99/commits/1e7a2e6ab8b0ffe5921a560d63b350c1bab3710b Comments and formatting
- f0c1ede https://github.com/ekiefl/pooltool/pull/99/commits/f0c1ede21cc558fb29e109cb866e3923212a1600 I am separating requirements and requirements-dev
- 14221c0 https://github.com/ekiefl/pooltool/pull/99/commits/14221c09bb7436a1957b2ddb743e62c9e9dfb5d7 Cleaner
- d056f68 https://github.com/ekiefl/pooltool/pull/99/commits/d056f686fcb4ba18569b3d725cb4a2e050847887 Apply black formatting
- 891e43c https://github.com/ekiefl/pooltool/pull/99/commits/891e43cc801ff11261f7e71b494422236ea0f9da We only need the red.blend file
- ffd211d https://github.com/ekiefl/pooltool/pull/99/commits/ffd211d64948883cbdcfa4662839006db91250d2 Move games/ into game/ruleset/
- 60fb61e https://github.com/ekiefl/pooltool/pull/99/commits/60fb61e0fae72784eec1d7fb060499c97e6ecb5d Add GameType Enum class
- 4ab4991 https://github.com/ekiefl/pooltool/pull/99/commits/4ab49916ced9272914fb4aba469b6ac553b8f9aa Return instantiation, rather than class
- 612bf22 https://github.com/ekiefl/pooltool/pull/99/commits/612bf22a3a33126a6be7b1a5c7b36b428ba61ffe Fix
- 03e9db5 https://github.com/ekiefl/pooltool/pull/99/commits/03e9db5cbaaa0f4dc8a54ea08b3254f6abfef1a6 Set type checking to "basic"
- 5b7b6df https://github.com/ekiefl/pooltool/pull/99/commits/5b7b6df97f1c25905b7df6acd5f1f30c4fa21597 Move layouts into gqme/
- bcb0cee https://github.com/ekiefl/pooltool/pull/99/commits/bcb0cee955e2a9f937a04c40fe8444d801ecb2fe Move wiggle out of each Rack class
- e07daed https://github.com/ekiefl/pooltool/pull/99/commits/e07daed2ac437d568e465a02d92976be9623d4cd Start of symbolic logic for table layouts
- af2e450 https://github.com/ekiefl/pooltool/pull/99/commits/af2e45032a2edd904e3d9c5fe586a6b75d5446e0 Rearrange eval logic
- 01e5fab https://github.com/ekiefl/pooltool/pull/99/commits/01e5fab7355cc43e24cf0c900ecced13a7548a7b Add BallParams to get_rack
- 2446657 https://github.com/ekiefl/pooltool/pull/99/commits/2446657e6c53f128fd12f85ef73b5dd364aad829 Use new symbolic system for nine ball rack
- 69f1e78 https://github.com/ekiefl/pooltool/pull/99/commits/69f1e78b8a7607a481ed302dc985a5d9d6119d59 Game no longer holds
rack
object- 9702012 https://github.com/ekiefl/pooltool/pull/99/commits/9702012bcd7836e6f2f060b947794ee5a06f12e6 Remove all Rack subclasses in favor of fns
- 9cb60f5 https://github.com/ekiefl/pooltool/pull/99/commits/9cb60f5939e551151b8b6269d37fba82e00a79c1 With last
- a8617dd https://github.com/ekiefl/pooltool/pull/99/commits/a8617dd5f064029c4dfe7a391e0b31755f34da11 Add test for wiggle
- bc746f0 https://github.com/ekiefl/pooltool/pull/99/commits/bc746f009a00690fee613e374e154c60d8a67e82 Add ability to add a seed
- da37d9a https://github.com/ekiefl/pooltool/pull/99/commits/da37d9a4cc507c9dba59ffbf3dc4ec77f57c5d55 Bunch of small crap changes
- 3e90b79 https://github.com/ekiefl/pooltool/pull/99/commits/3e90b79e51fadda3834b19b84ce1bc0dfa72fbee Complete revamp on higher-level Table ops
- fbc7499 https://github.com/ekiefl/pooltool/pull/99/commits/fbc74998037204220ef6fec212c57657e7dc4f6a Change design slightly -- looks better
- 1f77fb4 https://github.com/ekiefl/pooltool/pull/99/commits/1f77fb45dd7c8b3e873c48db182c5f3f99095643 Update tests
File Changes
(104 files https://github.com/ekiefl/pooltool/pull/99/files)
- M .gitignore https://github.com/ekiefl/pooltool/pull/99/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947 (4)
- A .vscode/launch.json https://github.com/ekiefl/pooltool/pull/99/files#diff-bd5430ee7c51dc892a67b3f2829d1f5b6d223f0fd48b82322cfd45baf9f5e945 (29)
- A .vscode/settings.json https://github.com/ekiefl/pooltool/pull/99/files#diff-a5de3e5871ffcc383a2294845bd3df25d3eeff6c29ad46e3a396577c413bf357 (13)
- M PYPI.md https://github.com/ekiefl/pooltool/pull/99/files#diff-3b96adb0dfd72990b924957ff918fc753755c9654ce5b01a0bf9a36e5436d961 (1)
- M pooltool/init.py https://github.com/ekiefl/pooltool/pull/99/files#diff-31d579b4fb0ff0cdf595bb1c65720df7768e6e9eee4c251c6eecdd5803a19095 (6)
- M pooltool/ani/init.py https://github.com/ekiefl/pooltool/pull/99/files#diff-5f432194a6c2698587be43b02a8c26ebafd5eee98379d1c295e3969caa7544a5 (5)
- M pooltool/ani/animate.py https://github.com/ekiefl/pooltool/pull/99/files#diff-7b0d82875c000d63ade7643f3893e8030a9c20e352f820c9a80ba3a5f992c995 (15)
- M pooltool/ani/globals.py https://github.com/ekiefl/pooltool/pull/99/files#diff-3a73f09b8c78a04c37c1372f7adf00b55ab14a53adab439eea7c1b37d7127c22 (4)
- M pooltool/ani/modes/datatypes.py https://github.com/ekiefl/pooltool/pull/99/files#diff-991c763eca6402ec5b2aa4a2883b83fef4d0ccd3ccb8c0b3116e888e9904e272 (1)
- M pooltool/ani/modes/menu.py https://github.com/ekiefl/pooltool/pull/99/files#diff-1071353db34303b5622eec1ed07ca09d096f9fd25abd175fbf900e7e9baec7c2 (1)
- A pooltool/docs/Rulebook-Website-Updated-May-2022-2.pdf https://github.com/ekiefl/pooltool/pull/99/files#diff-be671ead50211ebf6bd2dac3e62ba4e416542b88ef6478d46e9319c2f610e9d1 (0)
- A pooltool/game/init.py https://github.com/ekiefl/pooltool/pull/99/files#diff-c7d41d14306ab37c9a50a9be4cae120bfcf2827db9f3cc0ee182b5c437968200 (0)
- A pooltool/game/datatypes.py https://github.com/ekiefl/pooltool/pull/99/files#diff-dff077a8f2bc17e825ba96e8708fbff061352a0876feae024fab43316a3c7f61 (8)
- A pooltool/game/layouts.py https://github.com/ekiefl/pooltool/pull/99/files#diff-4be22e2f36ff80c58a3a01df285004b4ee73ac1480e66e23b3f91e8cafb7d49e (394)
- A pooltool/game/ruleset/init.py https://github.com/ekiefl/pooltool/pull/99/files#diff-9d9917e32416f3d14ae74743f2482fe78aada130d193a049335c462c4224c12b (17)
- R pooltool/game/ruleset/datatypes.py https://github.com/ekiefl/pooltool/pull/99/files#diff-18bc6c9ffa3023de9bcc3695404783ce3f2b1d690810d880c0b2245cf004e9fe (6)
- R pooltool/game/ruleset/eight_ball.py https://github.com/ekiefl/pooltool/pull/99/files#diff-14e5eac508d2b718aa1039aaa682e53bc26d86c41b16650feb7831bf26604f12 (9)
- R pooltool/game/ruleset/nine_ball.py https://github.com/ekiefl/pooltool/pull/99/files#diff-4b815242bfe981981cf936b087f620e84275d673db59d316c84c536a7e4e10cc (9)
- R pooltool/game/ruleset/sandbox.py https://github.com/ekiefl/pooltool/pull/99/files#diff-2b96058cc0b73f0419c8749c3e6be2a9375c7e3eae992ce75d09f8ffd21bfbb0 (9)
- A pooltool/game/ruleset/snooker.py https://github.com/ekiefl/pooltool/pull/99/files#diff-7c24df6881da66cc8faf76c35b2aa6bb4295435877b63fae1b95621df7d111e7 (346)
- R pooltool/game/ruleset/three_cushion.py https://github.com/ekiefl/pooltool/pull/99/files#diff-b879a7ba44721d9cbb4f2b8e0c6ad49ec107435271991bc4a386e83e3bf34828 (9)
- A pooltool/game/test_layouts.py https://github.com/ekiefl/pooltool/pull/99/files#diff-872ca99c6296b5abf1e43750a9c353f95559853e953b3317ab50fd8312a20e06 (200)
- D pooltool/games/init.py https://github.com/ekiefl/pooltool/pull/99/files#diff-58fc48835d949458ee782f90aae3a1fe409f1c06cad528274f58662e8c4601ff (12)
- D pooltool/layouts.py https://github.com/ekiefl/pooltool/pull/99/files#diff-0dea6a72d6a235d05eb2c1c5dfbaa58f8f4d1b9e9b9b484bc15437dc4868f5cb (236)
- A pooltool/models/balls/set_2/black.blend https://github.com/ekiefl/pooltool/pull/99/files#diff-7c3a6df28a3114bec324a73a312619c67a0757e2970bbedd53107fb3cf58cb3e (0)
- A pooltool/models/balls/set_2/black.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-9d19bdd9ed0cd23da04428371c80d25e033061bfd2c2bf40b02034eae5e67f2d (0)
- A pooltool/models/balls/set_2/black.png https://github.com/ekiefl/pooltool/pull/99/files#diff-e8d701b1300c70375189cba1e30b7ddd5203e79980583c209e925a8ea4b5f4e4 (0)
- A pooltool/models/balls/set_2/blue.blend https://github.com/ekiefl/pooltool/pull/99/files#diff-f2642f9bbcf75044f6a4923df360a25d7e3d0c69995a1a17a8d1e040e2abe6bc (0)
- A pooltool/models/balls/set_2/blue.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-d9440449bb4884b2a64260dae5c6dff921e9dd93604178b15a3e47bb80958a0e (0)
- A pooltool/models/balls/set_2/blue.png https://github.com/ekiefl/pooltool/pull/99/files#diff-fe2dd06ac3f05f77b05d09f12c3394816856d0addd200c2a35e35f1a6e3ea652 (0)
- A pooltool/models/balls/set_2/brown.blend https://github.com/ekiefl/pooltool/pull/99/files#diff-f76cdf8d01fef6ef91475785a0cfbbb2004cc7da0fb09d072f97dbc05668746c (0)
- A pooltool/models/balls/set_2/brown.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-1da111c0fd60d074a49f718a0d285f8cf8b18b696f47139dbaca2446fae524d8 (0)
- A pooltool/models/balls/set_2/brown.png https://github.com/ekiefl/pooltool/pull/99/files#diff-1607057f83a9c07a30df70563cfe6e543b4d2cf5d37686963cc09827f6668645 (0)
- A pooltool/models/balls/set_2/green.blend https://github.com/ekiefl/pooltool/pull/99/files#diff-6b56ce6bed28c5442b2c65dc98c3cc1bd1efe75ba806e7483acb5acf00775bf9 (0)
- A pooltool/models/balls/set_2/green.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-a4ac9a438f2005939a7f499c6feb427a7a19dff8574e9213e1d7f398ca9cac54 (0)
- A pooltool/models/balls/set_2/green.png https://github.com/ekiefl/pooltool/pull/99/files#diff-b1154432f44427644c7b27f29c22a7d86eb58aec6645c3aa50db6421b94bd586 (0)
- A pooltool/models/balls/set_2/pink.blend https://github.com/ekiefl/pooltool/pull/99/files#diff-f98dfef51ed1f77e277244e2871d3cb12a27e41180c2608bc45ea74e23bf07cb (0)
- A pooltool/models/balls/set_2/pink.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-718c4f59db927b93e043c45e07714977e2974718d8746e9a176849ae7438c55a (0)
- A pooltool/models/balls/set_2/pink.png https://github.com/ekiefl/pooltool/pull/99/files#diff-b3acc4592d9a74e066d80f34e3fa331a33d7a49c454d823b53adbd624916cc62 (0)
- A pooltool/models/balls/set_2/red.blend https://github.com/ekiefl/pooltool/pull/99/files#diff-a04c6edd31a02962bd141b0334b06efbc96ca7faa19a6f1db50d29658249d047 (0)
- A pooltool/models/balls/set_2/red.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-f9cfee454415953766038ec99ac4b9411f7d76b673f573d077af4d156cc564dc (0)
- A pooltool/models/balls/set_2/red.png https://github.com/ekiefl/pooltool/pull/99/files#diff-6985bc3b3ad4adc6f72bdc8acd4ed884a348181920d172fa931f45a59ec29b32 (0)
- A pooltool/models/balls/set_2/red1.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-31e0a4aeebced51895cdfefe92e332c540e50cf708f2c6fb47a28d4f59629344 (0)
- A pooltool/models/balls/set_2/red1.png https://github.com/ekiefl/pooltool/pull/99/files#diff-9f0e5319dc18f66130120b1c5dcf813f225676b1d8c8d547d4d1b8885f27befb (0)
- A pooltool/models/balls/set_2/red10.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-7c58d3e4f64b59e6e497a1650e4b17ee8bf40981a930f6fa0ff8c02b60c39d21 (0)
- A pooltool/models/balls/set_2/red10.png https://github.com/ekiefl/pooltool/pull/99/files#diff-5317b5b94e9e8e14c68ce38ed8fff67b91a28762dbff38206f7900100a36e5c4 (0)
- A pooltool/models/balls/set_2/red11.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-1d66a78ea451f4dfd90059670ee674a6a3cec81e92ebae6e029a686cf80b49a7 (0)
- A pooltool/models/balls/set_2/red11.png https://github.com/ekiefl/pooltool/pull/99/files#diff-d395ff36b28a8877639f7cd917a8c3111280114884dbc56068fbd955397a4272 (0)
- A pooltool/models/balls/set_2/red12.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-236b46fe0f6f2529f79e99d4e6fbadcf221758427d359a0d8b1fbf38fd28d563 (0)
- A pooltool/models/balls/set_2/red12.png https://github.com/ekiefl/pooltool/pull/99/files#diff-a6b743a9f9a214995a66b78625573d59c964e00c6ee4def3f9aeace8039744ac (0)
- A pooltool/models/balls/set_2/red13.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-f776004a509c3740a71194b3ab620da72e5c6531bb01a8b570961e9edada4d78 (0)
- A pooltool/models/balls/set_2/red13.png https://github.com/ekiefl/pooltool/pull/99/files#diff-5aa5fa764e0725153ae5a674af7bdacccc1d2947847531c9221025b36b4647da (0)
- A pooltool/models/balls/set_2/red14.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-55b61ef54fd86645ea48b6fae86627d06824586eb15d06335624fd2946dd9a10 (0)
- A pooltool/models/balls/set_2/red14.png https://github.com/ekiefl/pooltool/pull/99/files#diff-c01c6a1cd496009d02c98bbf375f8bcc8b73e0e0e80ce3683a6ff6296a7be2e9 (0)
- A pooltool/models/balls/set_2/red15.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-e728acce33feac9721bc0abab33d192efd5df1efa5e8d8901cd21ce77771b22f (0)
- A pooltool/models/balls/set_2/red15.png https://github.com/ekiefl/pooltool/pull/99/files#diff-9d6f715a1611acc9fbfc9e0f8b182d8c19a7250c0001d98fffea3ff33bb46c15 (0)
- A pooltool/models/balls/set_2/red2.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-fd3363f5a1b3b8f24c3956fe4c8dfc91055491492d3e75e43e2c0123814facf5 (0)
- A pooltool/models/balls/set_2/red2.png https://github.com/ekiefl/pooltool/pull/99/files#diff-56605289af5a40344209d7a8d4837133cc2a1bb5d3969eea621ca685cf37bcfc (0)
- A pooltool/models/balls/set_2/red3.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-d37cdf05b126614d419ef48a89a4662cc4af80154bec7b40039494b985fdc0e8 (0)
- A pooltool/models/balls/set_2/red3.png https://github.com/ekiefl/pooltool/pull/99/files#diff-d81bdbffd1321616124515d9ffa7debda6c3c2355a5e87eb8aaed0f5c0357d84 (0)
- A pooltool/models/balls/set_2/red4.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-61d541b14e7e9def1a9aa70eb3f384f737f0fa94971c782b5f45073b8efef09e (0)
- A pooltool/models/balls/set_2/red4.png https://github.com/ekiefl/pooltool/pull/99/files#diff-2d1eadc5c17d43c52f779315ff4dafe68aac7a26bf67691dfe882b3bbf43ec42 (0)
- A pooltool/models/balls/set_2/red5.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-58d9deb8995e13bcd4308b3c266c1ea77b8021287de9a64542af0df217a2f40f (0)
- A pooltool/models/balls/set_2/red5.png https://github.com/ekiefl/pooltool/pull/99/files#diff-09a1ed4ceb511966c57ebf13372f2bd5b2e27926fdc46b5eccabe03ad1885252 (0)
- A pooltool/models/balls/set_2/red6.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-a6f09147e26b4262641668c95e38a2f732297f018bafc9af99352eef3f5079c0 (0)
- A pooltool/models/balls/set_2/red6.png https://github.com/ekiefl/pooltool/pull/99/files#diff-1ebbd2dbd55330d1430e624a032d54befa9dfbec7a6612dfe04d359f6e586b05 (0)
- A pooltool/models/balls/set_2/red7.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-408e9fe55b50ae19911597db4c878846e10e0dc6c25855543b6b5eafc4381734 (0)
- A pooltool/models/balls/set_2/red7.png https://github.com/ekiefl/pooltool/pull/99/files#diff-5bc3e278b57efb05bef2404ae150a59789565eb45d707af02d65278e003ddd3a (0)
- A pooltool/models/balls/set_2/red8.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-3f7d4600d8d94e49f621f40be6f96d3c391d93249696a5c93cefc57b1ad64c2a (0)
- A pooltool/models/balls/set_2/red8.png https://github.com/ekiefl/pooltool/pull/99/files#diff-d3ea18d800726202808a43a9932b40f370c05b2ea72e855ac721186a7b410282 (0)
- A pooltool/models/balls/set_2/red9.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-d8b27c8ee83d7da0df5c20cfe962d20d34066a49cf485f237272b696a5d6b7c8 (0)
- A pooltool/models/balls/set_2/red9.png https://github.com/ekiefl/pooltool/pull/99/files#diff-200f5390d4076781d33a074dfacb936e491fc7e145cd40ac4a76e30e54df931b (0)
- A pooltool/models/balls/set_2/shadow.blend https://github.com/ekiefl/pooltool/pull/99/files#diff-8830a90a450f9e2aa29eb0361a4549fb711b7a00959964f7e8560194a5efbbc7 (0)
- A pooltool/models/balls/set_2/shadow.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-c10878d0cd6709e2218415f9eda1e9e728c5faa894f18bd77d19e0b4e06cdf2e (0)
- A pooltool/models/balls/set_2/white.blend https://github.com/ekiefl/pooltool/pull/99/files#diff-7dbcc98e78a00b72a7581b34d770b83c217b1ced3c14fe1618f7288eaea17469 (0)
- A pooltool/models/balls/set_2/white.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-a694cad51b9375d3f0a4b9a88928824ce1a1c12f10d18998c597d37d05c99b56 (0)
- A pooltool/models/balls/set_2/white.png https://github.com/ekiefl/pooltool/pull/99/files#diff-181489ec48f0b3886128f12c295514d5498ebcc61451a87a484df0b3398bcacc (0)
- A pooltool/models/balls/set_2/yellow.blend https://github.com/ekiefl/pooltool/pull/99/files#diff-49fc9ed71dd05ce5f1c557ebd710262a0b8b16e22944d92e5ab224fff9ba560b (0)
- A pooltool/models/balls/set_2/yellow.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-ef81e61b80de668c959d14016de83c098504885bb6d20f13ce45d89b45aecac1 (0)
- A pooltool/models/balls/set_2/yellow.png https://github.com/ekiefl/pooltool/pull/99/files#diff-0b868bafef3f9a5eb2c515ab32711fea54b69516982f547c83e839d2ee96ee22 (0)
- A pooltool/models/balls/set_2/yellow2.blend https://github.com/ekiefl/pooltool/pull/99/files#diff-d29bea57f9401205996baa2d96359ef496a0b174d0c85c331f6254e7ba7bf0ba (0)
- R pooltool/models/table/seven_foot_showood/seven_foot_showood.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-1f6777ab06a395147e2a83a8e96de0c719f20c32d080527f99dc6fe798deb552 (0)
- R pooltool/models/table/seven_foot_showood/seven_foot_showood_pbr.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-f351a6c98923ae141fbf41e7b2583edbbc8b4b885bed646eccfa30f4b912ffd4 (0)
- A pooltool/models/table/snooker_generic/full-size-snooker-table.blend https://github.com/ekiefl/pooltool/pull/99/files#diff-bcb9774933fe369b48ea9bc4165ad5b875bbf760e2b3a0a7b8aa2a1db182ba8a (0)
- A pooltool/models/table/snooker_generic/snooker_generic.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-0259569e645ed8fc84572380ae318c7c24230c538ea3679697be739ee96f6060 (0)
- A pooltool/models/table/snooker_generic/snooker_generic_pbr.glb https://github.com/ekiefl/pooltool/pull/99/files#diff-3dba8766c5cf60bd27bc0f42afe98c85de32437b05b08fc6816f895c570e718f (0)
- M pooltool/objects/init.py https://github.com/ekiefl/pooltool/pull/99/files#diff-6643b329f5ab6ceb0ce18550a20a2a535efd5f46ce58e9f2c106a2e3294aa0a6 (6)
- M pooltool/objects/ball/datatypes.py https://github.com/ekiefl/pooltool/pull/99/files#diff-14f562ca4b7829c65f20984268a757be9fd97c6013b565a73eb67d54db46afbd (17)
- M pooltool/objects/ball/render.py https://github.com/ekiefl/pooltool/pull/99/files#diff-3ee608d02ad452fc66053ef79fc19d36d4996fe5841ea4929741c2a43a2541db (15)
- M pooltool/objects/cue/datatypes.py https://github.com/ekiefl/pooltool/pull/99/files#diff-c95dd24d67513de64bd3b81eb6f030fffd5dfc9572ebb2710d6e46d555aa6103 (4)
- M pooltool/objects/table/init.py https://github.com/ekiefl/pooltool/pull/99/files#diff-6a48ae38d12272ae0c8ab5733f33404a31ccb8f98cd6a88170ae7fb89097a867 (6)
- A pooltool/objects/table/collection.py https://github.com/ekiefl/pooltool/pull/99/files#diff-36ac8e751f2db0b08ea85aca333b86c9661f401208d4fd9d9107d86c69ac0ce0 (83)
- M pooltool/objects/table/datatypes.py https://github.com/ekiefl/pooltool/pull/99/files#diff-09ecf0a764876fb4754cad99fe93bbef65854930368979d27e22529d6c7868f5 (206)
- M pooltool/objects/table/render.py https://github.com/ekiefl/pooltool/pull/99/files#diff-f6a919f7cb12df1836f54a21475e87874c05ae7dcf2d24e68d71bb9a105fa68d (6)
- A pooltool/objects/table/specs.py https://github.com/ekiefl/pooltool/pull/99/files#diff-dde17dcc5ba62b9903bda976086172f23c0fab120c704e035f8c5ef0f04393cc (182)
- M pooltool/objects/table/test_datatypes.py https://github.com/ekiefl/pooltool/pull/99/files#diff-08b72f4a27e00c9d3b6d0dcff0aad30eee34d11f4c311d0a15e881275088056e (2)
- M requirements.txt https://github.com/ekiefl/pooltool/pull/99/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552 (2)
- M sandbox/break.py https://github.com/ekiefl/pooltool/pull/99/files#diff-878cdf641a2bfa42bce004036aa638852196c878ed2fe753ad5d52861d90909e (2)
- M sandbox/copy_save_load.py https://github.com/ekiefl/pooltool/pull/99/files#diff-3d1e63af4a4877563b6bc827cfc80ebc4e7a0379b82f5247b9db674991cd3555 (2)
- M sandbox/offscreen/offscreen.py https://github.com/ekiefl/pooltool/pull/99/files#diff-26a5a127f310355109785c2024b3fa573a18d75f563d8f41af313eda9d30a62c (2)
- M sandbox/offscreen/timing.py https://github.com/ekiefl/pooltool/pull/99/files#diff-28d066433dcc0061fb8ed9df5becaba3738d1304a8fad7c64ab0dfc14691e9c8 (2)
- M sandbox/serialize/demo_round_trip.py https://github.com/ekiefl/pooltool/pull/99/files#diff-70cf94054a2926d41fb54f2f13c52f408e8f774aee9aff489ce4cb5e87d8d5b0 (2)
- M sandbox/serialize/speed.py https://github.com/ekiefl/pooltool/pull/99/files#diff-66844a7b1053489f349e232a132b138cd1374a45b005ab4545bffcf47d91394e (2)
- M sandbox/simple.py https://github.com/ekiefl/pooltool/pull/99/files#diff-99f97afb07adb88775750f7e2d405d636827856c08cbe95b77b02333e7d7bb65 (2)
Patch Links:
— Reply to this email directly, view it on GitHub https://github.com/ekiefl/pooltool/pull/99, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADPKHVUP46ZIY3TCLVQ77LX6KGKLAVCNFSM6AAAAAA5XUBGMSVHI2DSMVQWIX3LMV43ASLTON2WKOZRHEZTCNZXGI3DOMQ . You are receiving this because you were mentioned.Message ID: @.***>
Wow, that is so cool. Amazing how you pieced that all together. How do imagine pooltool might synergize with this?
I'll invite you for a collaboratorship. Here are the instructions you should follow (chatgpt generated) for leaving your fork behind and beginning to work with the main repo.
Transitioning from Fork to Direct Collaboration on the pooltool
Repository
Accept the Invitation: First, accept the invitation sent to you to join the pooltool
repository as a collaborator.
Clone the pooltool
Repository: If you've been working from a forked version, it's time to clone the main pooltool
repository to your local machine:
git clone https://github.com/ekiefl/pooltool.git
Navigate to the Cloned Directory: Change your directory to the newly cloned repository:
cd pooltool
Set Up Remotes: If you previously had the pooltool
repository set up as an 'upstream' remote from your fork, you can skip this step. Otherwise, it's good practice (though technically unnecessary since you're working directly with the original repo now) to add the pooltool
repository as a remote:
git remote add upstream https://github.com/ekiefl/pooltool.git
Fetch and Merge Changes from Upstream: Always ensure you have the latest changes before starting any new work:
git fetch upstream
git merge upstream/main
Create a New Branch for Your Work: Instead of working directly on the main
branch, create a new branch for your changes:
git checkout -b your-feature-branch
Push and Create Pull Requests: After making your changes, push them to the pooltool
repository:
git push origin your-feature-branch
Then, you can create a Pull Request (PR) using the GitHub web interface.
Stay Synced: Since you're directly collaborating now, ensure you regularly pull the latest changes from the main branch before starting new work:
git pull origin main
To contribute specifically to this branch, instead of following step 6 (creating a new branch) you would just go git checkout snooker-game
.
Hi Evan,
I was already using your git so for me it was just a matter of switching. In VS Code the only thing I needed to do is to select - snooker-game from the bottom of the screen [image: image.png]
I tried running again. The game starts and I can pot several balls but as soon as I pot a "wrong ball". Game crashes with exceptions. I'm sure it is a bug in logic but I don't understand how to debug it. Could you have a look? [image: image.png]
Second question I have is about matching the snooker table model with the blender file. Currently they don't match.
You described that for your table here: Pooltool just underwent a massive graphics overhaul – Evan Kiefl (ekiefl.github.io) https://ekiefl.github.io/2021/10/26/graphics/ But that info is rather brief for me. I have many questions on how to do that matching :) How can I enable grey lines in the model? Is there a way to read the same parameters from Blender? Is there logging to see what dimension is in the blender file and what is in the model? Or can I only tell it visually?
Kind regards, Sergey
On Mon, Oct 9, 2023 at 3:23 PM Evan Kiefl @.***> wrote:
Wow, that is so cool. Amazing how you pieced that all together. How do imagine pooltool might synergize with this?
I'll invite you for a collaboratorship. Here are the instructions you should follow (chatgpt generated) for leaving your fork behind and beginning to work with the main repo.
Transitioning from Fork to Direct Collaboration on the pooltool Repository
1.
Accept the Invitation: First, accept the invitation sent to you to join the pooltool repository as a collaborator. 2.
Clone the pooltool Repository: If you've been working from a forked version, it's time to clone the main pooltool repository to your local machine:
git clone https://github.com/ekiefl/pooltool.git
3.
Navigate to the Cloned Directory: Change your directory to the newly cloned repository:
cd pooltool
4.
Set Up Remotes: If you previously had the pooltool repository set up as an 'upstream' remote from your fork, you can skip this step. Otherwise, it's good practice (though technically unnecessary since you're working directly with the original repo now) to add the pooltool repository as a remote:
git remote add upstream https://github.com/ekiefl/pooltool.git
5.
Fetch and Merge Changes from Upstream: Always ensure you have the latest changes before starting any new work:
git fetch upstream git merge upstream/main
6.
Create a New Branch for Your Work: Instead of working directly on the main branch, create a new branch for your changes:
git checkout -b your-feature-branch
7.
Push and Create Pull Requests: After making your changes, push them to the pooltool repository:
git push origin your-feature-branch
Then, you can create a Pull Request (PR) using the GitHub web interface. 8.
Stay Synced: Since you're directly collaborating now, ensure you regularly pull the latest changes from the main branch before starting new work:
git pull origin main
To contribute specifically to this branch, instead of following step 6 (creating a new branch) you would just go git checkout snooker-game.
— Reply to this email directly, view it on GitHub https://github.com/ekiefl/pooltool/pull/99#issuecomment-1753007056, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADPKHU6R6DBNQSKVO4ALXTX6P3E5AVCNFSM6AAAAAA5XUBGMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJTGAYDOMBVGY . You are receiving this because you were mentioned.Message ID: @.***>
I was already using your git so for me it was just a matter of switching. In VS Code the only thing I needed to do is to select - snooker-game from the bottom of the screen
Can you try and make a small change, commit it, and then push it? If your change can be seen as a commit within this PR page, it worked. Otherwise, you need to clone my repo as per the instructions.
I tried running again. The game starts and I can pot several balls but as soon as I pot a "wrong ball". Game crashes with exceptions. I'm sure it is a bug in logic but I don't understand how to debug it. Could you have a look?
Yeah, I can take a look. Right now, all the rulesets are broken.
How can I enable grey lines in the model?
I added it (7de5d2b) so if you pull you should see how they overlap.
Is there a way to read the same parameters from Blender?
Unfortunately, I think you have to make the measurements from within Blender, but I don't know how to do that efficiently.
Alright, I just merged this branch.
Huge credit to @kerby2000 for creating all the snooker models, creating most of the datatypes for snooker, taking a first pass at the snooker rules, and identifying where the current API was unable to accommodate a different cue sport due to a lack of generalization. Thanks to this, I was able to clean up the structure of the codebase to accommodate snooker. And next time someone adds a game mode, it will be much simpler.
With this PR there are lots of changes, but the TL;DR of it all is that eight ball, nine ball, three cushion, and snooker are all valid game modes and all the rules have been (mostly) properly implemented.
There is still no menu to swap between the game modes, but at least for developers, one can switch game modes by changing a single line in pooltool/ani/animate.py
in the create_system(...)
method of Game
:
def create_system(self):
"""Create the multisystem and game objects
FIXME This is where menu options for game type and further specifications should
plug into.
"""
# Change this line to change the game played.
# Pick from {NINEBALL, EIGHTBALL, THREECUSHION, SNOOKER, SANDBOX}
game_type = GameType.NINEBALL
(...)
In the future we'll have to create a menu system that modifies this variable, but for now, I consider it a huge success that a single Enum controls which balls, ball parameters, ball layouts, ball models, table specifications, table models, and game are active.
Here's a list of all the features added in this PR
pooltool/ani/fonts/__init__.py
Now taking a shot is now only possible if the game shot constraints are satisfied (such as the shot requiring calling a ball)
Instead of nesting function calls, a chaining syntax has been introduced, which is much cleaner and readable.
For simple filtering, one has access to the following functions:
filter_time(events, t=4.4, after=True)
filter_type(events, EventType.BALL_BALL)
filter_ball(events, "cue")
Before, filtering events
by all of these looked like:
filtered_events = filter_ball(filter_type(filter_time(events, t=4.4, after=True), EventType.BALL_BALL), "cue")
Now, one can filter like this:
filtered_events = filter_events(
events,
by_time(t=4.4, after=True),
by_ball("cue"),
by_type(EventType.BALL_BALL),
)
pooltool/events/filter.py
has corresponding unit tests.
Creating arbitrary table arrangements, such as the starting ball positions for snooker, nine ball, eight ball, and three cushion billiards, is now unified under an API found in pooltool/game/layouts.py
.
The core functionality is generate_layout
, which looks like this:
def generate_layout(
blueprint: List[BallPos],
table: Table,
ballset: Optional[BallSet] = None,
ball_params: Optional[BallParams] = None,
spacing_factor: float = 1e-3,
seed: Optional[int] = None,
) -> Balls:
"""Generate Ball objects based on a given blueprint and table dimensions.
The function calculates the absolute position of each ball on the table using the
translations provided in the blueprint relative to table anchors. It then randomly
assigns ball IDs to each position, ensuring no ball ID is used more than once.
Args:
blueprint:
A list of ball positions represented as BallPos objects, which
describe their location relative to table anchors or other
positions.
table:
A Table. This must exist so the rack can be created with respect to
the table's dimensions.
ball_params:
A BallParams object, which all balls will be created with. This
contains info like ball radius.
spacing_factor:
FIXME Get ChatGPT to explain this.
seed:
Set a seed for reproducibility. That's because getting a rack
involves two random procedures. First, some ball positions can be
satisfied with many different ball IDs. For example, in 9 ball, only
the 1 ball and 9 ball are predetermined, the positions of the other
balls are random. The second source of randomnness is from
spacing_factor.
Returns:
balls:
A dictionary mapping ball IDs to their respective Ball objects, with
their absolute positions on the table.
Notes:
- The table dimensions are normalized such that the bottom-left corner is
(0.0, 0.0) and the top-right corner is (1.0, 1.0).
"""
The primary information is held in a list of ball positions, passed as the first argument. One can create BallPos objects with respect to normalized table coordinates, or with respect to other balls, or a combination of the two.
To make it easier to create racks, there is ball_cluster_blueprint
, which will create a list of BallPos objects from a seed BallPos, which must be defined with respect to normalized table coordinates (not with respect to other another BallPos), and a series of quantized jumps along with the ball IDs that can exist at the jumped position.
As an example that uses this functionality, see how easily an eight ball layout can be constructed:
def get_eight_ball_rack(*args, ballset: Optional[BallSet] = None, **kwargs) -> Balls:
if ballset is None:
ballset = DEFAULT_STANDARD_BALLSET
stripes = {"9", "10", "11", "12", "13", "14", "15"}
solids = {"1", "2", "3", "4", "5", "6", "7"}
blueprint = ball_cluster_blueprint(
seed=BallPos([], (0.5, 0.77), solids),
jump_sequence=[
# row 2
(Jump.UPLEFT(), stripes),
(Jump.RIGHT(), solids),
# row 3
(Jump.UPRIGHT(), stripes),
(Jump.LEFT(), {"8"}),
(Jump.LEFT(), solids),
# row 4
(Jump.UPLEFT(), stripes),
(Jump.RIGHT(), solids),
(Jump.RIGHT(), stripes),
(Jump.RIGHT(), solids),
# row 5
(Jump.UPRIGHT(), stripes),
(Jump.LEFT(), solids),
(Jump.LEFT(), stripes),
(Jump.LEFT(), stripes),
(Jump.LEFT(), solids),
],
)
cue = BallPos([], (0.6, 0.23), {"cue"})
blueprint += [cue]
return generate_layout(blueprint, *args, ballset=ballset, **kwargs)
Ruleset
used to require many abstract methods that inheriting classes were required to implement, and Ruleset
would then call these methods sequentially in an order that was determined by the base class. This is highly restrictive, and doesn't capture bespoke and unique rulesets.
Instead, Ruleset
implements a more hands off approach and mostly just manages whose turn it is, and two main objects: ShotInfo
and ShotConstraints
. Inheriting classes are now expected to build ShotInfo
and ShotConstraints
objects for processing the current shot and creating expectations and rules for the upcoming shot. This is a way better approach that creates ruleset flexibility, which is a good idea given the large diversity of rulesets (three cushion, eight ball, nine ball, snooker, to name a few).
The following games are now implemented with potential caveats:
pooltool/objects/ball/sets.py
pooltool/objects/ball/params.py
pooltool/objects/table/collection.py
Hi @ekiefl
Wow, That is hell of a lot changes :) Well done.
Snooker table model I found on the BlenderSwap website https://blendswap.com/blend/30017
My Blender skills are terrible to get it fixed. I tried but could not make much progress. I could ask the original developer of the model to help with that. I hope that would be much quicker than me figuring out how to do that.
That's a good idea. After seeing their table brought to life within a video game, they may become enthusiastic about modeling more tables! I'll reach out to them.
Hi @kerby2000,
I took a look at your changes in https://github.com/ekiefl/pooltool/pull/94. First of all, well done. I'm impressed at your ability to start modifying a foreign codebase.
I noticed most of the things you got snagged on are due to a lack of "pluggability" in the codebase. To address this, I've branched off your code and have been working on generalizing things. You can track that work in progress in this branch.
If you want to continue making changes and contributing to this side project, I would suggest you become a collaborator. Then, you would have permission to commit directly to branches in ekiefl/pooltool, rather than kerby2000/pooltool. Let me know if you want this, and I'll send you an invite.