Monday, April 30, 2012

Gridiron Solitaire: Headlines

Before we get started, here's a development update. The additional functionality that I was adding to the offseason Human GM screen (discussed in last Monday's post) is now finished. It took a few days longer than I expected (everything does), because I tweaked some visual elements and added a little chrome, but it's completed and tested now.

This week, the big item on the list is the final significant feature I want added to the game: headlines. When you finish playing a game, and return to the Team Hub, I want a newspaper/web headline pop-up that notes the outcome of the game as well as a sub-headline that digs a little deeper into what happened. So, for instance, the headline might look like this:
Lobsters Rout Whales, 34-31
Dominant rushing attack keys victory

The process for determining the main headline is fairly straightforward-- take the final score, as well as the score by quarters, then evaluate that information  against a tier of events, from most to least important. The sub-headline, though, is considerably more complex, although it also uses the basic idea of a tier. Here's the tier I'm working with now for the sub-headline:
1. score in last two minutes to take lead
2. score in last four minutes to take lead
3. low score in rain or snow
--under 30 points total, neither team over 20
4. score by periods or half
--one half with > +14 or < -14 margin
--one period with > +14 or < -14 margin, no other period net > +3 or < -3
5. Stats
--rush
--pass
--turnover
--net rush
--net pass
--net turnover

Basically, those tiers are in order of importance, so if #1 happened in the game, it's the basis of the sub-headline.  If it didn't,  I move onto condition  #2, and so forth.

#5, stats, is where it gets considerably more complicated.  Each stat listed has its own tiers. I define a "normal" range, then give the variation outside the normal range a level rating based on the degree of variance.  So each of the stats winds up with its own level rating, and I use the stat corresponding to the highest level rating as the basis of the sub-headline.

If that sounded like gibberish, all I'm basically doing is identifying which stat was most unusual for the game, and thus most likely to influence the outcome.

If you're a football fan, it's very easy to look at a box score and know what most influenced a game's outcome. However, translating that into rules and writing code based on those rules is a different matter entirely. It's time-consuming.

Plus, there aren't going to be 20 possible headlines. At a minimum, there need to be many hundreds or even thousands. There's nothing worse as a player than seeing a feature in a game that's kind of neat, initially, but that repeats itself in short order.

That doesn't mean I'm going to write 500 or 1,000 separate headlines. It's very inefficient to do it that way. Instead, I'll have several levels of compatible phrases, all of which combine with each other to product appropriate headlines. It's possible to generate thousands of distinct headlines that way.

Why does this even matter? Why does a headline feature even need to be in the game? It's a reward for the player, for one thing. Plus, it's an outside evaluation of what the player has just done, and I think that makes people more competitive. When I win a game big, I'm looking forward to that headline describing my dominance. And if I lose big, I'm dreading the description.

Most importantly, it gives a player a sense that the gameworld world exists beyond him. It adds depth to the world. That's also why there is a league structure, and why I spent so much time developing a sim engine that generates "accurate" statistics based on team ratings. I want players to be part of a larger world that feels real.

There will also be a headline feature after the player plays the GM mini-game in the offseason. "FREE AGENT FLOP" or "DRAFT DISASTER" will be annoying, in a good way, and "TITLE HEADED TO MEMPHIS" or "THE FUTURE IS BRIGHT IN PORTLAND" (I just made those up, obviously--they're not actual headlines) will be a nice reward.

I'm anticipating that this feature will take 15-20 hours to code and debug (that's a full week, at a minimum). And yes, it's something that the player will only see for 5 seconds after a game or offseason. But the games I enjoy most pay an enormous amount of attention to details. I don't want what I make to be any different.

Next week: determinance and uncertainty as they relate to gameplay.

Site Meter