Monday, June 17, 2013

Gridiron Solitaire #59: Time

Under the old time system, time ran off the clock in different ways for the CPU than for the Human player. On CPU plays, there was a runoff at the beginning of the play. On Human plays, there was no initial runoff (well, 5 seconds), but a runoff happened with each match.

This worked on several levels, but it was asymmetrical, and that tends to cause problems, particularly when trying to create the feel of a real-world game without a corresponding asymmetrical structure.

A beta-tester (thank you, Darrel) pointed this out, but then, instead of just leaving it there, he started keeping a spreadsheet to explain in full detail why it was a problem.

This was entirely convincing, both because he was right and because it reminded me of when I was beta-testing Front Page Sports Baseball Pro '98 (Doug Johnson, where are you?).

We discussed the ideal set up back and forth for weeks, and last week, I put in the new system. It has four main elements:
1) Both Human and CPU plays have runoffs at the start of the play. The Human plays have a slightly smaller runoff, but it's still significant.
2) Time still runs off the clock on Human plays with each card play, but the runoff is much, much smaller. This means that number of plays is more important to time runoff than the outcome of each play, which is more accurate.
3) When time runs below 2:30 (2nd and fourth quarter) due to a runoff, the clock is stopped at 2:30. This simulates the two-minute warning point in real football.
4) Passing plays take less time than running plays, in large part, because incomplete passes stop the clock. To approximate this, passing play runoffs are smaller than running plays, but each card play counting toward a completion (it takes three) runs additional time off the clock, and when the pass is complete, the total time runoff is much closer.

I am so pleased with how this plays. It just feels much more like football, and reaction has been uniformly positive from the beta testers. So this is the final time system, although there may be minor tweaks.

On another front, there's been an onside kickoff bug that I've been trying to hunt down (on and off) for over a year. It was the one bug I haven't been able to fix.

Symptoms: on an onside kick recovery, the wrong crowd would animate and cheer. That's annoying as hell, obviously, but it happened so inconsistently that I couldn't figure out what was going wrong. The code looked fine. I couldn't duplicate the error. I did see it, rarely, but could never figure out what was going on.

Then, another Hall of Fame beta tester (Thorsten), started sending me screenshots when he saw it happen. And for some reason, today I thought of a detail on the screenshot that hadn't seemed important.

The detail: when he tried the onside kick, he was behind 28-27. I realized that this mean he might have tried to onside kick after kicking a field goal.

This little piece of information caused me to look at another piece of code, and I found the problem and fixed it in five minutes.

Well, that was easy. Eventually.

Site Meter