jleonard2099 / LHG_ProBB

Lance Haffner Basketball Pro Game
GNU Affero General Public License v3.0
2 stars 0 forks source link

FTM / FTA sometimes reversed in stats display #16

Closed jleonard2099 closed 1 year ago

jleonard2099 commented 1 year ago

DOSBOX_LOOKY_FTM-FTA Windows-LOOKY-FTM-FTA

With assistance from Randy Dudley (the original author of LOOKY), after carefully reviewing stats for generated seasons it was determined that FTM and FTA are frequently reversed.

Strangely enough, it is not consistent for every player on every team. It seems more frequent that the values are swapped than they are accurate. For several teams that have been evaluated, the values show up 100% accurate. For others, not. Tests were done across both the original game and my refactored one to confirm this is likely a legacy bug.

The LOOKY module is simply reading and displaying stats as they are supposed to be stored, so the issue is suspected to be with the compiling of the stats at the end of the game.

HELP WANTED in running different seasons through the game, try to determine any factors that may contribute. It will be helpful to focus on separating stats generated from the original game from the Windows version and documenting details.

jleonard2099 commented 1 year ago

After diggiing through compilation and stat viewing routines and confirming their behavior is identical to College Basketball, I evaluated the game routines for tracking stats. After adjusting based on my findings, I now have much more accurate reports of FTM / FTA. Most importantly they don't show up reversed as often.

The latest issue appearing is that while FTM is lower than FTA for totals, some individual player entries show FTM and 0 FTA. See image below.

This odd in that, if FTA is under-reporting only for those users, then why just those users? That also means FTA is lower than it should be, making FT % lower than they are. I don't know what normal should be but already suspect FT % is lower than I expect.

There were some other minor areas of code different from CBB, but implementing them did not correct the issue. Without understanding what they're doing exactly, I'm concerned they could have other affects on game play.

My working theory at this point is that the distribution of FTA's is skewed towards the 1 player, which is why it so frequently shows up high and with poor %'s. Figuring out the source of this mis-attribution will likely correct the issue.

haffner-probb-freethrows

jleonard2099 commented 1 year ago

After carefully comparing lines of code again, I noticed the following discrepancy between 2 different lines of code handling FT attempts:

A!(P, B1(P, B), 9) A!(P, B1!(P, B), 9)

The arrays for storing stats are all DIMd as !, so the 2nd line here is the correct one.

That means in this one line, the FT attempts were not getting updated to the correct array.

This is fixed now and being implemented in the latest release.