Overtime implemented!


This will probably be the last update for NWCT. When I wrote it for the short games jam, I wanted to get the main features in there. Then I slipped others in.

I didn't have any explicit plans, because I forgot a feature. But I did add a new school: Pontifciators' Point. That wasn't enough for a real update. So I searched for any features I may have forgotten.

Overtime!

I put a band-aid over it before. NWCT chooses team scores by Gaussian distribution. So you might have 77.67 to 71.38, rounded to 77-71. If 72.87-72.03 happened, the higher of the two was bumped up. (There's some argument that you should round up anyway, but ... if you rounded "properly" there'd still be edge tie cases like 72.37-71.53. So I figured the floor() function was easier. I found it before a round() function, anyway.)

The solution was to find data on overtime versus regulation scoring -- NBA teams scored ~1/10 of a 48-minute period's score in a 5-minute overtime. But college has 40 minute regulation, 5 minute overtime. So I divided the expected score by 8, the standard deviation by square root of 8. I put in a fudge factor for tiredness and general overtime chaos (one team eventually fouls out,) giving a 10%-from-base boost to the stdev for each OT, which seemed a good idea after an 8OT simulated game. (Though I did make the mistake of making the fudge factor smaller at first and not larger. That was big too.) I also upped the blowout boundary in a small last-minute fix while writing this postmortem--in regulation you can't win by more than a 70-30 ratio but you can win 85-15 in overtime. Small sample size.

Also I had a small problem of testing this. Overtime wouldn't happen that often in the flow of the game. This stuck me longer than it should have, until

// uncomment the line below to test overtime.
// yourScore = theirScore = yourInt = theirInt = 100;

Ah, there we go! Every game in overtime, if we want it, and easy to turn the faucets off.

So nothing earth shattering, but as a basketball fan I'm quite pleased to have implemented this tweak that adds realism. You may not notice if you page through. But you'll see OT and 2OT and so forth, in yellow (another trivial last-minute tweak I might not have made without this.)

Files

now-were-clickin-team.html Play in browser
79 days ago
Source 13 kB
79 days ago

Get Now We're Clickin', Team

Leave a comment

Log in with itch.io to leave a comment.