The Unattractive Process of Attract Modes

Today I did the attract mode for the latest version of Phalanx wrong in two entirely different ways. Fortunately, a conversation with a colleague taught me the right method in the end. Lest I forget in the future, here it is:

  1. Code your game so that inputs are stored, along with a time stamp. Preferably the inputs should be handled by a manager devoted entirely to them; it then sends the data to an intermediary, which in turn helps it get to everything that needs to know what the inputs were.
  2. In addition to the input manager, build a system that reads move records, sending “inputs” as the game timer reaches their associated time stamp.
  3. When there’s a great playtest game, put its record into the record player.
  4. Set up your game so that the intermediary reads from the input manager, your attract mode so that it gets “inputs” from the record player.

Voila! Exciting attract mode matches, all thanks to good code architecture.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s