Monday, June 04, 2012

Gridiron Solitaire #8: Iteration

The help screens are in, and they convey the fundamentals of playing the game without drowning you in text. That took less time than I thought, once the layout (large contributions from John Harwood and Fredrik) was finalized.

There's a small detail that has been nagging me for months now, and I finally decided to take care of it last week. On a pass play, since you don't start gaining yards until the third match, I needed a visual indicator to show that the pass was "completed." A status card.

At first, I just showed the completed pass card on top of the playable cards on the field.

No.

Next, I had the cards on the playing field disappear, then flashed the completed pass card briefly, with the playable cards then reappearing.

That wasn't good. It worked, but it still felt wrong.

Third pass: tried an opacity animation so that the cards on the playing field would fade out of visibility instead of it happening so abruptly.

Outcome: better, but still far from optimal. There were two problems:
1. Cards couldn't be played while the completed pass card was showing, which slowed down the game, and
2. There's a card-matching animation when you make a card match, and cards were fading out before that animation completed. Delaying until that completed would have made the sequence last even longer, further slowing down play.

John Harwood called after taking a look. He suggested moving the card off the playing field so that the playable cards didn't need to be hidden. That was an excellent idea, and I also realized that if I moved the card, I could change its size as well (up until this point, it had displayed at the same size as the referee cards).

Fourth pass: the status card was moved to the bottom-left of the field, with an opacity animation to fade in/out. Here's how it looks when it's displayed:



Once it fades in, the card displays for about 1.5 seconds, then it fades out. In the meantime, you can keep playing cards, so it doesn't slow the game down.

That was easy (says the guy who just pulled a sharp stick out of his eye).

That's pretty much how everything has been done since I started-- get something up and running, even if it's really ugly, then keep refining it until it feels right. It's been the same process with the sound engine, which has gone through multiple iterations at this point, and will probably go through a few more.

Two nights ago, though, I played a game. On the road, against a better opponent. I was down 21-0 in the third, scored, then got the ball back early in the 4th quarter. Three unproductive plays later, I was facing 4th down and 40 from my own 25.

Normally, I would punt, but with the amount of time remaining, I thought I was better off closing my eyes and hoping for a miracle. At least the CPU would only have a one-play drive, which wouldn't take as much time off the clock, and maybe I could stop them and get the ball back.

I gained 8 yards, ran out of matches, and hit the Big Play button.

There is a tremendously rare possibility that when you hit the Big Play button, you score. Less than a 1% chance, but I wanted it in the game, because it could swing momentum in huge ways, just like in real football. And there's a nice text description of what's happening to build the drama.

So I got my miracle. 75 yards for the touchdown.

Now I was only down 21-14, and I got the ball back and scored. 21-21 with 4 minutes left.

Then the CPU drove down the field, I drew terrible cards. I had only one play left (and a ton of cards to play) to fill the Drive Meter and stop them. And again, I broke lucky, get a ton of matches, and stopped the drive.

I calculated that I could get inside field goal range (the 40 or closer) with time left on the clock. As it turned out, though, I was wrong--I was off by one lousy yard, so there would be no field goal attempt before time expired. Instead, I passed on the last play, moved down the field with a series of card matches, and scored.

Win, 28-21.

Site Meter