zengm-games / zengm

Basketball GM (and other ZenGM games) are single-player sports management simulation games, made entirely in client-side JavaScript.
https://zengm.com
Other
349 stars 127 forks source link

Some sportState live sim for basketball #464

Open hopedonn opened 4 months ago

hopedonn commented 4 months ago

This is in reference to https://github.com/zengm-games/zengm/blob/d4ad5f2ac58c069e86cb5606163c4162fb565633/TODO#L99C1-L99C47 I believe that I may be able to complete this.

I anticipate having to make a component such as a BoxScore.probability.basketball.tsx which can be placed within BoxScore.basketball.tsx that will take perhaps the playbyplaylogger of the game and the two TeamGameSim objects and compare stats between the two teams to determine a baseline win probability and change depending on current score and current stats of the game.
gm score Could maybe use parts of how the over under is calculated though I currently cant find how it is implemented.

Additionally, should I was thinking I would something similar to PlayerGraphs/ScatterPlot.tsx to graph the points.

Guidance would be apprecaited! Thank you.

dumbmatter commented 4 months ago

I appreciate your interest, but I recommend you don't do this, it's too difficult! Some complications:

So this is probably something better for me to do myself eventually.

Now in theory if you come up with something that solves all those edge cases and any others that might exist, that'd be fantastic. But it's a big complicated task.

Also, for this and any other contribution, make sure you're okay with the license (not open source) and CLA https://github.com/zengm-games/zengm/blob/master/README.md#license-and-contributor-license-agreement